gasolin / foxbox

Development Kit for B2G/Firefox OS platform
Mozilla Public License 2.0
55 stars 17 forks source link

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

Open bertob opened 10 years ago

bertob commented 10 years ago

When trying to run configure.sh on my Arch GNU/Linux install, I get this error:

OS: linux
DIST: 
REV: 
DistroBasedOn: 
start vagrant with /home/tobias/code/foxbox/B2G
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> 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

The error seems to be the same as this one: https://github.com/mitchellh/vagrant/issues/1671 The problem is, the comments in that thread say that the issue is fixed in newer versions of Virtualbox (https://www.virtualbox.org/ticket/8940), but apparently that's not the case.

My setup: linux 3.15.5-1 virtualbox 4.3.12-1 vagrant 1.6.3-1 nfs-utils 1.3.0-3 net-tools 1.60.20130531git-1

Have I missed anything (i.e. dependencies, daemons that have to be enabled etc.)?

gerep commented 9 years ago

Try this sudo modprobe vboxnetadp

etcet commented 9 years ago

Thanks, gerep. I had a similar issue with the same error and loading vboxnetadp fixed it.

nottoseethesun commented 9 years ago

+1 ; On Mac OS X Yosemite, per https://github.com/mitchellh/vagrant/issues/1671 , this worked for me to workaround:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
jago86 commented 7 years ago

Great!! Worked for me in Ubuntu 16.04. Thanks @gerep

NicholasDShaw commented 7 years ago

sudo modprobe vboxnetadp then sudo modprobe vboxnetflt worked for me

fo2rist commented 5 years ago

@nottoseethesun thank! That helped on the MacOS 10.14

zhoupeng6d commented 5 years ago

@nottoseethesun thanks very much! Worked for me on the macOS 10.13.6

lopesrichard commented 5 years ago

Thanks gerep, it works here on ubuntu 18.04.

bennythejudge commented 4 years ago

+1 ; On Mac OS X Yosemite, per hashicorp/vagrant#1671 , this worked for me to workaround:

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

The above worked for me on Mac OS Mojave 10.14.6 (18G103) today. I also was asked to allow the loading of the Kernel modules in the Security & Privacy page of the System Preferences.

majdaneq commented 4 years ago

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

This worked for macOS Catalina 10.15.1

concasau commented 4 years ago

sudo modprobe vboxnetadp then sudo modprobe vboxnetflt worked for me

Worked for me. Thank you very much

polarapfel commented 4 years ago

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart This worked for macOS Catalina 10.15.1

This worked for AFTER failing once due to Catalina's new security model, then going into Settings -> Security & Privacy -> General and approving the request from Oracle, Inc. under "Allow apps...".

altryne commented 4 years ago

Same issue happens on MacOS Big Sur 11 beta 2, and the above does not work Failed to unload VBoxDrv.kext is the error.

Loading VBoxDrv.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxDrv.kext
Loading VBoxUSB.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxUSB.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxUSB.kext
Loading VBoxNetFlt.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxNetFlt.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext
Loading VBoxNetAdp.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxNetAdp.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xdc008018.
Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).
Fatal error: VirtualBox
EParedez commented 4 years ago

@altryne could you find any solution?, I still have the big sur beta

0nk4r commented 4 years ago

Check If you have Installed Vagrant ...Works for me sudo apt-get install vagrant

ThisisJOY commented 4 years ago

+1 ; On Mac OS X Yosemite, per hashicorp/vagrant#1671 , this worked for me to workaround:

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

Thank you! If works for MAC OS

webadmininc commented 4 years ago

Any update on macOS Big Sur beta 11.4

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 95 of file VBoxManageHostonly.cpp

I tried all the suggestion mentioned here with no luck.

ankitshah009 commented 3 years ago

This worked on Mac OS Big Sur - 11.0 as well sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

martinbean commented 3 years ago

This worked on Mac OS Big Sur - 11.0 as well sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

Doesn’t for me. I run that and get this:

Unloading VBoxUSB.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Unloading VBoxNetFlt.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Unloading VBoxNetAdp.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Unloading VBoxDrv.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error: VBoxDrv.kext is already loaded
Error: VBoxUSB.kext is already loaded
Error: VBoxNetFlt.kext is already loaded
Error: VBoxNetAdp.kext is already loaded
Fatal error: VirtualBox

