By default, there are only four tap interfaces. We need to create sufficient devices for all our virtual machines:

# cd /dev
# for i in $(jot 50 4 50); do sh MAKEDEV tap$i; done

We need to increase arpq because we may have so many virtual machines on the same switch:

# sysctl net.inet.ip.arpq.maxlen=1024
# echo "net.inet.ip.arpq.maxlen=1024" >> /etc/sysctl.conf

We will need to permit IPv4 and IPv6 forwarding for our virtual machines:

# sysctl net.inet.ip.forwarding=1
# echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf
# sysctl net.inet6.ip6.forwarding=1
# echo "net.inet6.ip.forwarding=1" >> /etc/sysctl.conf

Next we must create /etc/hostname.bridge0:

add if0

where if0 is the interface device.

We edit /etc/vm.conf:

socket owner :vmdusers

switch "switch0" {
    interface bridge0

vm "user123" {
    owner user123
    memory 512M
    cdrom "/home/iso/install68.iso"
    disk /home/user123/user123.qcow2
    interface { 
        locked lladdr aa:bb:cc:dd:ee:01
        switch "switch0"

Next we will need to download our ISO for OpenBSD.

$ doas useradd -m -g =uid -c "iso" -d /home/iso -s /sbin/nologin iso
$ ftp https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso
$ ftp https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/SHA256.sig
$ signify -C -p /etc/signify/openbsd-68-base.pub -x SHA256.sig install68.iso
Signature Verified
install68.iso: OK
$ doas mv install68.iso /home/iso/
$ doas mv SHA256.sig  /home/iso/
$ doas chown -R iso:iso /home/iso/

If the signature does not verify, don't proceed.

We will want to enable and start vmd:

$ doas rcctl enable vmd
$ doas rcctl start vmd  

We need to create a new group vmdusers for each of our users so they can access the serial console:

# groupadd vmdusers
# chown root:vmdusers /var/run/vmd.sock

For each virtual machine, we create a user and a disk image using install.pl:

$ ./install.pl
# vmctl create -s 20G user.qcow2

You will need to add this crontab entry for a user to prevent the networking from timing out:

For openbsd:

@reboot /usr/bin/tmux new -d 'while true; do /sbin/ping -i5; done' \;

For debian:

@reboot /usr/bin/tmux new -d 'while true; do /usr/bin/ping -i5; done' \;

If some users are using the wrong IPs, you can run tcpdump with the -e flag to show the lladdr of tcp packets.