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

Created on 29 Apr 2013  ·  146Comments  ·  Source: hashicorp/vagrant

Hi, I'm getting this error when 'vagrant up'

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 HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file VBoxManageHostonly.cpp

It appeared suddenly. I assumed this is a Virtualbox issue so I checked the Virtualbox GUI and got this alert..

Kernel driver not installed (rc=-1908)

Screen Shot 2013-04-29 at 8 58 30 PM

I reinstalled Virtualbox and all was working ok again... for some hours.

Now and I'm having the same issue. Any clues? I've seen on #vagrant IRC at least one guy with the same problem.

System specs:
Mountain Lion 10.8.3
Vagrant 1.2.2
VirtualBox 4.2.12 r84980

Most helpful comment

In High Sierra:
I had to unblock this blocked kext execution attempt here: https://developer.apple.com/library/content/technotes/tn2459/_index.html

Then sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

Then I could vagrant up.

All 146 comments

Fixed. Thanks! (There is better error output now)

Same error with me, I don't know if this error is on vagrant but I really think that is on virtualbox.

What maybe be cause the problem:
I need vagrant to work, so I use every day on my macbook, I reboot or shutdown my computer some times too but last day I take off my RAM to change for a new one, that don't work (memory with problem) so I put my old memory back. Then, when I try to vagrant up I got that error; but ok, I was with a old version (vagrant and vbox) so I upgrade both and all work again, even rebooting and vagrant up again, all fine.
Today after putting my new memory I got the same error but I found a better solution, restarting virtualbox and all start to working again.

Solution:
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
http://d.pr/i/1Bvi

I wrote this just for any one who have the same or similar issue and maybe I lead to where to look to fix the bug or unless display a better explain about what to do on that error.

Vagrant version 1.2.7
Virtualbox version 4.2.16

+1

sudo /Library/StartupItems/VirtualBox/VirtualBox restart fixed it for me.

+1

+1 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

Thanks for the tip! Works like a charm

+1 Thank you very much for the tip ! :)

Any idea why this seems to be required now?

+1 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+1

Thanks @lslucas that worked great!

+1

That little piece of code works like a charm. The weird part is that I need to run that command every single time I restart my machine -- any ideas what the root cause is or how to fix it short of using this snippet?

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

OS X 10.9
Vagrant 1.3.4
VirtualBox 4.2.18 r88780

screen shot 2013-10-09 at 9 57 57 am

+1 Thank you very much for the tip =)

:+1:

I also have to run this after every restart with OS X Mavericks. I assume it's a VB bug.

Related VirtualBox issue: https://www.virtualbox.org/ticket/8940

I really, really don't recommend fixing it this way, but it's saved me the frustration of running the restart command every time I restart OS X:

In Automator, create a workflow to run an AppleScript:

on run {input, parameters}

    do shell script "sudo /Library/StartupItems/VirtualBox/VirtualBox restart" password "password" with administrator privileges

    return input
end run

Once you finish that, save it as a .app and set it to run when you log in. This will automatically restart VirtualBox and stop that error from happening so you can vagrant up without having to run that other command first.

It's likely insecure and I don't recommend doing it but since I'm the only person using my computer, it's worked for me.

This is resolved in VirtualBox 4.3: https://www.virtualbox.org/ticket/8940

Anyone been brave enough to try 4.3 w/ Vagrant ?

I'm running Vagrant 1.3.3 and it said it doesn't support VirtualBox 4.3 so I had to downgrade.

Updated to Vagrant 1.3.5 and VirtualBox 4.3 -- my VM setup booted up without any issues. The only thing I had to do was update the Guest Additions (and it isn't even required).

Running vagrant up here, all good so far on vagrant 1.3.5 and vb4.3.
http://d.pr/i/4r5G

After a restart, I'm still getting that error:

[skennedy:~/Sites] (master) $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] 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 HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp

Running Vagrant 1.3.5 and VirtualBox 4.3.0 r89960. Any of you still experiencing the same thing?

:thumbsup: sudo /Library/StartupItems/VirtualBox/VirtualBox restart

Just ran into this as well.
Vagrant 1.3.5
VirtualBox 4.3.0 r89960
OS X 10.9 (13A598)

Was unable to create a host-only network even from the Network tab in the VirtualBox Preferences until I ran:
sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

