teapot_uid="${UID}"
teapot_gid="${UID}"
ip tuntap add \
dev tap-teapot0 mode tap \
user "${teapot_uid}" group "${teapot_gid}"
qemu-system-i386 \
-nodefaults -no-user-config -nographic \
-machine pc -cpu kvm32 -smp 1 -m 512 \
-enable-kvm \
-no-reboot \
-kernel ./kernel.bin \
-initrd ./initrd.cpio \
-append 'console=hvc0 panic=1 sysrq=1' \
-mon chardev=null \
-device virtio-serial-pci,id=serial0,max_ports=1 \
-device virtconsole,id=console0,bus=serial0.0,chardev=stdio \
-device virtio-net-pci,id=network0,netdev=network0 \
-device virtio-blk-pci,id=block0,drive=os-bundle \
-chardev null,id=null,mux=on \
-chardev stdio,id=stdio,signal=on,mux=on \
-netdev tap,id=network0,ifname=tap-teapot0,script=no,downscript=no \
-drive id=os-bundle,if=none,file=./os-bundle.tar,format=raw,readonly
http://cdimage.ubuntu.com/ubuntu-core/precise/daily/current/precise-core-i386.tar.gz