What does HackerNews think of vftool?

A simple macOS Virtualisation.framework wrapper

Language: Objective-C

As an alternative, here's a really minimalist command-line wrapper to run VMs in the macOS Virtualization.framework: https://github.com/evansm7/vftool
I've been using vftool with arm64 Ubuntu server cloudimg. Directly uses the virtualization framework, easy to work with once you get it going.

https://github.com/evansm7/vftool

my command: vftool -k vmlinuz -i initrd -d disk.img -p 4 -m 2048 -a "console=hvc0 irqaffinity=0 root=/dev/vda"

Linux can be run on Virtualization.framework on Mac M1 without qemu [1].

Would it be possible to run FreeBSD similarly without qemu?

[1] https://github.com/evansm7/vftool

VMs work. Qemu is working with patches. You have to build it though. None of the releases seems to be patched yet. There is an early preview of Parallels. Both Linux and Windows on Arm are working. Docker has an early release as well. There are few prebuilt projects on Github too:

https://github.com/evansm7/vftool

https://github.com/KhaosT/SimpleVM

https://github.com/ubenmackin/ACVM

I needed to add a persistent network configuration (which I didn't really figure out -- I was okay with starting an interface manually. I also had to re-generate the SSH host keys for some reason.

In order to do these, I loaded the image in initramfs (basically started the VM w/o specifying root=/dev/vda as the command line argument). Then I mounted /dev/vda and chroot'd to it. Then I could change the root password to something that I knew, and setup the keys / config.

So, instead of tweaking the setup script, I ended up making the changes manually, but it should be scriptable.

I also was able to use the Ubuntu kernel/initrd to load a Debian 10 image as well. The default Debian 10 cloud image doesn't include the necessary kernel modules (virtio_console might be the only one necessary to add).

I've spent a few days testing out this and the linked vftool (https://github.com/evansm7/vftool) to try to get a Debian VM. It's not an easy thing, but it did eventually work. I ended up corrupting the disk image though, so that wasn't fun.

In order to do this on my Mac w/o needing a Linux machine, I installed ext4fuse so that I could mount raw disk images and mount partitions. I followed instructions from this GH issue, which was a great help.

https://github.com/evansm7/vftool/issues/2