Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
telemakhos opened this issue Apr 29, 2013 · 146 comments

Comments

@telemakhos
Copy link

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

@mitchellh
Copy link
Contributor

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

@lslucas
Copy link

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
Copy link

gvt commented Aug 8, 2013

+1

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

@lldong
Copy link

lldong commented Aug 8, 2013

+1

@nathanjo
Copy link

nathanjo commented Aug 9, 2013

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

@telemakhos
Copy link
Author

Thanks for the tip! Works like a charm

@gmacaire
Copy link

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

@johntdyer
Copy link

Any idea why this seems to be required now?

@qualbeen
Copy link

qualbeen commented Oct 2, 2013

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

@tiptronic
Copy link

+1

@chrismaddern
Copy link

Thanks @lslucas that worked great!

@danielnegri
Copy link

+1

@seriouslysean
Copy link

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

@neogan74
Copy link

+1 Thank you very much for the tip =)

@mhenrixon
Copy link

👍

@jasonmadigan
Copy link

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

@jasonmadigan
Copy link

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

@seriouslysean
Copy link

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.

@jasonmadigan
Copy link

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

@johntdyer
Copy link

Anyone been brave enough to try 4.3 w/ Vagrant ?

@seriouslysean
Copy link

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

@lslucas
Copy link

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>

@seriouslysean
Copy link

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
Copy link

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

@seriouslysean
Copy link

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?

@levinotik
Copy link

👍 sudo /Library/StartupItems/VirtualBox/VirtualBox restart

@jasonrm
Copy link

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.

@javasgl
Copy link

javasgl commented Apr 1, 2017

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

@snipebin
Copy link

Reinstalling VBox in El Captain fixed for me.

@kevinreynolds
Copy link

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

@austenpayan
Copy link

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

@ghost
Copy link

ghost commented Oct 20, 2017

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.

@JohnVonNeumann
Copy link

For those of you of the Linux persuasion:

sudo service virtualbox restart

@saltcod
Copy link

saltcod commented Feb 12, 2018

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.

@pnoeric
Copy link

pnoeric commented Mar 23, 2018

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

@fergalmonaghan
Copy link

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

@kunth
Copy link

kunth commented Jun 4, 2018

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.

@smitjainsj
Copy link

smitjainsj commented Sep 25, 2018

This the same error in new release on Mojave !!

VirtualBox 5.2.18

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

@piyushkantm
Copy link

Another victim of Mojave update!! :(

@tohjg
Copy link

tohjg commented Sep 26, 2018

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

brew cask reinstall virtualbox

@piyushkantm
Copy link

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

@akashnimare
Copy link

This should work on Mojave

brew cask reinstall virtualbox
brew cask reinstall vagrant
vagrant plugin update

@mbiang
Copy link

mbiang commented Oct 22, 2018

brew cask reinstall virtualbox
brew cask reinstall vagrant
vagrant plugin update

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

@sheriffderek
Copy link

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

@yoeridekker
Copy link

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

@chantouchsek
Copy link

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

this worked for me.

@galo4kin
Copy link

galo4kin commented Nov 8, 2018

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

@metju90
Copy link

metju90 commented Nov 11, 2018

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.

@pynner
Copy link

pynner commented Nov 22, 2018

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.

@reard3n
Copy link

reard3n commented Dec 13, 2018

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.

@iamsidn
Copy link

iamsidn commented Dec 30, 2018

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

@johnpc
Copy link

johnpc commented Jan 2, 2019

This fixed the problem for me: Homebrew/homebrew-cask#39369 (comment)

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

brew cask reinstall vagrant
vagrant plugin update
vagrant up

successfully.

@allen-munsch
Copy link

allen-munsch commented Apr 26, 2019

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:

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```

@shaunsmiley-xevo
Copy link

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

@ghost
Copy link

ghost commented Jan 28, 2020

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.

@hashicorp hashicorp locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests