Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'VBoxManage: error: Failed to create the host-only adapter' with Docksal v1.18.2 on macOS Ventura #1804

Open
eric-limjoco opened this issue Nov 25, 2023 · 4 comments
Assignees

Comments

@eric-limjoco
Copy link

Description

I recently updated my Mac to macOS Ventura 13.6.1 and Docksal to version 1.18.2 with VirtualBox 6.1.42. I'm now having an issue with fin system start.

Please let me know if I can provide any more information to help debug this issue. Thank you so much!

Steps to reproduce the issue:

  1. fin system start

Describe the results you received:

Configuring network settings...
Starting "docksal"...
(docksal) Check network to re-create if needed...
(docksal) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(docksal) 0%...
(docksal) Progress state: NS_ERROR_FAILURE
(docksal) VBoxManage: error: Failed to create the host-only adapter
(docksal) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(docksal) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(docksal) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(docksal) 
(docksal) 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
 ERROR:  Failed starting virtual machine

Describe the results you expected:

Expected virtual machine to start

Output of fin config:

fin config output
It looks like 'docksal' docker machine is not running.
Start it now? [y/n]: y
Starting "docksal"...
(docksal) Check network to re-create if needed...
(docksal) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(docksal) 0%...
(docksal) Progress state: NS_ERROR_FAILURE
(docksal) VBoxManage: error: Failed to create the host-only adapter
(docksal) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(docksal) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(docksal) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(docksal) 
(docksal) 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
 ERROR:  Failed starting virtual machine

Output of fin sysinfo:

fin sysinfo output
███  DOCKSAL
Docksal version: v1.18.2
fin version:     v1.113.2

███  OS
Darwin macOS 13.6.1
Darwin Erics-MBP.lan 22.6.0 Darwin Kernel Version 22.6.0: Wed Oct  4 21:25:26 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : VirtualBox VM
DOCKER_HOST : 

███  NFS
DOCKSAL_NFS_PATH : /Users

nfsd service is enabled
nfsd is running (pid 284, 8 threads)

NFS EXPORTS
----------

----------

Exports list on localhost:

███  DOCKER
Expected client version: 20.10.23
Expected server version: 19.03.5

Installed versions:

Client:
Version:           20.10.23
API version:       1.41
Go version:        go1.18.10
Git commit:        7155243
Built:             Thu Jan 19 17:35:19 2023
OS/Arch:           darwin/amd64
Context:           default
Experimental:      true

███  DOCKER COMPOSE
Expected version:  2.15.1
Installed version: 2.15.1

███  DOCKER MACHINE
Expected version: 0.16.2

Installed version:
docker-machine version 0.16.2, build bd45ab13

NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER    ERRORS
docksal   -        virtualbox   Stopped                 Unknown   
Error getting IP address: Host is not running

ERROR:  Docksal VM IP mismatch
       Expected IP: 192.168.64.100
       Actual IP  : 
       Try resetting the VM: fin system stop; fin system start
███  DOCKER: DOCKER IS NOT RUNNING


███  VIRTUALBOX
EXPECTED VERSION: 6.1.42
6.1.42r155177

███  HDD Usage
Error: Cannot run SSH command: Host "docksal" is not running
@lmakarov
Copy link
Member

Just checked on macOS Sonoma (14.1.1) with Docksal v1.18.2 and VirtualBox v6.1.40 and was not able to reproduce.

fin sysinfo output
❯ fin sysinfo

███  DOCKSAL
Docksal version: v1.18.2
fin version:     v1.113.2

███  OS
Darwin macOS 14.1.1
Darwin leonids-mbp-2.home 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : VirtualBox VM
DOCKER_HOST : tcp://192.168.64.100:2376

███  NFS
DOCKSAL_NFS_PATH : /Users

nfsd service is enabled
nfsd is running (pid 51850, 8 threads)

NFS EXPORTS
----------

# <ds-nfs docksal
/Users 192.168.64.100 -alldirs -maproot=0:0
# ds-nfs>
----------

Exports list on localhost:
/Users                              192.168.64.100

███  DOCKER
Expected client version: 20.10.23
Expected server version: 19.03.5

Installed versions:

Client:
 Version:           20.10.23
 API version:       1.40
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:35:19 2023
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:45 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

███  DOCKER COMPOSE
Expected version:  2.15.1
Installed version: 2.15.1

███  DOCKER MACHINE
Expected version: 0.16.2

Installed version:
docker-machine version 0.16.2, build bd45ab13

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
docksal   *        virtualbox   Running   tcp://192.168.64.100:2376           v19.03.5

███  DOCKSAL: PROJECTS
project   STATUS    virtual host   project root

███  DOCKSAL: VIRTUAL HOSTS

███  DOCKSAL: NETWORKING

DOCKSAL_IP: 192.168.64.100
DOCKSAL_HOST_IP: 192.168.64.1
DOCKSAL_VHOST_PROXY_IP:
DOCKSAL_DNS_IP:
DOCKSAL_DNS_DISABLED: 1
DOCKSAL_NO_DNS_RESOLVER: 1
DOCKSAL_DNS_UPSTREAM:
DOCKSAL_DNS_DOMAIN: docksal.site

███  DOCKSAL: CONNECTIVITY

Host to 192.168.64.100: 	PASS
Container to 192.168.64.100: 	PASS
Container to 192.168.64.1: 	PASS

Checking connectivity to http://dns-test.docksal.site...
Host: PASS
Containers: PASS

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID   IMAGE                     COMMAND                  CREATED          STATUS                    PORTS                                                    NAMES
0a129b8af10f   docksal/ssh-agent:1.4     "docker-entrypoint.s…"   15 seconds ago   Up 14 seconds (healthy)                                                            docksal-ssh-agent
6604b70cc5fe   docksal/vhost-proxy:1.8   "docker-entrypoint.s…"   16 seconds ago   Up 15 seconds (healthy)   192.168.64.100:80->80/tcp, 192.168.64.100:443->443/tcp   docksal-vhost-proxy

███  DOCKER: NETWORKS
NETWORK ID     NAME                  DRIVER    SCOPE
4025dcc60a67   _default              bridge    local
005219ce4e81   b2c-website_default   bridge    local
75a9a874930a   bridge                bridge    local
02760cd67786   d9_default            bridge    local
1ffbcb427679   host                  host      local
ddbbce9e3a40   none                  null      local

███  VIRTUALBOX
EXPECTED VERSION: 6.1.42
6.1.40r154048

███  DOCKSAL MOUNTS
192.168.64.1:/Users on /Users type nfs (rw,noatime,nodiratime,vers=3,rsize=1048576,wsize=1048576,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,hard,nocto,nolock,noacl,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.64.1,mountvers=3,mountport=662,mountproto=udp,local_lock=all,addr=192.168.64.1)

███  HDD Usage
Filesystem                Size      Used Available Use% Mounted on
/dev/sda1                46.1G      9.0G     34.7G  21% /mnt/sda1

Here are a few things that you can try:

  • Check the list of network adapters in VirtualBox and remove the ones that start with 192.168.64. (see here).
  • Reinstall VirtualBox
  • Install the most recent version of VirtualBox
  • Upgrade to macOS Sonoma (v14)

I'm also going to check VirtualBox v6.1.42 and v7.0.1 (most recent) with macOS Sonoma (I don't have a Ventura around).

@lmakarov lmakarov self-assigned this Nov 27, 2023
@lmakarov
Copy link
Member

lmakarov commented Nov 27, 2023

Checked VirtualBox v6.1.42 - ✅ OK

fin sysinfo output
❯ fin sysinfo

███  DOCKSAL
Docksal version: v1.18.2
fin version:     v1.113.2

███  OS
Darwin macOS 14.1.1
Darwin leonids-mbp-16.home 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : VirtualBox VM
DOCKER_HOST : tcp://192.168.64.100:2376

███  NFS
DOCKSAL_NFS_PATH : /Users

nfsd service is enabled
nfsd is running (pid 6422, 8 threads)

NFS EXPORTS
----------

# <ds-nfs docksal
/Users 192.168.64.100 -alldirs -maproot=0:0
# ds-nfs>
----------

Exports list on localhost:
/Users                              192.168.64.100

███  DOCKER
Expected client version: 20.10.23
Expected server version: 19.03.5

Installed versions:

Client:
 Version:           20.10.23
 API version:       1.40
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:35:19 2023
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:45 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

███  DOCKER COMPOSE
Expected version:  2.15.1
Installed version: 2.15.1

███  DOCKER MACHINE
Expected version: 0.16.2

Installed version:
docker-machine version 0.16.2, build bd45ab13

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
docksal   *        virtualbox   Running   tcp://192.168.64.100:2376           v19.03.5

███  DOCKSAL: PROJECTS
project   STATUS    virtual host   project root

███  DOCKSAL: VIRTUAL HOSTS

███  DOCKSAL: NETWORKING

DOCKSAL_IP: 192.168.64.100
DOCKSAL_HOST_IP: 192.168.64.1
DOCKSAL_VHOST_PROXY_IP:
DOCKSAL_DNS_IP:
DOCKSAL_DNS_DISABLED: 1
DOCKSAL_NO_DNS_RESOLVER: 1
DOCKSAL_DNS_UPSTREAM:
DOCKSAL_DNS_DOMAIN: docksal.site

███  DOCKSAL: CONNECTIVITY

Host to 192.168.64.100: 	PASS
Container to 192.168.64.100: 	PASS
Container to 192.168.64.1: 	PASS

