hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.16k stars 4.43k forks source link

Enhancement Request: Hyperv allow -DynamicMacAddress #11672

Open survivant opened 4 years ago

survivant commented 4 years ago

When you create more that one VM, you cannot have 2 VM that have the same MAC address running in the same time.

We should be able to set a param in VagrantFile to generate a dynamic MAC. The fonctionnality is present in HyperV

Set-VMNetworkAdapter -DynamicMacAddress

https://docs.microsoft.com/en-us/powershell/module/hyper-v/set-vmnetworkadapter?view=win10-ps

externl commented 4 years ago

I just ran across this because of a VM which I created with packer that used a static mac address (was required during initial Windows provisioning). I guess the setting must get baked into the base box, my other VMs which were created with dynamic MACs do not have this issue.