Skip to content

Instantly share code, notes, and snippets.

@astroza
Created January 14, 2019 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astroza/e268bb298a26f24c314bdbf6953e8e2e to your computer and use it in GitHub Desktop.
Save astroza/e268bb298a26f24c314bdbf6953e8e2e to your computer and use it in GitHub Desktop.
BeckVM
#!/bin/bash
vmsMount=$(mount|grep /Users/felipe/vms)
if [ "x$vmsMount" == "x" ]; then
sudo mount -t nfs -o resvport 192.168.3.173:/export/vms /Users/felipe/vms
fi
cd /Users/felipe/vms/beck
# Linux
KERNEL="vmlinuz-4.4.0-131-generic"
INITRD="initrd.img-4.4.0-131-generic"
CMDLINE="earlyprintk=serial console=ttyS0 root=/dev/vda1"
# Guest Config
MEM="-m 1G"
# IMG_CD="-s 1,ahci-cd,xenial.iso"
IMG_HDD="-s 2,virtio-blk,ubuntu_disk.img"
NET="-s 3,virtio-net,vmnet0"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"
ACPI="-A"
sudo xhyve -c 2 $ACPI $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