It's possible I've only had VirtualBox 4.3.0 installed on this machine as, unlike everyone else, /Library/StartupItems/VirtualBox/VirtualBox does not even exist on this machine.

:+1: sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist worked for me since /Library/StartupItems/VirtualBox/VirtualBox didn't exist.

:+1: for me work:

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

didn't exist:

/Library/StartupItems/VirtualBox/VirtualBox didn't exist.

:+1: sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

Thanks! I got this error ("Error while adding new interface: failed to open /dev/vboxnetctl: ...") when trying to create vboxnet0 in VirtualBox Preferences (under Network) and this solved the problem:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+1 thx restart fixed the issue after Mavericks update must have erased the virtual eth card

I seem to need to run this command every time I restart my computer. Using Vagrant 1.3.2 and VBox 4.2.18 on Mavericks.

I'll see if I can find a combo of versions where this isn't the case : /

I had to remove Virtualbox and then install 4.3. I have not had this
problem since. Hope that helps !

Will Meldon wrote:

I seem to need to run this command every time I restart my computer.
Using Vagrant 1.3.2 and VBox 4.2.18 on Mavericks.

I'll see if I can find a combo of versions where this isn't the case : /


Reply to this email directly or view it on GitHub
https://github.com/mitchellh/vagrant/issues/1671#issuecomment-27090881.

+1 @johntdyer Uninstalling VirtualBox with the uninstall tool and then reinstalling 4.3 completely fixed the issue for me.

@johntdyer I actually didn't need to uninstall it but this version has fixed the issue.

4.3 appears to be the solution.

Guys, what do I have to do if I have the same problem, with virtualbox 4.2.12 on Fedora 19?

Thank you @lslucas your solution worked wonderfully.

:+1: sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

VBox 4.3 doesn't fix this issue. Vagrant 1.3.5.

@Sitin Uninstall using the tool that comes with VirtualBox, then do a reinstall of 4.3.0. That worked for me.

:+1: On a reinstall of VirtualBox 4.3.0 after the upgrade to Mavericks. I had 4.3.0 installed prior to the Mavericks upgrade and started seeing this error. Ran uninstall tool in the VirtualBox installer DMG, reinstalled and error is resolved.

:+1:sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

WORKS!!! sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

+1 sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

:+1: sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

Will I need to do this every time I restart my computer? Vagrant 1.3.5 and Vbox 4.3. Didn't have this issue until I installed Mavericks.

I also have this problem when trying to configure a private network.
Arch Linux 3.11.6-1
Vagrant 1.3.5
VirtualBox 4.3.0

+1 sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

sudo /Library/StartupItems/VirtualBox/VirtualBox restart 

Does not work on Mavericks as Mavericks got rid of the startup items folder. In the latest release of Virtual Box they have switched to a launchctl startup method.

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist worked for me!

VirtualBox 4.3.2 fixes this issue (again) by correctly removing the old kernel extensions on upgrade: https://www.virtualbox.org/ticket/8940

Ditto on installing VirtualBox 4.3.2. Thanks, @mp-jwolkerstorfer!

Confirming VirtualBox 4.2.3 fixes this issue permanently.

Working fine after reboot with Mac OS X 10.9 Mavericks (13A603), Vagrant 1.3.5 and VirtualBox 4.2.3.

Solution:
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

Good Solution.

Does anyone know why this has to be done and what the bug actually is?

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist fixed it for me

@jasonrm thanks - worked for me

There should be a definitive solution to this issue, rather than a quick fix

+1

The problem still happens with VirtualBox 4.3.0r89960 and Vagrant 1.3.5 on OS X Mavericks.

By the way, /Library/StartupItems is deprecated, use

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

or

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

I am still getting this issue on the latest versions as well (OS X Mavericks).

Legend @hanxue I couldn't workout why it was working for everyone else and not me. That got it!

great,thanks

Thanks @lslucas, worked for me as well.

+1 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+1 Thank you for : sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+1
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

Vagrant 1.5.1
VB 4.3.8
Mavericks

None of the paths (startupitems, launchdeamons) above had any VirtualBox references in them for me. I ended up uninstalling VB, then reinstalling (from the same dmg) and all was well.

:+1: sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+1 sudo /Library/StartupItems/VirtualBox/VirtualBox restart Thanks.

