4 minutes
Fix Virtualbox and Dinghy Errors After Upgrading to Mac OS X Big Sur
After upgrading to Mac OS X Big Sur I tried to spin up my Dinghy machine doing dinghy up
and I got this error:
Starting the dinghy VM...
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
Traceback (most recent call last):
9: from /usr/local/bin/_dinghy_command:12:in `<main>'
8: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/base.rb:440:in `start'
7: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor.rb:359:in `dispatch'
6: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/invocation.rb:126:in `invoke_command'
5: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/command.rb:27:in `run'
4: from /usr/local/Cellar/dinghy/4.6.5/cli/cli.rb:93:in `up'
3: from /usr/local/Cellar/dinghy/4.6.5/cli/cli.rb:271:in `start_services'
2: from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:25:in `up'
1: from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:126:in `system'
/usr/local/Cellar/dinghy/4.6.5/cli/dinghy/system.rb:18:in `system': Failure calling `docker-machine start dinghy` (System::Failure)
Turns out that was complaining about version 5.0 but I was already on 6.1.
The Docker Machine was here: docker-machine ls
:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dinghy - virtualbox Stopped Unknown
Trying to manually start the Dinghy machine was failing too: docker-machine start dinghy
:
Starting "dinghy"...
(dinghy) Check network to re-create if needed...
(dinghy) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(dinghy) 0%...
(dinghy) Progress state: NS_ERROR_FAILURE
(dinghy) VBoxManage: error: Failed to create the host-only adapter
(dinghy) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(dinghy) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(dinghy) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(dinghy)
(dinghy) This is a known VirtualBox bug. Let's try to recover anyway...
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
Also I tried regenerating the certificates: docker-machine regenerate-certs dinghy --client-certs
:
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Regenerating local certificates
Waiting for SSH to be available...
Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
Finally I decided to recreate the Dinghy machine, first I destroid the current machine: dinghy destroy
:
Stopping the FsEvents daemon
Stopping the dinghy VM...
Stopping NFS daemon, this will require sudo
Password:
About to remove dinghy
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Successfully removed dinghy
I created a new one: dinghy create --disk=100000 --provider=virtualbox
:
Creating the dinghy VM...
Running pre-create checks...
Creating machine...
(dinghy) Copying /Users/albert/.docker/machine/cache/boot2docker.iso to /Users/albert/.docker/machine/machines/dinghy/boot2docker.iso...
(dinghy) Creating VirtualBox VM...
(dinghy) Creating SSH key...
(dinghy) Starting the VM...
(dinghy) Check network to re-create if needed...
(dinghy) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(dinghy) 0%...
(dinghy) Progress state: NS_ERROR_FAILURE
(dinghy) VBoxManage: error: Failed to create the host-only adapter
(dinghy) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(dinghy) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(dinghy) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(dinghy)
(dinghy) 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
Traceback (most recent call last):
8: from /usr/local/bin/_dinghy_command:12:in `<main>'
7: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/base.rb:440:in `start'
6: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor.rb:359:in `dispatch'
5: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/invocation.rb:126:in `invoke_command'
4: from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/command.rb:27:in `run'
3: from /usr/local/Cellar/dinghy/4.6.5/cli/cli.rb:65:in `create'
2: from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:16:in `create'
1: from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:130:in `system_print'
/usr/local/Cellar/dinghy/4.6.5/cli/dinghy/system.rb:8:in `system_print': Failure calling `docker-machine create -d virtualbox --virtualbox-memory 2048 --virtualbox-cpu-count 1 --virtualbox-disk-size 100000 --virtualbox-no-share dinghy` (System::Failure)
I got another error creating.
The Solution
Turns out that Mac OS X was blocking Virtualbox, to fix I did the following:
- Open
Settings
>Security&Privacy
- Check for the blocking message, should be something similar to
System software from 'Oracle' developer was blocked from loading
- Click to
Allow
button - Destroy the previous maching:
dinghy destroy
- Create a new one
dinghy create --disk=100000 --provider=virtualbox