Then if I try and bring up an image, I get this:

Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '10.0.0' is up to date...
==> homestead: A newer version of the box 'laravel/homestead' for provider 'virtualbox' is
==> homestead: available! You currently have version '10.0.0'. The latest is version
==> homestead: '10.1.1'. Run `vagrant box update` to update.
==> homestead: 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 95 of file VBoxManageHostonly.cpp

I’ve tried completely removing both VirtualBox and Vagrant and re-installing them, and just get the same. This is on macOS Big Sur 11 Beta.

fengliang2011 commented 3 years ago

@martinbean have you find the solution?

PhuLeRock commented 3 years ago

I got this error, MacOS Big Sur, stand still when re-install Virtualbox and Vagrant. I think MacOS Big Sur has some breaking change in the network devices, so we should be patient to wait for the update of Virtualbox

martinbean commented 3 years ago

@fengliang2011 No.

vlad-poskatcheev-tealium commented 3 years ago

I personally have not tried this yet, but another GitHub issue (link) recommends the following solution:

image

altryne commented 3 years ago

I personally have not tried this yet, but another GitHub issue (link) recommends the following solution:

image

This worked for me as well

ivan-sirosh commented 3 years ago

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

if you get error then: System Preferences -> Security & Privacy -> allow execute kext (modules) restart

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

result:


sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Password:
Unloading VBoxUSB.kext
Unloading VBoxNetFlt.kext
Unloading VBoxNetAdp.kext
Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext
cmeiklejohn commented 3 years ago

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

if you get error then: System Preferences -> Security & Privacy -> allow execute kext (modules) restart

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

result:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Password:
Unloading VBoxUSB.kext
Unloading VBoxNetFlt.kext
Unloading VBoxNetAdp.kext
Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext

I'm having this problem on Big Sur as well -- the restart command is failing:

Loading VBoxUSB.kext
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
Error Domain=KMErrorDomain Code=27 "Extension with identifiers org.virtualbox.kext.VBoxUSB,org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers org.virtualbox.kext.VBoxUSB,org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences.}

You stated in Security & Privacy to allow execute kext (module), but I don't have that option (I'm assuming you meant under the General tab) on my system.

speaktoabu commented 3 years ago

Same issue happens on MacOS Big Sur 11 beta 2, and the above does not work Failed to unload VBoxDrv.kext is the error.

Loading VBoxDrv.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxDrv.kext
Loading VBoxUSB.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxUSB.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxUSB.kext
Loading VBoxNetFlt.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxNetFlt.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext
Loading VBoxNetAdp.kext
Executing: /usr/bin/kmutil load -p /Library/Application Support/VirtualBox/VBoxNetAdp.kext -p /Library/Application Support/VirtualBox/VBoxDrv.kext
Error: Error Domain=KMErrorDomain Code=1 "Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) dependency load failed
Kernel request failed: (libkern/kext) kext (kmod) start/stop routine failed
Kernel request failed: (libkern/kext) dependency load failed}
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xdc008018.
Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).
Fatal error: VirtualBox

it Worked for me..after restarting the system..

sandeepkp1175 commented 3 years ago

I tried all options here, but still seeing this error:

% sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart Loading VBoxDrv.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxDrv Loading VBoxUSB.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxUSB Loading VBoxNetFlt.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxNetFlt Loading VBoxNetAdp.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxNetAdp Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Fatal error: VirtualBox

olucaslrc commented 3 years ago

Try this sudo modprobe vboxnetadp

It's works now, thanks! I use this command to run genymotion.

ECurvat commented 2 years ago

I tried all options here, but still seeing this error:

% sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart Loading VBoxDrv.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxDrv Loading VBoxUSB.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxUSB Loading VBoxNetFlt.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxNetFlt Loading VBoxNetAdp.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Error: Failed to load org.virtualbox.kext.VBoxNetAdp Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv Error Domain=KMErrorDomain Code=3 "Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e} Fatal error: VirtualBox

Got the exact same error and nothing appears in the privacy settings so I can't allow anything.

tangleiNUAA commented 2 years ago

