The libvirt, QEMU, Virtualization.framework stack is getting close on macOS. I just wish it didn’t involve non-upstreamed formulae.
QEMU recently merged support for Apple Silicon and the Virtualization.framework, so hopefully once that’s released the Homebrew formula will be updated to that version and then you won’t have to build QEMU from scratch.
I haven’t looked into why libvirt needs patching.
A working virt-install homebrew package would be the cherry on top for this workflow on macOS. It would completely remove the hand-crafted XML step. I highly recommend incorporating a cloud-init ISO to this workflow, as it will remove the manual setup over VNC. Although, I might be biased as I tend to only use headless VMs.
I agree re: the cherry on top. Do you know of any good references for cloud-init similar to this usecase. Would great for a situation I’m working with.
I’m not an expert, but this is almost entirely how I use cloud-init for my VMs at home:
The meta-data file:
$ cat > meta-data <<EOF
The more useful user-data file:
$ cat > user-data <<EOF
- name: <your_username>
sudo: ALL=(ALL) NOPASSWD:ALL
Create an ISO:
$ genisoimage -output seedci.iso -volid cidata -joliet -rock user-data meta-data
Then you can download a cloud image and pass the seedci.iso file generated in that last step as a cdrom drive.
Anything more complicated than this and I would need to go to the cloud-init documentation or look up tutorials.