code: fqa.9front.org

Download patch

ref: ce27dcf7d6222d9ee763407c4fe153b8f1c87db6
parent: 2773fc4d20cf6a5ce7cc5e87b6cb2b241c3c0ecd
author: stanley lieber <[email protected]>
date: Fri Mar 9 17:10:49 EST 2018

add FQA 8.7.5.1 - Virtualization Using vmx(1) (thanks, qwx)

--- a/fqa.ms
+++ b/fqa.ms
@@ -1249,6 +1249,10 @@
 8.4.8 - drawterm
 .ihtml a
 
+.ihtml a <a href="fqa8.html#8.4.8.1">
+8.4.8.1 - Connect to Plan 9 from a mobile device
+.ihtml a
+
 .ihtml a <a href="fqa8.html#8.5">
 8.5 - Audio
 .ihtml a
@@ -1287,6 +1291,34 @@
 
 .ihtml a <a href="fqa8.html#8.7.4">
 8.7.4 - Commodore
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5">
+8.7.5 - PC
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1">
+8.7.5.1 - Virtualization Using vmx(1)
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1.1">
+8.7.5.1.1 Block Devices
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1.2">
+8.7.5.1.2 Ethernet
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1.3">
+8.7.5.1.3 OpenBSD
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1.4">
+8.7.5.1.4 Linux
+.ihtml a
+
+.ihtml a <a href="fqa8.html#8.7.5.1.5">
+8.7.5.1.5 Windows NT
 .ihtml a
 
 .ihtml a <a href="fqa8.html#8.8">
--- a/fqa8.ms
+++ b/fqa8.ms
@@ -1394,6 +1394,26 @@
 .B Note:
 The fork is the preferred version of drawterm for use with 9front because the old auth protocol is considered deprecated and the old CPU listeners are now disabled by default.
 
+.html - <a name="8.4.8.1" />
+.ihtml h3 <h3>
+.SH
+8.4.8.1 - Connect to Plan 9 from a mobile device
+.R
+.ihtml h3
+
+Use an SSH client to connect to a remote UNIX SSH server that can run the 9front fork's
+.CW
+drawterm -G:
+.R
+
+.ihtml a <a href="http://helpful.cat-v.org/Blog/2017/11/29/0/">
+.CW
+http://helpful.cat-v.org/Blog/2017/11/29/0/
+.R
+.ihtml a
+
+.FG iosprompt2openbsdtmuxdrawterm9front png
+
 .html - <a name="8.5" />
 .ihtml h2 <h2>
 .SH
@@ -1762,6 +1782,229 @@
 .ihtml a <a href="http://man.9front.org/1/commodore">
 .CW commodore(1)
 .ihtml a
