Running 9front on OpenBSD vmd


Home
OpenBSD 6.8 was just released, and it included a few fixes to vmd that allows us to run 9front without crashing so here goes nothing.
First, download the latest amd64 ISO from 9front and create a disk image for 9front with vmctl create. I went for 24 Gigs. The next step is to add edit the file /etc/vm.conf with a suitable entry for 9front like this>
vm "9front" {
        disable
        cdrom "/vms/9front.iso"
        disk "/vms/9front.disk"
        memory 512M
        interface {
                switch "uplink"
                lladdr 00:20:91:ff:ee:04
        }
        owner pk
}


switch "uplink" {
        interface veb0
}
A few things are important here. vmd sets a random mac every time you boot up a vm, which confuses 9front. You have to set a static mac with lladdr. I use the NSA OUI(002091) here because, why not? Next, you have to connect the vm to the network. I chose a bridge here, as 9front does not play nice with vmd's internal dhcp server. how to set that up is left as an exercise for the reader. 512M of memory is enough for most use cases unless you want to run Go.
Now we are ready to install. Boot into 9front with vmctl start 9front -c and hit space when you see activity on the screen until the loader drops to a prompt. Enter console=0 b115200 /enter boot and ignore any weird responses. this should redirect any output to the virtual console. From this point on it's just a normal 9front install, refer to the faq for how to proceed. When asked for the filesystem to use try hjfs. IMHO it is simpler than cwfs and quite stable. After you reboot into your fresh 9front hit space again to drop into the boot prompt and type service=cpu /enter boot. Now you can connect via drawterm and configure the rest of your system. Consult the fqa about the rest and have fun!.