toyvm is a toy virtual machine that runs Linux on macOS using Apple's Virtualization framework. It supports Apple Silicon and Intel Macs running macOS Monterey or later.
There's a short video demo of toyvm running Debian on an M1 Mac mini here.
As well as toyvm itself, kernel, initial ram disk and root filesystem images are needed to build a working system. See debian-vm-build for pre-built ones for Debian Buster on Apple Silicon, and the scripts used to produce them.
Create a VM bundle and start it:
toyvm create --kernel vmlinuz --initrd initrd.img --disk 20G myvm \
root=/dev/vda1 console=hvc0 nosplash
toyvm start myvmList all VMs stored in ~/.toyvm:
toyvm lsNote: Use
--to separate toyvm options from kernel arguments that begin with-(e.g.toyvm start myvm -- -single).