shithub: docs.9front.org

Download patch

ref: 41fb5fc4173dedc6ee20920f3e95e98d0108b8fc
parent: 2521f73f23e9c890fc583ca207c9cbb30ee3e6c0
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Jul 29 19:32:30 EDT 2020

more openbsd stuff

--- a/openbsd-vmm.md
+++ b/openbsd-vmm.md
@@ -1,9 +1,56 @@
 Running 9front under OpenBSD VMM
 ================================
 
-OpenBSD > 6.7 is required to run 9front. At the time of writing that
+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.
+`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`