Agree that documentation on qemu is very messy, especially on macOS. (I ran similar experiments with it earlier this year.)
erredois 1 day ago||
I have been using ubuntu cloud image with cloud-init to achieve something similar, but will try this method as well.
csdvrx 1 day ago||
This approach works even better with a firecracker-style linux kernel (faster to start), and with cosmopolitan binaries (so you can do qemu tests not just with linux): a bash cosmopolitan binary is useful if you want to test your bash shell scripts in qemu