Vagrant up NS_ERROR_FAILURE

I am having this error by runnign vangran up

MAC OS 10.14.1
Vagrant 2.2.4
Virtual Box 6.0.4

vagrant up

Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…

==> mongod-m103: Importing base box ‘ubuntu/trusty64’…

==> mongod-m103: Matching MAC address for NAT networking…

==> mongod-m103: Setting the name of the VM: mongod-m103

==> mongod-m103: Clearing any previously set forwarded ports…

==> mongod-m103: 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”, “create”]

Stderr: 0%…

Progress state: NS_ERROR_FAILURE

VBoxManage: error: Failed to create the host-only adapter

VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface

VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

check if something is blocking/protecting your network interface. try turning off firewall or antivirus firewall

I am having the same issue, in Macos. I don’t have any firewall or antivirus.
I’m connecting from Beijing, might this be a problem? I get the same problem both trying through a VPN and without a VPN.
Thanks!

Hi @Guillem_40013,

Please run the following command and then try to bring your vagrant up again.

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

This should work, please get back if you face any issues.

Thanks,
Muskan
Curriculum Support Engineer

Hi @Guillem_40013,

Please refer to the following post for this error:

If you still face the same issue, please share the output of the following command:

vagrant up --debug

Please let me know, if you have any questions.

Thanks,
Sonali

Thanks @Muskan_Sharma , but it didn’t work:

nebutec@NebutecdeMacBook-Pro [18:33:21] [~/university/m103/m103-vagrant-env]
-> % sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Password:
sudo: /Library/StartupItems/VirtualBox/VirtualBox: command not found

nebutec@NebutecdeMacBook-Pro [18:33:29] [~/university/m103/m103-vagrant-env]
-> % /Library/StartupItems/VirtualBox/VirtualBox restart
zsh: no such file or directory: /Library/StartupItems/VirtualBox/VirtualBox

Thanks for trying to help me @Sonali_Mamgain, the output is really long, the last few lines are these:
/opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/machine.rb:195:in action' /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/batch_action.rb:86:inblock (2 levels) in run’
INFO interface: error: There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

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

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

INFO interface: Machine: error-exit [“Vagrant::Errors::VBoxManageError”, “There was an error while executing VBoxManage, a CLI used by Vagrant\nfor controlling VirtualBox. The command and stderr is shown below.\n\nCommand: [“hostonlyif”, “create”]\n\nStderr: 0%…\nProgress state: NS_ERROR_FAILURE\nVBoxManage: error: Failed to create the host-only adapter\nVBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory\nVBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface\nVBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp\n”]

If you want the full output let me know.

Hi @Guillem_40013,

Please look at the solution of this error mentioned in Chapter 0: Introduction and Setup Lecture: Troubleshooting the Vagrant Environment if it proves to be of some help to you or you may also try re-installing vagrant.

Happy to help!

Thanks,
Muskan
Curriculum Support Engineer

I am on OSX Catalina and the following worked for me

  1. System Preferences -> Security & Privacy allow Oracle
  2. sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
2 Likes

Hi @W11,

Thanks for sharing the solution with the community.

Thanks,
Shubham Ranjan
Curriculum Services Engineer