By user13366078 on Mar 30, 2008
In my last post, I compiled an installed the MediaTomb UPnP server on Solaris in order to stream movies, photos and music to my PS3 and it worked well. But I wasn't quite satisfied with it's features: No support for tags/covers in AAC encoded music (>95% of my music library is encoded in the superior AAC format) and a few other quirks here and there. So I decided to try the TwonkyVision TwonkyMedia server.
Unfortunately, the guys at TwonkyMedia (now PacketVideo) don't support their TwonkyVision server on Solaris (yet?). Only Linux, Windows and MacOS X are supported. The absence of answers to a Solaris request post in their forum isn't very encouraging. TwonkyMedia is closed source and only commercially available (EUR 29.95) which means you can't even compile it yourself on Solaris. At least there's a trial period of 30 days. Does this mean no ZFS and other Solaris goodness to TwonkyMedia?
Fear not, this is exactly what Branded Zones in Solaris 10/OpenSolaris are all about! They allow you to install a Linux distribution inside a Solaris 10 Container. The BrandZ framework then seamlessly translates Linux systemcalls into Solaris systemcalls. The result: All the goodness of Solaris, such as ZFS, FMA, DTrace and whatnot, even for closed source or otherwise problematic Linux applications. So, here's how to run the TwonkyMedia server on a Solaris x64/x86 machine (sorry, no SPARC, different CPU architecture):
- Set up a standard lx branded Zone. Here's a short and sweet tutorial on how to do it. In my case, I used ZFS for the zone root path. This gives me compression and the ability to snapshot the Linux root filesystem whenever I like.
- I used the CentOS tarball from the BrandZ download area to install a standard CentOS zone. Quick, easy, free, works well for most cases.
- After having installed the CentOS Linux branded Zone and before the first boot, it is a good idea to make a ZFS snapshot of the root filesystem, just in case. You can later use the snapshot to revert the zone to it's freshly installed state or to easily clone more zones like this in the future.
- After the first boot of the Linux zone with zoneadm -z zonename boot, you can login to it's virtual console using zlogin -z zonename. Now, setup basic networking from inside the Linux zone by editing the /etc/sysconfig/network file. Then, you can login through ssh -X into the Linux zone and run graphical configuration tools such as redhat-config-network to configure DNS, set up users, etc.
- Now, download the TwonkyMedia server from the Linux zone by using wget http://www.twonkyvision.com/Download/4.4/twonkymedia-i386-glibc-2.2.5.zip and follow the TwonkyMedia installation guide.
- You should now have the TwonkyMedia server up and running from within a Linux branded zone on Solaris! Connect to it through your webbrowser at http://your.servers.ip.address/:9000 and configure it's various settings to your taste.
This is it, actually it's much easier than compiling MediaTomb, but it comes at the cost of having to pay after the trial period, if you like it. Above, you see a picture of TwonkyMedia, running in an lx branded zone on Solaris, streaming AAC music from my favorite Chilean band "La Ley" to a PS3. Notice the cover art and song info to the bottom left that is not available with MediaTomb today for AAC encoded music.
I'm now going to write to the TwonkyVision support department at email@example.com and ask for a real Solaris version. After all, if they expect their customers to pay for software, they ahould at least provide a real binary. If you're interested in getting TwonkyMedia to run natively on Solaris too, join me and send emails of your own to them or post to their forums.