shithub: docs.9front.org

ref: 839028221769682cfd5a75f4db92a6d35bd312e1
dir: /openbsd-vmm.md/

View raw version
Running 9front under OpenBSD VMM
================================

OpenBSD > 6.7 is required to run 9front.  At the time of writing that
requires running `-current`.

Read the [FAQ entry](https://www.openbsd.org/faq/faq16.html),
especially the networking part.

Since VMM doesn't provide any display functionality, 9front's console
has to be redirected to virtual serial port by adding `console=0` to
`plan9.ini`.  It makes sense to also use `display=none` while at it.

Note that even though you might not have a chance to modify
`plan9.ini` *before* booting, stopping boot process with an early hit
of a key, typing an additional configuration in, and then
`boot<ENTER>` is ought to work.  Running `drawterm` is out of scope
here though.

Example of `/etc/vm.conf`:

	vm "9front" {
		disable # "enable" if you're brave
		memory 2048M
		disk "/path/to/9front.qcow2"
		#cdrom "/path/to/9front.iso"
		owner your_username_here
		interface {
			lladdr 52:54:00:00:EE:03
			switch "uplink"
		}
	}

	switch "uplink" {
		interface bridge0
	}

If connecting from outside of the host is required, perhaps a tweak of
`/etc/pf.conf` might help:

	pass in on egress proto tcp from any to any port 564 rdr-to 10.0.2.2
	pass in on egress proto tcp from any to any port 567 rdr-to 10.0.2.2
	pass in on egress proto tcp from any to any port 17019 rdr-to 10.0.2.2

`10.0.2.2` is the IP address 9front VM gets, in this case, ie
`/etc/hostname.vether0` has `inet 10.0.2.1/24`.

Proper `/lib/ndb/local` is required.

## Notes

* to shut down the VM run `fshalt` *first*, then `vmctl stop 9front`