Checking connectivity to http://dns-test.docksal.site...
Host: PASS
Containers: PASS

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID   IMAGE                     COMMAND                  CREATED          STATUS                    PORTS                                                    NAMES
266dab460a62   docksal/ssh-agent:1.4     "docker-entrypoint.s…"   23 seconds ago   Up 22 seconds (healthy)                                                            docksal-ssh-agent
06ef58c1d255   docksal/vhost-proxy:1.8   "docker-entrypoint.s…"   27 seconds ago   Up 26 seconds (healthy)   192.168.64.100:80->80/tcp, 192.168.64.100:443->443/tcp   docksal-vhost-proxy

███  DOCKER: NETWORKS
NETWORK ID     NAME       DRIVER    SCOPE
eb9ab01042d2   _default   bridge    local
ee5df112e96a   bridge     bridge    local
1d41b41bec8e   host       host      local
2097d5b56ab7   none       null      local

███  VIRTUALBOX
EXPECTED VERSION: 6.1.42
6.1.42r155177

███  DOCKSAL MOUNTS
192.168.64.1:/Users on /Users type nfs (rw,noatime,nodiratime,vers=3,rsize=1048576,wsize=1048576,namlen=255,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,hard,nocto,nolock,noacl,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.64.1,mountvers=3,mountport=799,mountproto=udp,local_lock=all,addr=192.168.64.1)

███  HDD Usage
Filesystem                Size      Used Available Use% Mounted on
/dev/sda1                46.1G    351.8M     43.3G   1% /mnt/sda1

Checked VirtualBox v7.0.12 - ❗ Failed.

The error is very similar, but not exactly the same as reported in this issue.

❯ fin system start
Configuring network settings...
Creating docker machine 'docksal'...
Running pre-create checks...
(docksal) Boot2Docker URL was explicitly set to "https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso" at create time, so Docker Machine cannot upgrade this machine to the latest version.
Creating machine...
(docksal) Boot2Docker URL was explicitly set to "https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso" at create time, so Docker Machine cannot upgrade this machine to the latest version.
(docksal) Downloading /Users/leonid/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso...
(docksal) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
(docksal) Creating VirtualBox VM...
(docksal) Creating SSH key...
(docksal) Starting the VM...
(docksal) Check network to re-create if needed...
(docksal) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(docksal) 0%...NS_ERROR_FAILURE
(docksal) VBoxManage: error: Failed to create the host-only adapter
(docksal) VBoxManage: error: Failed to execute '/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdpCtl add 2>&1' - exit status: 34304
(docksal) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(docksal) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 105 of file VBoxManageHostonly.cpp
(docksal)
(docksal) 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
 ERROR:  Proper creation of virtual machine has failed
         For details please refer to the log above.
         It is recommended to remove malfunctioned virtual machine.
Remove docksal? [y/n]: y
About to remove docksal
WARNING: This action will delete both local reference and remote instance.
Successfully removed docksal

This looks to be the root cause (starting with macOS Ventura v13) - https://forums.virtualbox.org/viewtopic.php?t=107680

On supported macOS hosts (Catalina+), VirtualBox 7.0.2 does not use KEXTs any more. In consequence, instead of the Host-Only Adapters the new Host-Only Networks have to be used (see 6.7. Host-Only Networking).

An then there is this problem with Host-Only Networks for VPN users:

It is also worth noting that on macOS Host-only Networks use bridges to dynamically manage traffic. VPNs lock route tables so Host-only Networks break when you connect to a VPN unless the VPN is configured to allow split tunnels (which should be rare these days). Host-only Adapters did not have this problem, but they are unavailable to anyone who has upgraded their Mac to Ventura and had to upgrade to VirtualBox 7.

This is a very serious Catch-22. It means no corporate user on a mac can use Host-only Networks, unless their corporate policy allows split VPN tunnels.


Downgrading back to VirtualBox v6.1.42 (from v7.0.12) fixed it for me and I'm able to start Docksal again.

Do not update to VirtualBox v7 for now (until we add support for Host-Only Networks - #1805).

@eric-limjoco
Copy link
Author

Thank you for help @lmakarov. Unfortunately I am not able to upgrade to macOS Sonoma on the machine I am using. Is there any way you can test on macOS Ventura? I thought Docksal 1.18.2 + VirtualBox 6.1.42 are supported on Ventura.

@lmakarov
Copy link
Member

@eric-limjoco Unfortunately, I only have an M1 Mac on macOS Ventura, which would not help. Downgrading my Intel Mac to Ventura is not feasible.

This is the first report of issues with VirtualBox on Ventura.
Have you tried reinstalling VirtualBox? Try installing the latest v6 version - https://download.virtualbox.org/virtualbox/6.1.48/VirtualBox-6.1.48-159471-OSX.dmg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants