VM(oh) LOCAL VM(oh) vm - configuration, usage and tips TLDR vmctl create -s 50G disk.qcow2 vmctl start -m 1G -i 1 -b /bsd -d disk.qcow2 myvm vmctl show #will show mywm vmctl console myvm vmctl stop myvm TOC WORKING OS : OpenBSD, centos, archlinux, opensuse. SERIAL CONSOLE INTERNET ACCESS : vmd.conf PORT FORWARDING : Using pf. TODO SEE ALSO WORKING OS OpenBSD, centos, archlinux, opensuse. SERIAL CONSOLE Some linux distributions may not have the serial console enabled by default, the following is an example for Slackware lilo. 1. On the boot loader press tab. 2. type: huge.s serial 0 115200, console=ttyS0,115200 3. to disconnect from the console but keep the vm running: [ENTER] ~^d This has been tested on slackware, centos, archlinux, opensuse. INTERNET ACCESS host 1. allow forwarding. sysctl net.inet.ip.forwarding=1 2. vm.conf: vm vm_name { ... local interface } 3. pf.conf : this provides the vm with a dns. match out on egress from 100.64.0.0/10 to any nat-to (egress) pass in proto { udp tcp } from 100.64.0.0/10 to any port domain rdr-to 192.168.1.1 port domain 4. reload pf.conf: after this the vm will have internet access. pfctl -f /etc/pf.conf PORT FORWARDING The vm can be accessed through ssh from the host using the local interface: ssh 100.64.1.3 For external access, follow these steps: 1. allow external access (pc other than the host) using pf. pass in on egress proto tcp from any to any port [EXTERNAL_PORT] rdr-to [VM_IP] port [VM_PORT] 2. reload pf.conf: after this the vm will be accessible by other machines in the network. pfctl -f /etc/pf.conf example example : ssh host ip : 192.168.1.10 guest : 100.64.1.3 - pf.conf (on the host): pass in on egress proto tcp from any to any port 10122 rdr-to 100.64.1.3 port 22 - Reload pf.conf: pfctl -f /etc/pf.conf - ssh command: ssh -p 10122 192.168.1.10 TODO - test and document real host in the network. - slackware: unable to load virtio, it doesn't detect vda. This was an issue at some point, needs to be re-tested. - Verify parameters for other linux distributions. - Add permanent kernel parameters. - create vm to follow OpenBSD current upon 7.8 release. SEE ALSO pf(oh) , openbsd(oh) - OpenBSD manpages: vmctl(8) , vm.conf(5) , vmd(8) , rcctl(8) , pfctl(8) , pf.conf(5) links - OpenBSD FAQ - Virtualization: https://www.openbsd.org/faq/faq16.html - TuM'Fatig - Running Arch Linux using OpenBSD vmd(8): https://www.tumfatig.net/2019/running-arch-linux-using-openbsd-vmd8/ AUTHORS ohazot(oh) | about(oh) | ohazot.com: https://ohazot.com OpenBSD 7.7| Created:2025-10-03|Updated:2025-10-15| VM(oh)