Debian on OpenBSD vmd (without qemu or another debian system)

Setup

vmd(8) config, need working network and internet connection.
/etc/vm.conf
ROOT="/home/debian" vm "debianinstall" { disable memory 1024M disk $ROOT/boot.img disk $ROOT/disk0.raw interface { switch "uplink" } owner debian } vm "debian" { disable memory 1024M disk $ROOT/disk0.raw interface { switch "uplink" } owner debian } switch "uplink" { interface bridge0 }

Preparation of install media

Use the hd-boot image with a patched xen initrd. Adding virtio modules to the ramdisk. Switching the bootloader to serial console mode.
ftp http://ftp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/hd-media/boot.img.gz
ftp http://ftp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/xen/initrd.gz
ftp http://ftp.debian.org/debian/pool/main/l/linux/virtio-modules-4.9.0-7-amd64-di_4.9.110-1_amd64.udeb
gzip -d initrd.gz
mkdir stretch
cd stretch
ar -x ../virtio-modules-4.9.0-7-amd64-di_4.9.110-1_amd64.udeb data.tar.xz
xz -d data.tar.xz
tar xf data.tar
rm data.tar
find . | cpio -o -A -H sv4cpio -O ../initrd
cd ..
gzip -9 initrd
gzip -d boot.img.gz
doas vnconfig vnd1 /home/ben/Projects/vmm/debian/boot.img
doas mount /dev/vnd1i /mnt
doas cp initrd.gz /mnt/INITRD.GZ
doas vi /mnt/TXT.CFG
	-	append vga=788 initrd=initrd.gz --- quiet ^M
	+	append vga=off initrd=initrd.gz --- quiet console=ttyS0,115200n8 ^M
doas umount /mnt
doas vnconfig -u vnd1

Starting the install

In the bootloader use the text install. Need to load the virtio modules first before starting the install procedure.
vmctl start debianinstall -c
	Grub -> Install
	Installer -> Press ESC -> Execute a shell
		depmod
		modprobe virtio_pci virtio_blk
		lsmod
		exit
	Continue install

First boot

Most probably need to edit the boot entry because /dev/vdb has changed to /dev/vda. Also the network card changed name from enp0s4 to enp0s3.