+1

+1 worked for me to . Any thought on why ? would be good to know where this magic comes from :)

+1

sudo /Library/StartupItems/VirtualBox/VirtualBox start didn't work

sudo /Library/StartupItems/VirtualBox/VirtualBox restart works for me :)

+1 on
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

+2 for
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

in OSX 10.9.x.

+1 on
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

thanks!

+1, worked for me too.

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

gives me sudo: /Library/StartupItems/VirtualBox/VirtualBox: command not found :(

If you want it to "just work" (i.e., not having to type sudo...) after a reboot, just download that latest vbox, use the uninstall tool, and then reinstall vbox. Quick and painless going forward. Thanks to those who figured this out before me!

On Yosemite, neither

sudo /Library/StartupItems/VirtualBox/VirtualBox restart nor sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist worked for me.

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

did though

My '/Library/StartupItems/VirtualBox/VirtualBox' is empty and there is no org.virtualbox.startup.plist in the directory of '/Library/LaunchDaemons/'.
A reinstall virtualbox works for me!

Thanks for 'sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart'!

(Using Mavericks)

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

+1

I find the fact that this thread is resurrected and becomes so active when Apple releases a new operating system implies either:
a) Apple loves this project and wants it to have a good life.
b) This software is poorly written. How many operating system releases do we need to endure before someone fixes the underlying design flaw that leads to this madness?

I think you can guess which of the 2 options I think is most likely.

I'm not on Yosemite - yet. I just filed a new issue for the upstream to know that this is still happening. Check https://github.com/mitchellh/vagrant/issues/4720

+1

The plist option doesn't work on Mavericks:

$ sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist
launchctl: Couldn't stat("/Library/LaunchDaemons/org.virtualbox.startup.plist"): No such file or directory
nothing found to load

This works on every restart though:

$ sudo /Library/StartupItems/VirtualBox/VirtualBox restart

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
This worked! Thanks.

This works for me on Arch:

sudo vboxreload

:+1: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

@steezeburger Holy crap, thank you. I was desperately hoping for an Arch user in this endless gorram sea of Mac users.
Confirming that this worked for me on Arch:
sudo vboxreload

@cperepelitsa Depending on what's causing the issue, you may also have luck with loading the network adapter kernel module directly via

sudo modprobe vboxnetadp

@cperepelitsa Thanks!

@steezeburger There seem to be several other kernel modules one might miss loading. vboxreload would be a better solution.

If you are in Arch or other linuxes:
First make sure modules are loaded with: sudo modprobe vboxdrv vboxnetadp vboxnetflt vboxpci
Then reload: sudo vboxreload

how fix it on windows?

Having same issue on Windows 10.

@theonlylawislove @leoxopow dual-boot to Linux, or at least use a linux VM for development...

@npoggi So, create a linux virtual to host a linux virtual??

@theonlylawislove Don't just upgrade to Windows 10 and expect virtualbox kernel drivers to work out of the box with Vagrant. Vagrant isn't exactly great on Windows to begin with, so the suggestion to dual-boot (not virtualize) seems reasonable.

On OSX Yosemite the following will work:

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

Broken again on El Capitan.

Broken again on El Capitan++

Had the issue with El Capitan, VirtualBox update fixed it for me - the built-in updater was broken on my install so I just downloaded a fresh new 5.0.4 copy.

Same error here, after an update on El Capitan

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 HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp

Broken in El Capitan. None of the answers above worked for me. Upgrading VirtualBox to 4.3.3 worked.

VirtualBox update link: https://www.virtualbox.org/wiki/Download_Old_Builds_4_3

Broken in El Capitan. Reinstall VirtualBox 4.3 fixed the problem.

Confirming that re-installing Virtualbox works.

