# FreeBSD Core Server

**URL:** <https://community.roonlabs.com/t/freebsd-core-server/4201>\
**Category:** Feature Suggestions\
**Created:** [October 9, 2015, 5:27pm UTC](https://community.roonlabs.com/t/freebsd-core-server/4201 "2015-10-09T17:27:30Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Claus](https://community.roonlabs.com/letter_avatar/claus/32/5_5575768a8748004e209b776fc1b2916d.png) [@Claus](https://community.roonlabs.com/u/Claus)\
**Post date:** [May 5, 2016, 8:05am UTC](https://community.roonlabs.com/t/freebsd-core-server/4201/18 "2016-05-05T08:05:02Z")

</div>

## FreeNAS + Roon

### Hardware Setup:

Intel NUC (NUC5i3RYH with i3)  
16MB RAM (zfs already requires 8GB)  
128GB SSD (Transcend MTS400 M.2) for Roon  
1TB HDD for data/music  
64 GB USB3 for FreeNAS

### FreeNAS Setup:

Install on USB3  
Setup SSD as volume “ssd”  
Setup HDD as volume “disk”  
Enable SSH service and permit root login with password  
Add to System-\>Tunables (rc.conf):

> iohyve\_enable=“YES”  
> iohyve\_flags=“kmod=1 net=em0”

###Create Virtual Machine (with bhyve):  
Login with ssh to FreeNAS as root.

Setup pool “ssd” for virtual machine:

> iohyve setup pool=ssd

Setup network bridge (check your interfaces with ifconfig):

> iohyve setup net=em0

Load kernel modules:

> iohyve setup kmod=1

Fetch Arch Linux ISO:

> iohyve fetchiso [http://mirror.23media.de/archlinux/iso/2016.05.01/archlinux-2016.05.01-dual.iso](http://mirror.23media.de/archlinux/iso/2016.05.01/archlinux-2016.05.01-dual.iso)

Create Arch Linux Guest:

> iohyve create archguest 50GB

Set options:

> iohyve set archguest ram=4GB  
> iohyve set archguest cpu=2  
> iohyve set archguest loader=grub-bhyve  
> iohyve set archguest os=arch  
> iohyve set archguest boot=1 (starts Arch with FreeNAS)

Start installation (boot the ISO):

> iohyve install archguest archlinux-2016.05.01-dual.iso

Connect to virtual serial console (login root, no pw, exit the console with ~~. ):

> iohyve console archguest

Now follow the usual Arch Linux installation e.g. the instructions from this forum. Just skip the bootloader stuff and do:

> pacman -S grub  
> grub-install --target=i386-pc /dev/sdX  
> grub-mkconfig -o /boot/grub/grub.cfg  
> exit  
> umount /mnt  
> reboot (this will shut down the guest)

And test with:

> iohyve start archlinux

SSH into the Arch Linux (check your router to see the IP Arch got via DHCP).  
Follow the official instructions for Roon Server

Export your own music library on FreeNAS via Windows share and point Roon to the URL. Didnt find an easier way to mount the music directely from the host into the virtual machine.

### Results:

- SSD Benchmark from inside the virtual machine with bonnie++: ~80MB/s write, ~430MB/s read
- The VM/bhyve uses ~2-5% CPU for Tidal Lossless playing. No drop outs, instant play/stop. Even with background indexing. Perfect 🙂
- Power consumption 10-12Watt, no matter if streaming or idle.

### References:

> **[GitHub - pr1ntf/iohyve: FreeBSD bhyve manager utilizing ZFS](https://github.com/pr1ntf/iohyve)**
>
> FreeBSD bhyve manager utilizing ZFS

> **[GRUB - ArchWiki](https://wiki.archlinux.org/title/GRUB)**

> [@HOWTO: Guide For Setting Up Roon Server and Roon Bridge on Arch Linux x86\_64](https://community.roonlabs.com/t/howto-guide-for-setting-up-roon-server-and-roon-bridge-on-arch-linux-x86-64/9513):
>
> I’ve had to do this a few times on different machines and on each occasion I’ve had to rely on my google skills to identify and refer to a number of resources that helped me on the way. This is written to help myself and others get it right first time and save what could otherwise be hours of frustration. This guide assumes a basic level of Linux know-how and covers installing Arch Linux onto a target USB flash drive (/dev/sdX for the purposes of this guide) using a source USB flash drive (/de…

---

_[View the full topic](https://community.roonlabs.com/t/freebsd-core-server/4201)._
