Installing in Xen

These instructions are for Xen 2.0. See installing in xen 3.0 for Xen 3.0 instructions.

INSTALL XEN

	xend start
	antispoof=no /etc/xen/scripts/network start
Note: I've had trouble with the antispoofing additions to the iptables rules so I leave them out.
	linux$ echo 1 >/proc/sys/net/ipv4/ip_forward

CREATE A PLAN9 DOMAIN

	 linux$ mkdir /usr/xen9
	 linux$ cd /usr/xen9
	 linux$ mv /somepath/9xeninst .
	 linux$ mv /somepath/9xenf .
	 linux$ mv /somepath/plan9.iso .
	 linux$ dd if=/dev/zero of=plan9.img seek=$((1024 * 1024 * 1024 - 1)) bs=1 count=1
	 linux$ cat > /etc/xen/plan9inst
	 kernel = "/usr/xen9/9xeninst"
	 builder = "plan9"
	 memory = 96
	 name = "plan9"
	 cpu = -1
	 nics = 1
	 vif = [ 'mac=aa:00:10:00:00:10, bridge=xen-br0' ]
	 disk = [ 'file:/usr/xen9/plan9.img,loop0,w',
	          'file:/usr/xen9/plan9.iso,loop1,r' ]
	 ip = "1.2.3.4/24"		# <- IP you will give to xen9
	 restart = 'never'
	 console = 999
	 
	 # This is the equivalent of plan9.ini:
	 extra="""
	 nobootprompt=local!/boot/bzroot
	 bootfile=sd01!cdboot!bootdisk.img
	 """
	 ^D
	 linux$ xm create plan9inst -c
	 ...
	 % inst/textonly
	 ...
	 ^T^Tr      <- to reboot when you're done
	 linux$ cat > /etc/xen/plan9
	 kernel = "/usr/xen9/9xenf"
	 builder = "plan9"
	 memory = 96
	 name = "plan9"
	 cpu = -1
	 nics = 1
	 vif = [ 'mac=aa:00:10:00:00:10, bridge=xen-br0' ]
	 disk = [ 'file:/usr/xen9/plan9.img,loop0,w' ]
	 ip = "1.2.3.4/24"		# <- IP you will give to xen9
	 restart = 'never'
	 console = 999
	 
	 # This is the equivalent of plan9.ini:
	 extra="""
	 nobootprompt=local
	 """
	 ^D
	 linux$ xm create plan9 -c
	 % cd /sys/src/9/xenpc && mk 'CONF=xenf'