Skip to content

Commit

Permalink
Merge pull request #368 from test-kitchen/sp/hyperv-vmname
Browse files Browse the repository at this point in the history
Adding a per-instance generated vmname for Hyper-V
  • Loading branch information
Seth Thomas authored Aug 13, 2018
2 parents f64c0ff + 19019f2 commit ad1b969
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/Vagrantfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ Vagrant.configure("2") do |c|
if config[:linked_clone] == true || config[:linked_clone] == false %>
p.linked_clone = <%= config[:linked_clone] %>
<% end
when "hyperv"
if config[:linked_clone] == true || config[:linked_clone] == false %>
when "hyperv" %>
p.vmname = "kitchen-<%= File.basename(config[:kitchen_root]) %>-<%= instance.name %>"
<% if config[:linked_clone] == true || config[:linked_clone] == false %>
p.differencing_disk = <%= config[:linked_clone] %>
<% end
end %>
Expand Down

0 comments on commit ad1b969

Please sign in to comment.