Sunday, 1 April 2012

My First VM

With the server up & running, drivers sorted, storage spaces set up and data transferred, it's time to start adding applications.

The rather refreshing Maraschino front end to NZBAPP

First up it's the old partnership of Sickbeard and Sabnzbd. Both have windows .exes available and both installed and launched no problem. I transferred my sickbeard config.ini and database from my UnRaid install and did a mass update to repoint the path to the show directories. Surprisingly, this all went very smoothly and with Sabnzbd set up through it's wizard, I was ready to roll.

Or was I?

It turned out that with Sabnzbd running, any time I attempted to copy files to the media shares I had set up on Storage Spaces, the server would crash halfway through the copy operation. And I mean crash as in shut itself down. (DPC_Watchdog_Violation BSOD). If Sabnzbd was not running, there would be no problems.

This is when I though about running these applications in a VM. At least that way, if they crashed, they wouldn't affect the entire system.

A little googling later and I came across NZBAPP, a preconfigured Turnkey Linux distribution that has Sabnzbd, SickBeard, CouchPotato and Headphones all set up and ready to go (almost).

I enabled the Hyper-V role on the server, downloaded the .iso and set up the VM with a 50GB expanding HD. One point I've discovered, setting up Linux VMs in Hyper-V requires the use of the legacy network adaptor as they don't seem to work with the standard configuration.

Happy days, with a little tweaking and setting up my account details and APIs, all the apps are running perfectly.

There were a couple of issues that caught me out;

The port setting in /home/nzb/.sickbeard/autoProcessTV/autoPorcessTV.cfg is incorrect out of the box. I needed to change this from 8080 to 8081 to make the post-processing work properly. (nzbapp v 0.9, will be fixed in future releases, apparently)

Also, the various apps run as user nzb. I had set up /etc/fstab to auto-connect to my media shares as follows;

//192.168.1.100/video  cifs username=xxx,password=xxx 0 0
//192.168.1.100/music  cifs username=xxx,password=xxx 0 0

However, when the apps tried to write to directories in those shares, they reported permissions issues. It turns out I needed to connect specifying a uid as well, as follows;

//192.168.1.100/video  cifs uid=nzb,username=xxx,password=xxx 0 0
//192.168.1.100/music  cifs uid=nzb,username=xxx,password=xxx 0 0

That way, the user under which the apps are running on linux have permission to write to the shares.

I'll never really understand permissions, particularly in a mixed OS environment.

Anyway, I found this thread useful in troubleshooting configuration of all of these apps.


1 comment:

Liam Flint said...

I like and suggest you to try LongPathTool program. It is very helpful for copying/deleting or renaming long path files.