Vagrant 2.2.18, OSX 11.6 cannot create private network

Edit VagrantFile and change the IP from to something else, ex
Then run vagrant up again. You will most likely need to enter your password during this process.

Hey, I’m actually running into the same error. Changing to a different IP didn’t help in my case but will keep trying things and will let you know if we find something that helps.

It looks like it might be an issue with Virtualbox itself. Attempting to create the NIC manually through Virtual Box’s host network manager results in the same error.

I am getting the same error on MacOS 11.6. VirtualBox version : 6.1.28 r147628 (Qt5.6.3)

I1021 13:15:23.604631   19891 main.go:130] libmachine: Found a new host-only adapter: "vboxnet5"
I1021 13:15:23.604650   19891 main.go:130] libmachine: COMMAND: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet5 --ip --netmask
I1021 13:15:23.691311   19891 main.go:130] libmachine: STDOUT:
I1021 13:15:23.691349   19891 main.go:130] libmachine: 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
} worked for me, but did not get a message to reenter my password. I have other vagrant instances that worked before the upgrade that no longer work, they used

Why would changing the ip work?

I managed to get past the error by downgrading to VirtualBox 6.1.26.

1 Like

Thanks @scottblinch ! Downgrading to 6.1.26 resolved the issue for me as well.

1 Like

@scottblinch @imtiazc how did you go about downgrading the version?


I wrote out the steps I took in this thread: Vagran can not assign IP address to VirtualBox machine - #5 by scottblinch

(Copying from other thread for awareness)

This issue comes from a new IP restriction for Host-Only networks in VirtualBox 6.1.28. See docs here:

On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 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 and IPv4 ranges as well as 2001::/64 range put the following lines into /etc/vbox/networks.conf:

      * 2001::/64

For me I solved it by changing my guest IP to . I was also able to find some success by adding my original IP to the /etc/vbox/networks.conf file. But while the error went away with that setup (and I could ping the box), for some reason I couldn’t access the apache webserver (port 80 or 443) from my host after running my vagrant box. This part might be a bug in Vagrant (for instance, maybe it needs to configure /etc/network/interfaces inside the guest here?

In any case, I hope this helps!


Thank you mikehenrty,
it’s work for me, i added /etc/vbox/networks.conf.

1 Like

Changing my guest ip: setting to did not work for me. I’m using Mac OS X (Big Sur).

Changing my guest ip: setting to did not work for me. I’m using Mac OS X (Big Sur).

Are you getting the same Code E_ACCESSDENIED error with that IP? Note, you might try rebooting your machine in case there are still some outdated virtual interfaces setup from previous attempts.

Also, did you create a /etc/vbox/networks.conf? If so, you should remove that file since it will invalidate 192.68.56.xx addresses (that was a problem I was running into before anyway).

I receive the same E_ACCESSDENIED error as before. Each subsequent run causes a new hostonlyif to get created, issuing the same error.

I did not create any /etc/vbox/networks.conf file, as our usage in CI will not allow that to be created on host systems that are creating the guest OS, and we’ve never had to create this file before. It all works normally when I switch back to 6.1.26 with with or the default IP that Vagrant picks of

I’ve removed all dhcpservers and all hostonlyifs using VBoxManage prior to any run to make sure it’s all cleared out, as I’ve has issues with this before, so I’m aware of it and clear them as needed.

Yes, I had to restart twice. Once to remove 6.1.26 and then a second time after installation of 6.1.28. Still have the same errors and issues as before. I then removed 6.1.28, restarted, installed 6.1.26, then restarted. And now it works normally again.

I also facing same issue in macOS Big Sur and using VirtualBox 6.1.28. Unable to find /etc/vbox/networks.conf file. Can somebody help me where can I get this file in macOS.

1 Like

same thing for me, i don’t find the folder /etc/vbox

downgrading to VirtualBox 6.1.26. solve the error

1 Like

@johnish This should be considered the solution, thanks! I chose

Do you by any chance know why this must be done?

had same issue with latest version of virtual box version 6.1.28, downgrade to version 6.1.26 using link above in comments worked.