Skip to content

Update Vagrantfile to be VirtualBox 6.2 compatible

pradeesh requested to merge pradeesh/vagrant-multivm:master into master

Hi David,

Submitting a PR as newer Virtualboxes does not use 192.168.2.x (by doing so, it will throw an error). We need to be using 192.168.56.x

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet0", "--ip", "192.168.2.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

Please refer to -> http://virtualbox.org/manual/ch06.html#network_hostonly

Under Section 6.7,

On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters. For IPv6 only link-local addresses are allowed. If other ranges are desired, they can be enabled by creating /etc/vbox/networks.conf and specifying allowed ranges there. For example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as 2001::/64 range put the following lines into /etc/vbox/networks.conf:

This is not an issue with older Virtualboxes (< 6.1), but for newer ones, we may run into this issue

Edited by pradeesh

Merge request reports