Cannot run any Trellis/VirtualBox VM's on Ventura

Since the upgrade to Ventura (Intel iMac), I cannot trellis up any existing projects on this box. Here’s where I am at present:

  1. Error output upon trellis up:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

exit status 1
  1. Complete output upon trellis up:
Starting galaxy role install process
- composer (1.9.0) is already installed, skipping.
- ntp (2.3.1) is already installed, skipping.
- logrotate (v0.0.5) is already installed, skipping.
- swapfile (v2.0.36) is already installed, skipping.
- mailpit (v1.0.0) is already installed, skipping.

Running command => vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-22.04' version '202303.13.0' is up to date...
==> default: A newer version of the box 'bento/ubuntu-22.04' for provider 'virtualbox' is
==> default: available! You currently have version '202303.13.0'. The latest is version
==> default: '202404.23.0'. Run `vagrant box update` to update.
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

exit status 1
  1. macOS: 13.6.6 (22G630)
  2. Trellis CLI: 1.11.1
  3. Vagrant: 2.2.18
  4. VirtualBox: 6.1.30r148432

Some of the things I’ve tried:

  1. Several versions of Vagrant (including 2.2.18, 2.2.19, and 2.3.0)
  2. Several versions of VirtualBox (including 6.1.28, 6.1.30, 6.1.50, and one of the 7’s)

With later versions, I did see different errors, including errors relating to Vagrant plugins not being available/etc (repair and reinstall attempts failed), and some of the digging I did in those cases seemed to suggest that the available ruby is not sufficient (somewhat similar to the case I outlined in Cannot run any Trellis/Parallels VM's on Sonoma).

For now, I’m really stuck. Any and all pointers are appreciated.

Are you having the same issues if you try to spin up a fresh Trellis project, or is it only on existing ones?

I haven’t tried new projects yet (was hoping to get this worked out first). But since you ask, I’ll work on one this weekend, and report back (I have several candidates in the queue anyway).

If you can think of anything specific I should watch for, please let me know, and I’ll follow up accordingly.

I had this bookmarked from a previous run-in with VBoxManage, and it looks like it matches one of the error lines in your output:

Maybe the restart or permissions check described there would help? The kernel extensions from Oracle that VirtualBox needs seem to be wonky on macOS these days.

Thank you @andronocean for the new lead!

When I run sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist, I get:

Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.

I see a lot of discussion online about plist problems, but I can’t find an example that seems to apply to this situation. @andronocean, do you happen to have any additional/related bookmarked materials from your past run-in with VBoxManage that may be applicable?

I did retry trellis up anyway, BTW, with the same results.

This (the originally reported problem) is happening with new projects as well.

The only other thing I had in conjunction with the VBoxManage part was a note to check the Virtualbox Extensions pack and Guest Additions. I don’t recall though if I did, or what I found, or if that changed anything :confused:

I usually try to stay as far away from launchctl as possible, ha! Not an expert on it by any means. Do you get any more useful info by running sudo launchctl bootstrap /Library/LaunchDaemons/org.virtualbox.startup.plist ?

One time that VirtualBox x Vagrant stopped working for me, I “fixed” it by completely uninstalling VB and all components (clear everything I could find in ~/Library, I’m guessing I also removed the system profile too). Then rebooted the machine* and did a fresh install. I’m not sure if I also uninstalled Vagrant.

*Edit: reboots are often important in these scenarios to make sure nothing funky sticks around in memory.