tinkerbell/playground

Vagrant sandbox not working on Virtualbox 6.1.28

Closed this issue · 4 comments

When running recent virtualbox (6.1.28) an error is returned during 'vagrant up' when attaching the 192.168.50.1 IP:

Command: ["hostonlyif", "ipconfig", "vboxnet1", "--ip", "192.168.50.1", "--netmask", "255.255.255.0"]

Some research found https://discuss.hashicorp.com/t/vagrant-2-2-18-osx-11-6-cannot-create-private-network/30984/20 which suggests recent virtualbox versions have instituted some sort of filtering of acceptable private networks and our use of 192.168.50.0/24 is at fault.

Expected Behaviour

vagrant should be able to successfully bring up a VM with a hostonlyif using 192.168.50.1 as the IP address.

Current Behaviour

Bringing machine 'provisioner' up with 'virtualbox' provider...
==> provisioner: Checking if box 'generic/ubuntu2004' version '3.5.0' is up to date...
==> provisioner: Clearing any previously set network interfaces...
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", "vboxnet2", "--ip", "192.168.50.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

Possible Solution

Per the hashicorp post linked above if we switch our private network to 192.168.56.0/24 we may avoid this issue. Other option would be for end-users to update the list of acceptable networks but that option is less desirable. I will confirm changing to an alternate network does resolve the issue.

Downgrading to an earlier virtualbox would also 'resolve' the issue.

Context

This issue prevents me from bringing up the vagrant based sandbox on recent OS X machines.

Your Environment

  • OSX 11.6
  • Virtualbox 6.1.28
  • Vagrant 2.2.18

Creating /etc/vbox/networks.conf containing:

* 192.0.0.0/8
* 172.0.0.0/8
* 10.0.0.0/8

Resolves the issue, as does changing the network to 192.168.56.0/24

Linked pull request to address this issue