Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
822 views
in Technique[技术] by (71.8m points)

virtualbox - vagrant up failed, /dev/vboxnetctl: no such file or directory

Can be useful, I found this error. The common solution is reinstall virtualbox but there are a better way.

Solution

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

or

sudo /Library/StartupItems/VirtualBox/VirtualBox start

VirtualBox 4.3+

On recents versions, the file (/Library/StartupItems/VirtualBox/VirtualBox) don't exists, so you need to use the command below:

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

Error

Print: http://d.pr/i/1Bvi

There was on 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 68 of file VBoxManageHostonly.cpp

Vagrant Git issue about the error: https://github.com/mitchellh/vagrant/issues/1671#issuecomment-22304107

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'm running macOS High Sierra 10.13.1 and VirtualBox 5.2.2.

This worked for me:

  1. Grant permission to VirtualBox under System Preferences > Security & Privacy > General (this request is new to macOS High Sierra)
  2. Open Terminal and run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...