27

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?

Hirurg103
  • 4,783
  • 2
  • 34
  • 50

3 Answers3

69

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.

crishoj
  • 5,660
  • 4
  • 32
  • 31
  • `docker-machine create --driver virtualbox myvm1` still failed with the same error. I double clicked on `myvm1` in the VirtualBox panel. It took me back for the `Security & Privacy` panel (my Mac System Preferences) to the Privacy tab and Accessibility item. I checked VirtualBox and Iterm2 in the `Allow the apps below to control your computer` and restarted iTerm and VB. But the command still failed with the same error. Seems like I need to manually start VMs from the VirtualBox UI – Hirurg103 Dec 24 '18 at 14:44
  • 7
    For me. I'm a sudo user and running `sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart ` prompt me the above dialogue which solved my problem – Ramesh Murugesan Dec 02 '20 at 15:57
  • 1
    One aspect that I notice is that this approval request wasn't visible, but became available upon reinstalling VirtualBox - some other answer guessed that this approval request is shown there for some limited time only. – Peteris Mar 31 '21 at 19:59
  • I stopped being able to start VirtualBox after upgrading to MacOS Big Sur, and this was the solution to that problem also. Nice work figuring this out! It was an arcane problem with a cryptic error message. – John Aug 02 '21 at 19:53
  • That was my problem as well. Thanks!! – agapitocandemor Apr 18 '22 at 11:15
3

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

Lucas Marinzeck
  • 313
  • 4
  • 11
  • 1
    This is the only one that solved it for me, Thanks! – benchuk Jan 26 '21 at 08:35
  • 2
    WARNING - *Do not use this on Monterey*. I installed VBox, couldn't get it to work so I uninstalled it, made this suggested Security Options change, re-installed it and it worked. However, when I reverted the changes to Security Options (you know because it's good to have a protected machine), my MBP M1 got BRICKED. – DevlshOne Nov 01 '21 at 21:41
2

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

nvh95
  • 456
  • 6
  • 11