Open davidmnoriega opened 8 years ago
I just ran into my own bug report today 😅
# Default IP is in the 20-bit private network block for DHCP based networks
options[:ip] = "172.28.128.1" if options[:type] == :dhcp || !options[:ip]
I changed the &&
to ||
here. Seems to work but in general it looks like the hostonly_config for virtualbox generally does not take auto_config into account.
Issue still exists
I primarily use VMware, so I had not noticed this before until a coworker using virtualbox had the problem. I use the following to add an additional nic, but not to do any configuration:
node.vm.network "private_network", auto_config: false
This works fine with vmware, but with virtualbox, it throws an error because no ip is set. Re-reading the documentation, I see the example shows having an ip set along with
auto_config: false
, so the question is, which one is right?Vagrant version
Currently using 1.8.4, same behavior with 1.8.1
Host operating system
Mac 10.11.5 VMware Fusion 8.1.1 VirtualBox 5.0.22
Guest operating system
bento/ubuntu-14.04
Vagrantfile
Debug output
https://gist.github.com/davidmnoriega/c408a7ed5ecaf4d6f4ed89476c7a37bf
Expected behavior
I had expected the vagrant to come up just the same with virtualbox as I had with vmware
Actual behavior
Steps to reproduce
config.vm.network "private_network", auto_config: false
to the vagrantfilevagrant up
with virtualboxReferences
These issues contain the same exception, but with vmware and under slightly different circumstances, but maybe this is where the divergence between vmware and virtualbox comes from