
Vagrant and VirtualBox on Mac M2 Max are a no-no for now because of the arm architecture, which is not fully available yet. So, I decided to install it on my Ubuntu 22. I came across a few hurdles, so I am going to discuss how I managed to fix them.
Error: VirtualBox USB enumeration
The reason the error exists is because according to this blog https://www.techrepublic.com/article/fix-virtualbox-usb-error/, the Virtual Box must be a member of the vboxusers.
To fix this, run the command:
sudo usermod -aG vboxusers $USERClose the VirtualBox and restart the computer.
Error: Kernel driver not installed
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
'/sbin/vboxconfig'
as root.I tried doing sudo /sbin/vboxconfig but it didnt work and the error says:
Look at /var/log/vbox-setup.log to find out what went wrong.I found this:
gcc-12: not foundTo fix this, install gcc https://www.dedoimedo.com/computers/virtualbox-kernel-driver-gcc-12.html
Run the command again:
sudo /sbin/vboxconfigError: Vagrant box hashicorp/bionic64 not working
I tried adding the box but it failed. The error says Unrecognized archive format.
vagrant box add hashicorp/bionic64
I downloaded the box here: https://portal.cloud.hashicorp.com/vagrant/discover/ubuntu/bionic64 and tried adding the box manually.
vagrant box add --name ubuntu/bionic64 bionic-server-cloudimg-amd64-vagrant.box
vagrant init ubuntu/bionic64
vagrant up
Check the VM.


Check the vagrant status.

That’s it!
