Hirurg103
Hirurg103

Reputation: 4953

VirtualBox: VERR_VM_DRIVER_NOT_INSTALLED

I am trying to launch two VMs using docker machine:

docker-machine create --driver virtualbox myvm1
docker-machine create --driver virtualbox myvm2

I see the following error in the output:

(myvm2) Progress state: NS_ERROR_FAILURE
(myvm2) VBoxManage: error: Failed to create the host-only adapter
(myvm2) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(myvm2) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(myvm2) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(myvm2)
(myvm2) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

I installed the latest version of VirtualBox (6.0.0) from there. When I open VirtualBox window and click on the VMs in the left panel I get the following error popup:

enter image description here

UPDATE

I tried to re-install VirtualBox 6.0.0 and in the end of the VirtualBox installation process I saw the following screen:

enter image description here

Maybe it is a reason of the failures described above? My mac is running on 10.14.1 macOS Mojave

How can I fix these errors?

Upvotes: 29

Views: 60388

Answers (5)

jawira
jawira

Reputation: 4588

I had the same issue in a Debian 12 Bookworm machine.

Run /sbin/vboxconfig and read the given error message. In my case "linux-header" were missing.

$ sudo /sbin/vboxconfig 

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-6.1.0-28-amd64 ⬅️ THIS LINE
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-6.1.0-28-amd64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

You can read that "linux-headers-*" are missing, so I installed these packages:

sudo apt install linux-headers-amd64 linux-headers-6.1.0-28-amd64

Then I executed vboxconfig once again:

$ sudo /sbin/vboxconfig 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

As you can see everything is fixed.

Upvotes: 0

Prabhu
Prabhu

Reputation: 1017

If you are getting error like I was: vboxdrv not found in directory /lib/modules

Then you you need to reinstall the linux-headers

sudo apt install linux-headers-`uname -r`

and then reinstall virtualbox-dkms

sudo apt install --reinstall virtualbox-dkms

ref: https://askubuntu.com/a/1097215/1098151

Upvotes: 4

nvh95
nvh95

Reputation: 632

I got this exact error after upgrading my Mac to Monterey. Remove Virtualbox and reinstall solves the problem.

Upvotes: 2

Lucas Marinzeck
Lucas Marinzeck

Reputation: 343

The (rc=-1908) usually happens when the secure boot is enable, try to disable and run your vm again

Secure Boot settings are available in Startup Security Utility:

  1. Turn on your Mac, then press and hold Command (⌘)-R immediately after you see the Apple logo to start up from macOS Recovery.
  2. When you see the macOS Utilities window, choose Utilities > Startup Security Utility from the menu bar.
  3. When you're asked to authenticate, click Enter macOS Password, then choose an administrator account and enter its password.

Select "No security" option

Upvotes: 3

crishoj
crishoj

Reputation: 5917

You probably need to approve the VirtualBox kernel extension in System Preferences under Security & Privacy:

enter image description here

After you allow the kernel extension, the installer should be able to run successfully.

Upvotes: 69

Related Questions