Files
linuxkit/xhyve/fuserun.sh
2016-02-12 14:07:43 +00:00

27 lines
745 B
Bash
Executable File

#!/bin/sh
KERNEL="../alpine/kernel/vmlinuz64"
INITRD="../alpine/initrd.img"
CMDLINE="earlyprintk=serial console=ttyS0 virtio_pci.force_legacy=1"
MEM="-m 1G"
#SMP="-c 2"
NET=""
if (( $EUID != 0 )); then
printf "Warning: not running as root will have no networking!\n\n"
sleep 1
else
NET="-s 2:0,virtio-net"
fi
#IMG_CD="-s 3,ahci-cd,/somepath/somefile.iso"
#IMG_HDD="-s 4,virtio-blk,/somepath/somefile.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
RND="-s 5,virtio-rnd"
FS="-s 6,virtio-9p,path=transfused.sock,tag=fuse"
LPC_DEV="-l com1,stdio"
ACPI="-A"
CLOCK="-u"
#UUID="-U deadbeef-dead-dead-dead-deaddeafbeef"
build/xhyve $ACPI $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $RND $FS $UUID $CLOCK -f kexec,$KERNEL,$INITRD,"$CMDLINE"