In macOS Montertey, i got these error results which in macOS Catalina works successfully:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' version '2004.01' is up to date...
==> default: Setting the name of the VM: node-1
==> 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 HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

i also got these result while i reload some old and runnable target:

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 95 of file VBoxManageHostonly.cpp

the result of "sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart" command:

Unloading VBoxUSB.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Unloading VBoxNetFlt.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Unloading VBoxNetAdp.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Unloading VBoxDrv.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error: VBoxDrv.kext is already loaded
Error: VBoxUSB.kext is already loaded
Error: VBoxNetFlt.kext is already loaded
Error: VBoxNetAdp.kext is already loaded
Fatal error: VirtualBox
rlam3 commented 1 year ago

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

if you get error then: System Preferences -> Security & Privacy -> allow execute kext (modules) restart

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

result:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Password:
Unloading VBoxUSB.kext
Unloading VBoxNetFlt.kext
Unloading VBoxNetAdp.kext
Unloading VBoxDrv.kext
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext

@ivan-sirosh What if I'm in a CI environment. How do I change the system preferences?

rlam3 commented 1 year ago

In macOS Montertey, i got these error results which in macOS Catalina works successfully:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' version '2004.01' is up to date...
==> default: Setting the name of the VM: node-1
==> 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 HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

i also got these result while i reload some old and runnable target:

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 95 of file VBoxManageHostonly.cpp

the result of "sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart" command:

Unloading VBoxUSB.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Unloading VBoxNetFlt.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Unloading VBoxNetAdp.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Unloading VBoxDrv.kext
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error: VBoxDrv.kext is already loaded
Error: VBoxUSB.kext is already loaded
Error: VBoxNetFlt.kext is already loaded
Error: VBoxNetAdp.kext is already loaded
Fatal error: VirtualBox

@tangleiNUAA Were you able to find a workaround?

smallLazy commented 1 year ago

How to solve this problem

macos 13 virtualBox 6.1.40 Vagrant 2.3.2

Currently I have tried virtualBox7 My previous Vagrant was 2.3.1 because I couldn't use virtualBox7 so I did an upgrade

No matter what version it is, it will report an error in macos 13

The error is as follows

$: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Password:
Loading VBoxDrv.kext
Error Domain=KMErrorDomain Code=71 "Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxDrv v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxDrv at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxDrv.kext
Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxDrv v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxDrv at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxDrv.kext" UserInfo={NSLocalizedDescription=Unsupported Error: one or more extensions are unsupported to load     Kext org.virtualbox.kext.VBoxDrv v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxDrv at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxDrv.kext
Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxDrv v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxDrv at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxDrv.kext}
Error: Failed to load org.virtualbox.kext.VBoxDrv
Loading VBoxUSB.kext
Error Domain=KMErrorDomain Code=71 "Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxUSB v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxUSB at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxUSB.kext
Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxUSB v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxUSB at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxUSB.kext" UserInfo={NSLocalizedDescription=Unsupported Error: one or more extensions are unsupported to load     Kext org.virtualbox.kext.VBoxUSB v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxUSB at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxUSB.kext
Unsupported Error: one or more extensions are unsupported to load   Kext org.virtualbox.kext.VBoxUSB v6.1.40 in executable kext bundle org.virtualbox.kext.VBoxUSB at /Library/StagedExtensions/Library/Application Support/VirtualBox/VBoxUSB.kext}
Error: Failed to load org.virtualbox.kext.VBoxUSB
Loading VBoxNetFlt.kext
Error Domain=KMErrorDomain Code=27 "Extension with identifiers org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences.}
Error: Failed to load org.virtualbox.kext.VBoxNetFlt
Loading VBoxNetAdp.kext
Error Domain=KMErrorDomain Code=27 "Extension with identifiers org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers org.virtualbox.kext.VBoxDrv not approved to load. Please approve using System Preferences.}
Error: Failed to load org.virtualbox.kext.VBoxNetAdp
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Error Domain=KMErrorDomain Code=71 "Kernel request failed: (libkern/kext) not found (-603947002)" UserInfo={NSLocalizedDescription=Kernel request failed: (libkern/kext) not found (-603947002)}
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Fatal error: VirtualBox
Iokdo commented 1 year ago

Kernel request failed: (libkern/kext) not found

我也一样