FreeBSD Core Server

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

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 :slight_smile:
  • Power consumption 10-12Watt, no matter if streaming or idle.

References:


https://wiki.archlinux.org/index.php/GRUB

1 Like