Warning: liberal use of sudo going on here. It can be done better... [1]

sudo aptitude install qemu uml-utilities bridge-utils kvm-pxe

Add to /etc/network/interfaces (eth0 is the lan your dhcp/pxe server is on.):

auto br0
iface br0 inet dhcp
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

Bring up the interfaces, create a drive, and run qemu:

sudo ifup br0
qemu-img create -f qcow2 hda.qcow2 5G
sudo qemu -boot n -net tap -net nic hda.qcow2

I pxe boot the ubuntu net installer, which probes the video card. This is super slow on qemu, so I run it like so:

sudo qemu-system-x86_64 -boot n -net tap -net nic hda.qcow2 -vnc :0

[1] ...but I am not motivated to figure it out. If anyone wants to supply a more secure version, please do. Here is some more on that: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/103010

[2] more pxe roms: http://svn.savannah.gnu.org/viewvc/trunk/pc-bios/?root=qemu
[2.1] model=pcnet boot rom: wget http://svn.savannah.gnu.org/viewvc/*checkout*/trunk/pc-bios/pxe-pcnet.bin?root=qemu

See Also: QEMU docs: http://www.nongnu.org/qemu/user-doc.html

QemuPxe (last edited 2013-05-07 23:37:28 by carlfk)