Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2013 16:36:28 -0700
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Running FreeNAS under BHyve
Message-ID:  <CAG=rPVcB0mRgJMpj_EicsLBKVZ0BozykY2xtac8k3pO_W-YDwA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

Here is what I have been doing to run FreeNAS under BHyve.


(1)  Download latest FreeNAS-9.2.0-ALPHA ISO from:

http://sourceforge.net/projects/freenas/files/FreeNAS-nightlies/2013-10-09/x64/

(2)  Run this script to set up tap device:

=================================================================
#!/bin/sh

# Change following to your network interface
iface=em0

ifconfig bridge0 create
ifconfig tap0 create
ifconfig bridge0 addm $iface addm tap0 up

sysctl net.link.tap.user_open=1
sysctl net.link.tap.up_on_open=1

=================================================================

(3) Create a 4G disk image:

truncate -s 4G /tmp/disk.img

(4) Run the FreeNAS installer under BHyve and install it to the disk
created in step (3):


sh /usr/share/examples/bhyve/vmrun.sh -I
FreeNAS-9.2.0-ALPHA-a2fb413-x64.iso -d /tmp/disk.img -m 4096 -t tap0
freenas_vm

(5)  Once the installer has completed, select Shutdown.

(6)  In a separate window, kill the vm

bhyvectl --destroy --vm=freenas_vm


(7)  Restart BHyve, but this time, do not boot off the ISO image:

sh /usr/share/examples/bhyve/vmrun.sh -d /tmp/disk.img -m 4G -t tap0
freenas_vm


If DHCP works, you should be able to access the FreeNAS web GUI
using a web browser, via the IP address that the BHyve VM got from DHCP.

--
Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVcB0mRgJMpj_EicsLBKVZ0BozykY2xtac8k3pO_W-YDwA>