Skip to content

Instantly share code, notes, and snippets.

@rewritten
Last active April 2, 2016 06:51
Show Gist options
  • Save rewritten/80af303fd49d424f8a16dec8e23af9cc to your computer and use it in GitHub Desktop.
Save rewritten/80af303fd49d424f8a16dec8e23af9cc to your computer and use it in GitHub Desktop.
Script to start a machine under xhyve without docker or other middlemen.
#!/bin/sh
KERNEL="vmlinuz"
INITRD="initrd.gz"
CMDLINE="earlyprintk=serial console=ttyS0 acpi=off"
MEM="-m 1G"
NET="-s 2:0,virtio-net"
IMG_CD="-s 3,ahci-cd,ubuntu.iso"
IMG_HDD="-s 4,virtio-blk,hdd.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"
xhyve $MEM $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD -f kexec,$KERNEL,$INITRD,"$CMDLINE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment