Created
October 1, 2013 21:27
-
-
Save philips/6785381 to your computer and use it in GitHub Desktop.
Booting the CoreOS XEN PXE under qemu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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