CROCK, Containerized Roon Optimized Core Kit

It looks like it is happening. A ROCK Docker container project is well under way and FreeNAS is wrapping up Docker capabilities for near future addition to FreeNAS 11. I’m looking forward to trying this hack this fall.

I’m offering this topic so we can swap release information and maybe, report our results.

Happy hacking.

At first glance, Rock in a container looked appealing but there were too many questions. ROCK is compiled for specific hardware and has specific kernel modules. It was not clear that it would initialize correctly in a BHYVE VM. It makes more sense to do the Debian Installation on FreeNAS (bhyve) described in another article using the server package and keeping Roon on my Mac to manage the configuration, etc.

I’ve successfully used Peter Wriight’s HOWTO to set up a FreeNAS Roon Server VM and followed the library migration guide at Roon. In setting up the server, I did some things different.

I used the current Debian release

I left networking configuration to DHCP because Debian includes an MDNS responder and configures it during installation. The server instance is known by its hostname in domain local.

I used CIFS for file sharing as my music was in an iTunes media directory elsewhere on the FreeNAS server

I did learn that Roon CIFS is a bit finicky Host names are case sensitive as are share names. I had to poke around in the FreeNAS share configurations to get the proper case.

The VM approach appeared to be pretty lightweight by telling Debian to pass on GUI installation.

Hi David,
Just wondered how you are getting on with ROCK installed on a VM in Freenas? I am considering it myself to see if it will fix the issue I have with my current Roon Core (on a Mac Mini) not automatically picking up new tracks from my SMB Music share.
Did you think about using a Jail instead of a VM? Would that be even lighter weight?
I know you said you followed Peter Wright’s guide, but were there any other instructions you followed? I’m a bit of a n00b with Linux, let alone Linux in a VM on a Freenas box!
Any help gratefully received.
Cheers, Bob

I gave up on the notion of a “CROCK”. Nobody liked my pun or the idea of putting ROCK in a Docker container. A Docker container is a variant on a VM that packages the OS, program images, and data in a data set for easy migration from host to host in a large scale cluster. Though cool, it is not needed in a home server environment.

A jail is a BSD OS trick that establishes a protected virtual environment for an application. This environment allows the FreeBSD kernel to perform process, memory, and device management for the processes in the jail but restricts I/O to the devices assigned to the jail, and constrains inter-process communication to the jail processes and the network interface. Process images in the jail must be FreeBSD images using FreeBSD shared libraries. Roon Server binaries are linked against Debian/Ubuntu shared libraries. So although the two OS APIs are close, the two cannot share process images.

I’ve been back and forth several times between a bare metal host and a VM host as a result of misbehavior finally tracked to a bad network cable that needed a visit from a proper punch down tool. Sorted now.

My media is in a FreeNAS dataset. The VM can mount the data set directly as a virtual device. I share it with a Plex instance in a jail and with iTunes on my Mac for CD ripping. This is very responsive.

FreeNAS has excellent setup guides as does Roon. When you download your OS of choice, you can use a lite version. It will leave out LibreOffice and the games but will have the media support in the default package list. This will slim down disk partition needs for the OS. The OS image area will be set up as a “data-less client”, that is just required system files
and program images. The Roon data will be in a different data set that you will configure as a VM virtual disk and mount under /media in the guest OS.

This is the only tricky bit about setting up the VM – creating the correct sort of container in the FreeNAS shared zVol. Read the find print for Virtual Machines, create the container, and then the CIFS share. The machine to be the medial library manager must have RW access to this share. Copy the media over.

The other tricky bit is in migrating your Roon Core from one library to another. Do a Roon library backup, stop the old Roon instance, start the new Roon instance. Mine are Rocky and Virtual-Rocky. Virtual Rocky will come up without configuration data. Roon will give you the option to purchase a license or load the existing license and metadata from the library backup. The library backup needs to be in a dataset shared by the two machines (sneaker net works).

FreeNAS Onboard Guide VM Documentation

I’ve been careful with network topology to put the Roon Server and Roon Endpoint on the same managed UniFi Switch-8-60 rack top switch. This spares the audio a trip to the core switch and back out.

Naming aside, I would have thought:

  • RoonServer in a Container versus
  • ROCK in a VM.

John Reekie has played around with this. RoonServer in a Container has considerably less overhead and hence performs better than ROCK in a VM.