[addendum: per u/pm215 Hypervisor.Framework does still apparently exist and supported on apple silicon apparently, I assume the absence of hardware docs just makes it miserable. OTOH maybe the Asahi GPU drivers, etc can work in that model? I really haven't ever done anything substantially more than what the WWDC demos do so am not a deep fount of knowledge here :D, to avoid confusion with replies I have not edited or changed my original comment. I kind of wish that HN UX exposed edit histories for comments, or provided separate addendum/correction options]
Virtualization.Framework is how you have to do virtualization on apple silicon as it is the userspace API layer that interacts with the kernel. There is no API you can use.
Virtualization.Framework is pretty much everything you need out of the box for a generic "I have an isolated virtual machine" model, basically it's just missing a configuration UI and main()
There are a couple of WWDC sessions over the last few WWDCs on using the framework, configuring rosetta, and improvements in the 2023 OS update
“This sample configures a virtual machine for a Linux-based operating system. You run the sample from the command line, and you specify the locations of the Linux kernel to run and initial RAM disk to load as command-line parameters. The sample configures the boot loader that the virtual machine requires to run the guest operating system, and it configures a console device to handle standard input and output. It then starts the virtual machine and exits when the Linux kernel shuts down.”
Interesting! I really need a cheap way to spin up an Apple Silicon container to create binaries for an open source project on GitHub. I don't want to spend money on an Apple Silicon runner in GitHub and I also don't want to run the build directly on my M2 MacBook Pro along with my other development work.
Virtualization.Framework is how you have to do virtualization on apple silicon as it is the userspace API layer that interacts with the kernel. There is no API you can use.
Virtualization.Framework is pretty much everything you need out of the box for a generic "I have an isolated virtual machine" model, basically it's just missing a configuration UI and main()
There are a couple of WWDC sessions over the last few WWDCs on using the framework, configuring rosetta, and improvements in the 2023 OS update
https://developer.apple.com/videos/play/wwdc2022/10002 https://developer.apple.com/videos/play/wwdc2023/10007
[1] commercial VM products probably require more work to compete in the market, things like the transparent desktop, window hosting, etc