Vagrant: Stderr: VBoxManage: error: Code E_ACCESSDENIED

Submitted by oioioooi on 30/05/2022 - 15:12

If private network settings are used for Vagrant machine and the following occurs:

Command: ["hostonlyif", "ipconfig", "vboxnet2", "--ip", "10.0.0.1", "--netmask", "255.255.255.0"]
Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)

It is not an issue with Vagrant itself, but rather with VirtualBox. Seems that latest versions of it restrict certain private network addresses.

To overcome this and allow any private ip address range, create a file /etc/vbox/networks.conf and add the following line:

* 0.0.0.0/0 ::/0

An alternative solution is to downgrade virtual box to version 6.1.26.

Tags