Skip to content

Instantly share code, notes, and snippets.

@dijitaltrix
Last active May 12, 2021 10:57
Show Gist options
  • Save dijitaltrix/2986ec7953600217933e5af504a09352 to your computer and use it in GitHub Desktop.
Save dijitaltrix/2986ec7953600217933e5af504a09352 to your computer and use it in GitHub Desktop.
MacOS Xhyve/Bhyve Virtual FreeBSD machine run script
#!/bin/sh
UUID="generated by `uuid`"
INSTALL="/path/to/install/media"
DISK="/path/to/your/disk/image"
BOOT=$INSTALL # swap this once installed
PATH="build/Release:build:$PATH"
xhyve \
-U $UUID \
-A \
-m 2G \
-c 2 \
-s 0:0,hostbridge \
-s 1:0,virtio-net \
-s 2:0,virtio-blk,$DISK \
-s 3:0,ahci-cd,$INSTALL \ # this may be removed once installed
-s 31,lpc \
-l com1,stdio \
-f fbsd,/opt/local/share/xhyve/test/userboot.so,$BOOT,""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment