tomclegg.net |
Xen 4.1 guest config for monowall Posted May 12, 2013 With serial console on "xm console". Use generic-pc-serial image. Patch --- /etc/xen/scripts/vif-common.sh.orig 2013-04-19 04:34:08.000000000 -0700 +++ /etc/xen/scripts/vif-common.sh 2013-05-12 23:38:08.000000000 -0700 @@ -98,7 +98,9 @@ vifname="${vifname}-emu" if [ "$command" == "add" ] && ! ip link show "$vifname" >&/dev/null then + ip link set "$dev" down do_or_die ip link set "$dev" name "$vifname" + ip link set "$vifname" up fi dev="$vifname" fi Dedicate one of dom0's network interfaces to monowall's WAN interface to ensure your DHCP leases match the MAC addresses on the wire (this is necessary for Telus and presumably other ISPs too). See # /etc/network/interfaces auto lo br0 br1 iface lo inet loopback iface br0 inet static address 10.9.8.20 netmask 255.255.255.0 gateway 10.9.8.1 bridge_ports eth0 iface br1 inet static address 0.0.0.0 bridge_ports eth1 post-up /sbin/ifconfig eth1 up hw ether fe:ff:ff:ff:ff:ff Either reboot or run In your guest config, use eth1's real mac address as vif_gw1's emulated mac address: kernel = '/usr/lib/xen-4.1/boot/hvmloader' builder = 'hvm' memory = 128 device_model = '/usr/lib/xen-4.1/bin/qemu-dm' vif = ['mac=2:3:4:5:6:7, bridge=br0, vifname=vif_gw0, type=ioemu', 'mac=co:py:fr:om:et:h1, bridge=br1, vifname=vif_gw1, type=ioemu'] disk = ['phy:/dev/mapper/vg0-gw--root,ioemu:hda,w'] boot = 'c' serial = 'pty' name = 'gw' vcpus = 1 1 Otherwise you get:
|