Seravo/wordpress

Vagrant private IP may overlap with the default host-only adapter

frimro opened this issue · 0 comments

On vagrant up, the IP address is generated like this:

private_ip = "192.168.#{rand(255)}.#{rand(2..255)}"

This may overlap with the default Virtualbox host-only adapter, which will throw an error:

Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)

This can be avoided by setting the third octet in the IP address to be static. This way vagrant also does not create a new interface for every new network.