I recently got myself a M1 Mac and I want to run Linux on it. By reading the docker M1 tech preview release (<a href="https://www.docker.com/blog/download-and-try-the-tech-preview-of-docker-desktop-for-m1/" rel="nofollow">https://www.docker.com/blog/download-and-try-the-tech-previe...</a>), I was made aware of the existence of Virtualization.framework on recent macOS releases.<p>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.<p>Inspired by <a href="https://github.com/evansm7/vftool" rel="nofollow">https://github.com/evansm7/vftool</a>, 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.
Here is a previous discussion of a similar tool that also lists some of the limitations (like inability to use bridged networking without Apple's permission) of using Virtualization.framework: <a href="https://news.ycombinator.com/item?id=25382529" rel="nofollow">https://news.ycombinator.com/item?id=25382529</a><p>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)?
This is cool. Definitely going to test it. Years ago I’ve looked into something like this but found only find xhyve which looked a bit crude.<p>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.<p>To make things worse their 1 year subscription is blocking me from changing countries on app store. I hate that company to guts now.
So looking at: <a href="https://developer.apple.com/documentation/virtualization" rel="nofollow">https://developer.apple.com/documentation/virtualization</a>
I see that the host supports virtio for providing devices - but this is a hypervisor, not an emulator? You can't run amd64 VMs on m1 and vice-versa? Is there a "standard" 64bit arm target that means pre-built VMs are available? It should also be possible to run windows arm VMs?
For those looking for a UI and full desktop environment UTM has full support for the M1 now: <a href="https://github.com/utmapp/UTM" rel="nofollow">https://github.com/utmapp/UTM</a>
Wow. This is fantastic. I had no idea Virtualization.framework was a thing. I've installed and tested vmctl/vmcli out on my M1 MacBook Air. Your instructions worked like a charm.<p>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.
Thank you so much. I bit the bullet and bought an M1 Mac but I’ve been really missing a Linux VM for hackthebox etc and was having to route through a Dropbox droplet. This should solve my issue
Amazing, thank you! Looks much cleaner than virtualbox. I assume the performance is much better as well.<p>Any way to build it without installing xcode, just with xcode command line tools?