I'm trying to work out how to start multiple concurrent VMs from the same base box. Is this possible? My experiments so far have been met with failure due to clashing NAT interface MACs.
My Vagrantfile looks like this:
When I try vagrant up, I get:
If I try starting the VM in virtualbox the error message I get is VERR_SHARING_VIOLATION, due to the NAT interface on the second VM having the same mac address as the one on the first.
Given that my guest OS (Debian) can deal with the MAC address being different (after clearing out udev's rules) I tried setting config.vm.base_mac to nil, but was met with this error:
Do I have to customise config.vm.base_mac per VM? Is there another way around this?
I figured this one out. I was too quick to jump to a conclusion about what VERR_SHARING_VIOLATION means. It turns out that virtualbox doesn't care about the MAC address on NAT interfaces being the same across separate boxes (and this is somewhat a fundamental requirement for vagrant to integrate with it). It was actually complaining that the IDE controller was trying to share the host DVD drive with multiple guests.
When you create a blank VM in virtualbox it prompts you to choose an ISO for the guest's DVD drive. If you impatiently click through this without choosing (I PXE booted the machine I turned into my base box) it maps the guest DVD drive to the host DVD drive, which can't be used by more than one VM at a time. If I'd used something like veewee to construct my base box I wouldn't have had a problem, but I have an existing customised PXE image which is used for both production servers and dev VMs and a cursory glance at the code made it look like significant effort to make it able to work with a netbooted machine so I opted to grab some of the cleanup scripts for my OS and just use them on a freshly installed machine.
|Free forum by Nabble||Edit this page|