Member-only story
Running Virtual Machines Under Vagrant on the New Mac M1/M2/M3
Finding a working VM alternative when VirtualBox no longer works
If you’ve landed on this article, you may have recently upgraded to a shiny new Macbook Pro or similar running the new M1 processor.
What nobody probably told you before you pressed the ‘Buy now’ button was that all your existing x86–64 machine you’d lovingly built using Vagrant and Virtualbox would no longer run!
Why doesn’t it work?
The main reason your virtual machines don’t run anymore is that VirtualBox runs as a hypervisor on your Mac, relying on the underlying processor to execute instructions rather than providing processor emulation through software.
This is important because older Intel versions of the Mac were able to run x86–64 versions of your favorite apps directly on the underlying hardware. The new M1 is a different chip-set entirely (ARM), and as VirtualBox is not a CPU emulator there is no way it can run those existing images for you.
Moving away from VirtualBox
After researching the topic in-depth at the end of 2021, I felt had relatively few viable options.
The ‘quickest’ option to get the machines running again was to migrate my VirtualBox .vdi files to an open format such as .qcow2 and run them under a true emulator such as UTM.
This is likely your best if you need to launch your virtual machine quickly with minimum changes. It is also likely your only real option for Windows VM’s due to the fact there is no commercially available version of Windows (yet) that can be legally purchased to run on ARM.
There are other helpful articles out there discussing this particular solution, but after installing UTM the command you are probably looking for is this:
qemu-img convert -f vdi -O qcow2 myvirtualbox.vdi myreplacementvm.qcow2
You can then attach the new .qcow2 disk and boot up.
Why wouldn’t you do this?
It’s slow — much slower than running a Hypervisor. It’s an amazing feet of engineering and I’m truly grateful to those…