I was wondering about the status of OpenBSD's vmm(4) hypervisor.
Is it ready for some limited use, say, testing a port in an i386
VM on an amd64 host?

(TL;DR: nope.)

There's little information, so I decided to give it a try after
reading the various vmm(4), vm.conf(5), vmd(8), vmctl(8), virtio(4),
etc. man pages.

First, you need to build a kernel with vmm(4).  It is not enabled
in GENERIC yet.  You also need an up-to-date /dev since vmd opens
/dev/vmm and /dev/tap0.

Next: Start vmd, create a disk image (can you use a raw partition
instead?), spin up a VM with an amd64 bsd.rd kernel I had at hand.

# /etc/rc.d/vmd -f start
# vmctl create /home/bardioc.img -s 4G
# vmctl start -c -k /bsd.rd -m 1G -d /home/bardioc.img -i 1

Something's happening!  There's a copyright message.  And that's
it...  I was about to give up when the bsd.rd kernel continued,
successfully booted, and allowed to drop me into a (S)hell.

Observation: vmd completely hogs one CPU core even if the guest
isn't doing anything.

Next step: networking.  As expected, a vio0 interface showed up
inside the VM, but the man pages don't explain how to connect this
to the outside.  Since I had noticed that vmd opens tap0, I created
a bridge on the host and added tap0 and a real interface.  I don't
know if that's the intended way, but after manually configuring an
IP address on vio0, I could ping other machines from the guest. \o/

ping also showed that time was running three times slower in the
VM than on the outside.  Uh-oh.

I deleted the inet configuration from vio0 and started the installer.
I got as far as the network configuration, when the guest kernel
died with an UVM error--and my patience along with it.

So, yeah, interesting but not useful yet.

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to