Upgrading to 4.3.30 worked for me (I'm on El Capitan)

Same for me, I think it can be close.

I'm using Arch and I'm experiencing the same issue. Will I need to type sudo vboxreload again and again or does a workaround exist?

Broken in El Capitan too. Installing updates did worked for me.
Go to Check for updates > Download > Install. That's it.

I ran into this problem last week after upgrading to El Capitan. Updating VirtualBox to 4.3.3 fixed it, but....

I'm running into the error again this morning, only on one of my Vagrant boxes, after I shut it down via the VirtualBox GUI rather than the command line.

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 HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp

Running sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh start fails with;

/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart => /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl => /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxDD2GC.gc => /Applications/VirtualBox.app/Contents/MacOS/VBoxDD2GC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxDDGC.gc => /Applications/VirtualBox.app/Contents/MacOS/VBoxDDGC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxExtPackHelperApp => /Applications/VirtualBox.app/Contents/MacOS/VBoxExtPackHelperApp-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless => /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage => /Applications/VirtualBox.app/Contents/MacOS/VBoxManage-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdpCtl => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdpCtl-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetDHCP => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetDHCP-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetNAT => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetNAT-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxSVC => /Applications/VirtualBox.app/Contents/MacOS/VBoxSVC-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMIPCD => /Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMIPCD-amd64
/Applications/VirtualBox.app/Contents/MacOS/VMMGC.gc => /Applications/VirtualBox.app/Contents/MacOS/VMMGC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VirtualBox => /Applications/VirtualBox.app/Contents/MacOS/VirtualBox-amd64
/Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM => /Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM-amd64
/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv => /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv-amd64
Error: VBoxDrv.kext is already loaded
Fatal error: VirtualBox

And sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart fails with;

Unloading VBoxUSB.kext
Unloading VBoxNetFlt.kext
Unloading VBoxNetAdp.kext
Unloading VBoxDrv.kext
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xe00002c7.
Failed to unload org.virtualbox.kext.VBoxDrv - (iokit/common) unsupported function.
Error: Failed to unload VBoxDrv.kext
Fatal error: VirtualBox

I suppose reinstalling VirtualBox will probably work, but I'm trying to avoid that for now, since I'm on my mobile hotspot.

I had the same issue when upgraded from Yosemite to El Capitan. Updated VirtualBox to 4.3.30 and the problem was resolved.

Same problem here when I upgraded to El Capitan, reinstalled both new versions of VirtualBox and Vagrant solved the problem.

Had the same problem after updating to El Capitain. Just here to confirm that I reinstalled VirtualBox version 4.3.34 and the problem was solved. 😀

This problem has to do with modules loaded in virtualbox. For those who have re-installed virtualbox, your distro/packaging system might have done this for you. For correct operation, including the vbox networking, you have to have these:

$ lsmod | grep vbox
vboxpci 24576 0
vboxnetflt 28672 0
vboxnetadp 28672 0
vboxdrv 385024 3 vboxnetadp,vboxnetflt,vboxpci

I'm having the same problem noted above. As per coryschwartz, I ran this:

$ lsmod | grep vbox

yielding this:

vboxdrv 446786 0

So vboxnetadp,vboxnetflt & vboxpci are missing.

Please advise ASAP. I'm dead in the water.

Just updated to macOS Sierra and had this same problem. Updating to VirtualBox 5.1.14 fixed the issue for me.

the same error meet up after update to macOS Sierra. And i reinstall the VirtualBox and vagrant fixed .

Reinstalling VBox in El Captain fixed for me.

Updating to v5.1.22 fixed this issue for me in macOS Sierra

Updating to Vbox v5.1.26 fixed for me in macOS Sierra v10.12.6

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart worked for me.
Initially, it gave me a message that my system preferences blocked it when I executed the above command. I opened system preferences, privacy settings, and hit allow for oracle plugin and use same command, then it worked.

For those of you of the Linux persuasion:

sudo service virtualbox restart

In High Sierra:
I had to unblock this blocked kext execution attempt here: https://developer.apple.com/library/content/technotes/tn2459/_index.html

Then sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

Then I could vagrant up.

Just to echo @saltcod - this appears to be the solution if you are running Mac OS High Sierra.

Ditto, I am on Mac OS High Sierra and @saltcod 's note worked for me

Maybe a little different with saltcod's solution, on Mac High Sierra, I solved this by:

  1. close the virtualbox
  2. execute the
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

and you would see the following

Unloading VBoxUSB.kext
Unloading VBoxNetFlt.kext
Unloading VBoxNetAdp.kext
Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext
  1. start the virtualbox, and it would turn out to be all right.

This the same error in new release on Mojave !!

VirtualBox 5.2.18

Also, post boot of the machine, the VM is stuck.

Another victim of Mojave update!! :(

Another victom of Mojave update. Just reinstalled virtualbox via homebrew and it works.

brew cask reinstall virtualbox

I also fixed it by updating the virtualbox and vagrant. I had installed it via package so downloaded the latest from their website.

Piyushs-MacBook-Pro:~ piyushkantm$ vboxmanage --version
5.2.18r124319

Piyushs-MacBook-Pro:~ piyushkantm$ vagrant --version
Vagrant 2.1.5

Additionally if you're using laravel, also update vagrant box to 6.3.0.

Piyushs-MacBook-Pro:~ piyushkantm$ vagrant global-status
id       name        provider   state    directory                           
-----------------------------------------------------------------------------
5d694e6  homestead-7 virtualbox poweroff /Users/piyushkantm/Homestead        




Piyushs-MacBook-Pro:~ piyushkantm$ vagrant box update 5d694e6

This should work on Mojave

brew cask reinstall virtualbox
brew cask reinstall vagrant
vagrant plugin update
brew cask reinstall virtualbox
brew cask reinstall vagrant
vagrant plugin update

This did the trick after a Mojave upgrade - thanks @akashnimare

I had ignored something about "oracle needing some security thing..." during some bash script installs.
: / Turns out I shouldn't have!

A nice little post about it:
https://matthewpalmer.net/blog/2017/12/10/install-virtualbox-mac-high-sierra/index.html

RE: https://developer.apple.com/library/archive/technotes/tn2459/_index.html

This worked for me:
sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

this worked for me.

After run sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist I have an error
/Library/LaunchDaemons/org.virtualbox.startup.plist: No such file or directory

I find my org.virtualbox.startup.plist file on path
/Library/Application\ Support/VirtualBox/LaunchDaemons/org.virtualbox.startup.plist

I experienced this problem after upgrading my macOS to Mojave. Virtual box 5.1 is not compatible with Mojave. Updating Virtual box solved my problem.

FIXED on OSX Mojave - I had downloaded and installedVB from the Oracle website (there was an error at the end I ignored). I went to Security & Privacy, clickedSome system software was blocked from loading, clicked Allow... and checked Oracle. Was forced to restart computer, and now it's working.

On OSX 10.14.2 Mojave:
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

Resolved this issue for me. So it seems like some of the VBox drivers (kernel modules) were not loaded based on which ones were unloaded during there restart process. They were loaded on restart:

Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext

Just in case anyone else runs into this. I suspect that a restart would have resolved it also since that would have reloaded modules.

For reference, you can also verify that the kext's are loaded with:
sudo kextstat | grep virtualbox

Which will show the virtualbox modules that are loaded.

For those of you of the Linux persuasion:

sudo service virtualbox restart

When I try to run this command, I get the following error:

$ sudo service virtualbox restart
Failed to restart virtualbox.service: Unit virtualbox.service not found.

I am running VirtualBox 6.0, and Ubuntu 18.04

This fixed the problem for me: https://github.com/Homebrew/homebrew-cask/issues/39369#issuecomment-339118861

After running that script and allowing the load from System Preferences I was then able to run

brew cask reinstall virtualbox brew cask reinstall vagrant vagrant plugin update vagrant up

successfully.

If anyone else finds themselves here and are running ubuntu 18.04 ( kernel 4.18.0-16-generic ), vagrant 2.2.4, and virtualbox5.x+

I had this issue occur after running sudo apt upgrade

remove virtualbox: sudo apt autoremove virtualbox virtualbox-5.* virtualbox-4.*
reinstall virtualbox: sudo apt install virtualbox ( 5.2.18_Ubuntu r123745 at the time of this post )
Download the latest vagrant debian ( was 2.2.4 at the time of this post ) and run an install/update from it: https://www.vagrantup.com/downloads.html

The error that I received was the following:

``==> default: Clearing any previously set network interfaces... There was an error while executingVBoxManage`, 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```

On ubuntu 18.04, completing removing and reinstalling was what finally fixed this for me. I'm using virtualbox-6.0.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lebogan picture lebogan  ·  3Comments

bbaassssiiee picture bbaassssiiee  ·  3Comments

StefanScherer picture StefanScherer  ·  3Comments

hesco picture hesco  ·  3Comments

dorinlazar picture dorinlazar  ·  3Comments