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

Closed
Telemakhos opened this Issue Apr 29, 2013 · 120 comments

Comments

Projects
None yet

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

Owner

mitchellh commented Apr 30, 2013

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

mitchellh closed this Apr 30, 2013

lslucas commented Aug 5, 2013

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

gvt commented Aug 8, 2013

+1

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

lldong commented Aug 8, 2013

+1

nathanjo commented Aug 9, 2013

+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?

qualbeen commented Oct 2, 2013

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

+1

Thanks @lslucas that worked great!

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 =)

👍

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

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.

lslucas commented Oct 16, 2013

Vagrant 1.3.5 released with VirtualBox 4.3 support. Also a handful of solid bug fixes. https://t.co/saBOnsa9Z2 http://t.co/oncK4tjLbQ

— Mitchell Hashimoto (@mitchellh) October 15, 2013
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

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).

lslucas commented Oct 16, 2013

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?

👍 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

jasonrm commented Oct 23, 2013

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.

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

👍 for me work:

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

didn't exist:

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

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

spianjo commented Oct 24, 2013

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

moltar commented Oct 24, 2013

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

WMeldon commented Oct 25, 2013

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
#1671 (comment).

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

WMeldon commented Oct 28, 2013

@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.

irnnr commented Oct 28, 2013

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

Sitin commented Oct 28, 2013

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.

👍 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.

howie commented Oct 30, 2013

👍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

👍 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!

andfinally referenced this issue in Automattic/vip-quickstart Nov 1, 2013

Closed

OSX install? #57

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

shunchu commented Nov 4, 2013

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

caseyfw commented Nov 4, 2013

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.

igo903 commented Nov 7, 2013

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

Good Solution.

zahid commented Nov 7, 2013

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

rixrix commented Nov 17, 2013

@jasonrm thanks - worked for me

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

hanxue commented Nov 18, 2013

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!

oluul commented Jan 4, 2014

great,thanks

oddysee commented Jan 18, 2014

Thanks @lslucas, worked for me as well.

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

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

garbini commented Feb 18, 2014

+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.

2bj commented Mar 23, 2014

👍 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

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

kimly commented Apr 23, 2014

+1

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

lenage commented May 18, 2014

+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!

philihp commented Jun 16, 2014

+1, worked for me too.

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

NAAleks commented Jul 23, 2014

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!

kvz commented Oct 21, 2014

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.

rixrix commented Oct 27, 2014

I'm not on Yosemite - yet. I just filed a new issue for the upstream to know that this is still happening. Check #4720

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

ylove commented Apr 24, 2015

👍 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

pcx commented May 3, 2015

@cperepelitsa Thanks!

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

npoggi commented Jul 17, 2015

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.

npoggi commented Jul 30, 2015

@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??

@ghost

ghost commented Jul 30, 2015

@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.

wschorn commented Oct 1, 2015

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

evgeny-l commented Oct 4, 2015

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

Confirming that re-installing Virtualbox works.

kevnk commented Oct 7, 2015

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?

paolooo commented Oct 9, 2015

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

localjo commented Oct 14, 2015

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.

cfperea commented Oct 19, 2015

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

imikay commented Nov 11, 2015

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

lyondhill referenced this issue in nanobox-io/nanobox Nov 18, 2015

Closed

Vagrant Error vagrant up failed - - 1 #49

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.

javasgl commented Apr 1, 2017 edited

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment