Skip to content

Instantly share code, notes, and snippets.

@philips
Created October 1, 2013 21:27
Show Gist options
  • Save philips/6785381 to your computer and use it in GitHub Desktop.
Save philips/6785381 to your computer and use it in GitHub Desktop.
Booting the CoreOS XEN PXE under qemu
#!/bin/bash
XEN=xen-4.1-amd64
KERNEL=vmlinuz.coreos.xen
INITRD=coreos_developer_pxe_image.cpio.gz
COREOS_ARGS="root=squashfs: state=tmpfs:"
XEN_ARGS="console=hvc0 earlyprintk=xen"
CPU=host
# Qemu can't deal with gzip'd kernels
if [ ! -f ${XEN} ]; then
gunzip ${XEN}.gz
fi
exec qemu-system-x86_64 -m 1024 \
-machine accel=kvm,kernel_irqchip=off -cpu $CPU \
-kernel $XEN -append "console=com1 noreboot" \
-net nic,vlan=0,model=e1000 \
-net user,vlan=0 \
-initrd "$KERNEL $COREOS_ARGS $XEN_ARGS,$INITRD" \
-nographic "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment