POSTS
FreeBSD on Xhyve
xhyve is essentially a port of FreeBSD’s bhyve to OSX. The instructions show how to run Ubuntu (which you can dissect and figure out how to boot other linux distro’s), but lack any documentation on how to run FreeBSD with it. Here is how to do it:
Clone and build the latest xhyve
{% highlight bash %} git clone git@github.com:mist64/xhyve.git cd hyve make mkdir freebsd cd freebsd {% endhighlight %}Download latest FreeBSD virtual machine image
{% highlight bash %} wget http://ftp10.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.2-RELEASE/amd64/Latest/FreeBSD-10.2-RELEASE-amd64.raw.xz unxz FreeBSD-10.2-RELEASE-amd64.raw.xz tar xf FreeBSD-10.2-RELEASE-amd64.raw.xz cd ../ {% endhighlight %}Setup the runfreebsd script
Create a file call runfreebsd with the following contents:#!/bin/shFreeBSD
this is provided in the xhyve sources
USERBOOT=“test/userboot.so” BOOTVOLUME=“freebsd/FreeBSD-10.2-RELEASE-amd64.raw” KERNELENV=“”
MEM=“-m 4G” #SMP=“-c 2” NET=“-s 2:0,virtio-net” IMG_HDD=“-s 4,virtio-blk,freebsd/FreeBSD-10.2-RELEASE-amd64.raw” PCI_DEV=“-s 0:0,hostbridge -s 31,lpc” LPC_DEV=“-l com1,stdio” ACPI=“-A”
FreeBSD
build/xhyve $ACPI $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $UUID -f fbsd,$USERBOOT,$BOOTVOLUME,“$KERNELENV”