Virtualization.framework provides 99% of the building blocks for running a Linux VM on a Mac, but there’s no off-the-shelf CLI for running a VM.
Inspired by https://github.com/evansm7/vftool, I wrote another CLI (vmcli) with some more features (better termios handling / escape sequence detection) in Swift, and build a script (vmctl) to daemon-ize vmcli and help manage VMs. I also made a script for provisioning a Ubuntu VM, so you can run a Ubuntu VM from scratch in minutes.
FYI - for an Intel Mac at least, the Ubuntu script needed a little manual tweaking, but the script was more than enough to get a VM working. Thanks!
I am personally more interested in tools that are based on Hypervisor.framework (which as I understand offers lower-level support for virtualization). Anyone knows what is the current state of Qemu support for M1 (last time I heard there were some out-of-tree patches)?
Oh how I long for the days when the most controversial thing about Mac OS X was that it included some, gasp, GNU tools.
It's not 1997 anymore. Security needs have changed over time.
With modern systems, running unknown code is vastly riskier than it was 20 years ago.
Ended using Parallels Desktop Lite which to my understanding is a GUI to VF. Used to be free for Linux VMs then they’ve changed to yearly subscriptions. And they charge premium for a year of their glorified virt-manager.
To make things worse their 1 year subscription is blocking me from changing countries on app store. I hate that company to guts now.
No, Parallels has its own hypervisor as a kernel module (mainly used pre-Big Sur) and can use Hypervisor Framework (mainly used with Big Sur). It also emulates a lot of hardware.
Virtualization Framework only supports booting Linux VMs with minimal hardware emulation at the moment. It is only available on Big Sur.
Hopefully QEMU 6.0 will include ARM support for the low-level Hypervisor.framework and you should be able to run both Linux and Windows with it.
Edit: I don't see the option to list running VMs though. I was hoping to check that powering off the VM worked. The inability to ping the VM tells me it is off, but if I didn't have the IP, I don't know how I would check this.
Sorry.. that was HVK. VK is newer
Has anyone tried running this on an intel Mac?
Any way to build it without installing xcode, just with xcode command line tools?