+
+.html - <a name="8.7.5" />
+.ihtml h3 <h3>
+.SH
+8.7.5 - PC
+.R
+.ihtml h3
+.html - <br />
+.FG ibmpc jpg
+
+An emulator for PC compatible computers ships with the system:
+
+.ihtml ul <ul>
+.IP
+.ihtml a <a href="http://code.9front.org/hg/plan9front/file/3717d97f97b6/sys/src/cmd/vmx">
+vmx
+.ihtml a
+\(em virtual PC
+.LP
+.ihtml ul
+
+Read:
+.ihtml a <a href="http://man.9front.org/1/vmx">
+.CW vmx(1) ,
+.ihtml a
+.ihtml a <a href="http://man.9front.org/3/vmx">
+.CW vmx(3)
+.ihtml a
+
+.html - <a name="8.7.5.1" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1 - Virtualization Using vmx(1)
+.R
+.ihtml h3
+.html - <br />
+.FG vmxmulticat png
+
+.ihtml a <a href="http://man.9front.org/1/vmx">
+.CW vmx(1)
+.ihtml a
+simulates a virtual PC running a specified kernel file, by using
+virtualization extensions found on recent intel processors.
+Currently, only 9front and recent Linux and OpenBSD kernels are supported.
+
+The virtual PC is configured on \f(CWvmx(1)\fR's command line, and the hardware
+specified is seen as virtio devices.
+It will use one of the host's CPU cores, and will run on the same
+architecture as the host.
+
+Basic examples:
+
+• Boot amd64 kernel with 1 GB of RAM, a 9front iso as a disk, a network
+  interface through ether0 and a 640x480 framebuffer:
+
+.P1
+vmx -M 1G -d 9front.iso -n ether0 -v 640x480 /386/9pc
+.P2
+
+• Instead of a framebuffer, use
+.ihtml a <a href="http://man.9front/org/1/con">
+.CW con(1)
+.ihtml a
+to connect to the console:
+
+.P1
+window -scroll \'bind \'\'#|\'\' /n/p; \e
+	<>[3]/n/p/data1 {echo 3 >/srv/pipe; \e
+	con -r /n/p/data}\'
+vmx -c /srv/pipe -M 1G -d 9front.iso /386/9pc \'console=0\'
+.P2
+
+.html - <a name="8.7.5.1.1" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1.1 Block Devices
+.R
+.ihtml h3
+
+It may be desirable to attach a disk to the virtual PC.
+In this case, the \f(CW-d\fR flag may be used to point to a file to be used as a
+raw disk image.
+The file may be virtually anything so long as *vmx* can overwrite it.
+The flag may be specified multiple times.
+
+The common options here include plain files,
+.ihtml a <a href="http://man.9front.org/3/sd">
+.CW sd(3)
+.ihtml a
+disks, or ISO images.
+
+The fastest way to generate a big plain file is to create a sparse file.
+For example, to create a 4 GB sparse file with
+.ihtml a <a href="http://man.9front.org/1/dd">
+.CW dd(1) :
+.ihtml a
+
+.P1
+dd </dev/zero -of dicks -bs 1 -count 1 \e
+	-seek `{echo 4*1024*1024-1 | pc -n}
+.P2
+
+Using a real disk might yield somewhat faster performance.
+For example, using a USB:
+
+.P1
+vmx -d 9front.iso -d /dev/sdUxxxxx/data -v 640x480 /386/9pc
+.P2
+
+Use real disks with caution!
+.CW vmx
+may induce kernel panics in the guest, for instance through bugs or
+quirks in the virtio devices' implementation.
+Beware that the host crashing may also trash your disks -- for instance,
+giving the guest too much memory, which is always allocated in full on start
+up in a physical segment (see
+.ihtml a <a href="http://man.9front.org/2/segattach">
+.CW segattach(2)),
+.ihtml a
+will trigger an OOM on the
+host.
+
+.html - <a name="8.7.5.1.2" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1.2 Ethernet
+.R
+.ihtml h3
+
+If network connectivity is required, the \f(CW-n\fR parameter specifies an
+interface to bridge as a virtio ethernet card. \f(CWvmx(1)\fR will then send and receive traffic on this interface like the host.
+Wireless ethernet interfaces may also be used without any additional work.
+The interface can also be a dial string or a plain file.
+The emulated card's MAC address is random by default, and can be changed
+using an optional \f(CW!ea:\fR prefix.
+
+For example, to add bridge an ethernet interface and use \f(CWDE:AD:BE:EF:CA:FE\fR for the virtio device's MAC:
+
+.P1
+vmx -d 9.img -n ea:deadbeefcafe!ether0 -v 640x480 /386/9pc
+.P2
+
+.html - <a name="8.7.5.1.2" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1.3 OpenBSD
+.R
+.ihtml h3
+
+.ihtml a <a href="http://www.openbsd.org">
+OpenBSD
+.ihtml a
+kernels may change radically between releases.
+Only 6.1 and later have been tested.
+Keep in mind that the versions of the kernel passed to \f(CWvmx(1)\fR and the system
+provided on a disk must be in sync.
+
+Besides the various kernel files and optional devices, little is needed to
+coerce OpenBSD to work.
+
+To use the OpenBSD installer, first find a \f(CWbsd.rd\fR kernel.
+To then use an existing OpenBSD install, use a \f(CWbsd\fR kernel instead.
+A networked install may be used if an ethernet interface is specified on
+the command line: see OpenBSD's
+.ihtml a <a href="https://man.openbsd.org/vio">
+.CW vio(4)
+.ihtml a
+interfaces.
+Otherwise, an \f(CWinstall??.fs\fR file may be used as a disk.
+
+For example, to install OpenBSD 6.2 to a disk file using an install image,
+without graphics and using console for input and output:
+
+.P1
+vmx -d obsd.img -d install62.fs -v vesa:640x480 bsd.rd
+.P2
+
+Boot options are given as the kernel's command line.
+The root device is specified with the \f(CWdevice=\fR option, and if unset, is
+queried by OpenBSD's bootloader.
+
+To use VESA with X11, one must specify the -v argument with a vesa: prefix,
+one or more display modes, and set \f(CWmachdep.allowaperture=2\fR.
+Due to OpenBSD limitations, the VGA console will be blank on 386.
+
+Example usage:
+
+.P1
+vmx -M 1G -c /srv/pipe -n ether0 -d /dev/sdUa2595/data \e
+	-v vesa:640x480,800x600,1024x768 \e
+	bsd \'tty=com0\' \'device=sd0a\' \'db_console=on\'
+.P2
+
+.FG openbsdvmweb png
+
+.html - <a name="8.7.5.1.4" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1.4 Linux
+.R
+.ihtml h3
+
+You will need both a kernel and an initrd which will be used as a module.
+You must also specify the root disk on the kernel's command line.
+
+An example with Alpine Linux:
+
+.P1
+vmx -M 1G -n ether0 -d alpine-standard-3.6.2-x86_64.iso \e
+	-d alp.img -m initramfs-hardened -v vesa:800x600 \e
+	vmlinuz-hardened \'root=/dev/vda1\'
+.P2
+
+.html - <a name="8.7.5.1.5" />
+.ihtml h3 <h3>
+.SH
+8.7.5.1.5 Windows NT
+.R
+.ihtml h3
+
+.FG vmxntpaint png
+
+Classified.
 
 .html - <a name="8.8" />
 .ihtml h2 <h2>
binary files /dev/null b/ibmpc.jpg differ
--- a/mkfile
+++ b/mkfile
@@ -20,7 +20,7 @@
 appendixb.ps:
 		catgunsmoney.ps moneystacks.ps rubberbandmoney.ps
 appendixg.ps:
-		gsoc_bike.ps gsoc_patch.ps
+		gsoc_patch.ps
 
 appendixj.ps:	pie-in-face.ps
 
@@ -27,6 +27,7 @@
 appendixl.ps:	cosbyplusplus.ps csharp.ps golang.ps haskell.ps perl.ps php.ps python.ps rails.ps yes.ps
 
 appendixt.ps:
+		picarddesk1.ps picarddesk2.ps
 
 appendixz.ps:
 
@@ -56,7 +57,7 @@
 
 fqa7.ps:	openssl1.ps openssl2.ps orgchart.ps plan9network.ps upas.ps
 
-fqa8.ps:	acpi.ps betweenthelines.ps c64.ps cyclogram.ps danflavin.ps embraceextendextinguish.ps internet.ps linuxburden.ps mouse.ps mouse2.ps nintendo.ps rio-bell-labs.ps rio-custom.ps sega.ps using9front.ps what.ps wwwhat.ps
+fqa8.ps:	acpi.ps betweenthelines.ps c64.ps cyclogram.ps danflavin.ps embraceextendextinguish.ps ibmpc.ps internet.ps iosprompt2openbsdtmuxdrawterm9front.ps linuxburden.ps mouse.ps mouse2.ps nintendo.ps openbsdvmweb.ps rio-bell-labs.ps rio-custom.ps sega.ps using9front.ps vmxntpaint.ps what.ps wwwhat.ps
 
 fqa9.ps:	giveup1.ps giveup2.ps methods.ps sweat.ps yesno.ps
 
binary files /dev/null b/openbsdvmweb.png differ
binary files /dev/null b/vmxmulticat.png differ
binary files /dev/null b/vmxntpaint.png differ