assuming the host is up and running already
as user (assuming you’re a member of the libvirt group)
guest=obsd69
osinfo-query os | grep openbsd | tail -2
variant=...
mkdir -p /data/guests/$guest/
cd /data/guests/$guest/
virt-install \
--name $guest \
--vcpus 2 \
--ram 256 \
--disk path=/data/guests/$guest/$guest.qcow2,size=8,bus=virtio \
--cdrom /data/ISO-IMAGES/install69.iso \
--network bridge=virbr0,model=virtio \
--os-variant $variant \
--graphics vnc --noautoconsole
and select serial console during installation
now check that serial console works
virsh console obsd69
pre-define some libvirt interface and shut the machine down to eventually use it as a template
e.g. for OpenBSD
vi /etc/myname
obsd
vi /etc/hostname.vio2
inet 192.168.122.19/24 up
vi /etc/hosts
192.168.122.19 obsd
shutdown -p now
virsh undefine obsd69
ls -lhF /data/kvm/obsd69.qcow2
start from scratch
virsh destroy obsd69 virsh undefine obsd69 rm -f /data/kvm/obsd69.qcow2
in case you didn’t get the chance to get a serial console already
vi /etc/boot.conf
set tty com0
vi /etc/ttys
tty00 "/usr/libexec/getty std.9600" vt220 on secure
https://www.cyberciti.biz/faq/kvmvirtualization-virt-install-openbsd-unix-guest/
https://bobcares.com/blog/install-openbsd-as-guest-operating-system-using-kvm-virt-install/
http://daemonforums.org/showthread.php?t=8791
https://www.cyberciti.biz/faq/howto-linux-delete-a-running-vm-guest-on-kvm/
https://computingforgeeks.com/use-virt-manager-as-non-root-user/