docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

Cannot create docker machine (VirtualBox) on Big Sur #4848

Closed kotapeter closed 3 years ago

kotapeter commented 3 years ago

On Big Sur I get an error message when I try to create a new docker machine (driver: VirtualBox).

  1. I ran this command:

    docker-machine create test
  2. I got this error:

    Running pre-create checks...
    Creating machine...
    (test) Copying /Users/test/.docker/machine/cache/boot2docker.iso to /Users/test/.docker/machine/machines/test/boot2docker.iso...
    (test) Creating VirtualBox VM...
    (test) Creating SSH key...
    (test) Starting the VM...
    (test) Check network to re-create if needed...
    (test) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
    (test) 0%...
    (test) Progress state: NS_ERROR_FAILURE
    (test) VBoxManage: error: Failed to create the host-only adapter
    (test) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
    (test) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
    (test) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
    (test) 
    (test) 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

VirtualBox version: 6.1.12 docker-machine version: 0.16.0

kotapeter commented 3 years ago

I could resolve this issue:

sgaynetdinov commented 3 years ago

@kotapeter Hi, where can i add permission for VirtualBox?

kotapeter commented 3 years ago

@sgaynetdinov 👋 run VirtualBox installer and go through the steps. after that open System Preferences > Security & Privacy. Go to "General" tab and you should see an "Allow" button. Click on the lock icon, enter your password and after click on the allow button. And finally restart computer. osx-install-oracle2 (1)

sgaynetdinov commented 3 years ago

@kotapeter Thanks, working! 💪

yaitskov commented 3 years ago

How could I do the step above on MacOS VM with ssh access only?