Thursday, August 20, 2009

Perhaps I spoke too soon...

To lay the groundwork, because of the issues I had been having I no longer open Firefox or any other terminal windows (as I usually had done in the past) since I wanted to try to narrow down any problems and make sure nothing else could be taking up resources or RAM or causing instability in the system. I have even been considering running the box headless and just a command prompt to rule out Gnome.

As of the last entry I thought I had completely fixed the issues I seemed to have had with VirtualBox and Solaris. Wrong! The other day I had a performance issue with one of my virtual machines, and I noticed the box was using up all it's RAM. I put 1 gig to each of 2 virtual machines and 4 gigs to a 3rd. That should be 6 gigs, and I have 8 gigs in the machine and should have been enough. But whenever logging onto the host, or into one of the VM's the hosts hard drives would thrash and upon looking at the host OS stats (Solaris) I noticed 100% of ram taken up and quite a bit of disk cache as well (don't remember exactly number, but in the many megabytes).

I did the natural thing and that was to shut down the three guests (virtual machines) so that I could reboot and set some of the ram requirements per virtual machine slightly lower. Upon shutting down some of the VMs... OpenSolaris froze, it did not auto reboot as it had done when I was using the VBox shares, but.. I had to manually reboot. Doh.

I think my final solution might be to run VMWare and see if it's actually VirtualBox causing these issues or not. Or at least give it a go to see if it's not just OpenSolaris that's a little flakey. I don't seem to get really good performance either in my VM boxes with 2 CPU's assigned to one of them using VirtualBox. I tend to think the VirtualBox multi-core technology just isn't "there" yet and VMWare has been around a while so I am hoping it will be more performant with VMWare too. Anyone know of some good sites that give you a walk through of installing VMWare on OpenSolaris? Leave a comment if you do. Also if I find a few before next post I will be sure to post them with the update.

Tuesday, August 18, 2009

ZFS and VirtualBox issues

So once I built my ZFS Home File Server box using OpenSolaris and the hardware I have listed, and I put VirtualBox on it. I did this mostly because I wanted to run Ubuntu but I also have a personal web server that I run as well as a personal SQL Server I do a lot of test coding on.

I created my ZFS pool's, shared them using CIFS with some articles I had read on the internet (attached at the bottom of this article). This worked great, seamless even. Then I installed VirtualBox and copied my Ubuntu and Windows machines from my old Ubuntu box which this OpenSolaris server was replacing. I then proceeded to use the VirtualBox feature that allows you to create shares that are visible to the guest machine through the VBox drivers.

I did this so I can run Mediatomb and pyTivo on my Ubuntu Virtual Machine because they don't yet run on OpenSolaris without a lot of compiling, tweaking, and other things I really don't want to do (although have tried, and failed.. OpenSolaris is a bear to get things to compile). You can find plenty of articles that show you how to do these things, but I decided not to until I have an easy way to pull down some software from a repo that's ready to go.

Everything works pretty damn good up until this point, and in a few hours of putting the hardware together my network is back the way it was before with no more physical Ubuntu box, only the OpenSolaris box running Ubuntu in a virtual machine. So I rebuild my old box and it is now my 3 year old sons gaming machine for Disney stuff. :)

Then things started acting weird. Whenever I would shut down / reboot the Ubuntu box (for whatever reason, patching, or I was editing / adding shares, etc.) it would literally freeze the OpenSolaris box and then about 15 seconds later the box would reboot. Also I noticed if I copied large files over the network it would cause the Virtual Machines to fall off the face of the earth (my network).

This is when I found there is an issue with ZFS, CIFS and VirtualBox somehow inter related to each other. After a few days of trouble shooting to find out what was causing it, and rebuilding the OpenSolaris box (thinking I did something wrong) I figured out that if I didn't turn on CIFS everything worked fine... or so I thought. This only solved the problem of rebooting the Ubuntu virtual machine causing my entire system to crash and burn with a reboot.

I installed a fresh OpenSolaris, did NOT configure CIFS, and configured the virtual box with the internal shares to the Ubuntu virtual machine. To share the files on my network this time I put Samba on the Ubuntu as it was just easy for me to do that instead of put it on OpenSolaris at the time, I am much more familiar with Ubuntu. Then every few days the computer would freeze up (but stopped the automatic reboot! :-/) also if I started to copy large files over the network, it brought the Solaris machine to it's knees, making it freeze up again. Although this time there was no reboot, it just froze completely.

The way I solved it was to not use the VirtualBox shares, not use CIFS but configure SAMBA on the OpenSolaris box and then mount those SAMBA shares inside the Ubuntu virtual machine. Now everything is running happily and no more issues. At least haven't had any issues for a few weeks now. :)

The link I promised above for Simon's Comprehensive ZFS Setup Blog:
http://breden.org.uk/2008/03/02/a-home-fileserver-using-zfs/

PlayOn Plugins - Podcast (OPML) Tutorial

I produced another tutorial video on using the Podcast Plugin on http://www.playonplugins.com and how to add additional OPML files into the plugin to get the most content customized to your wants. Check it out below.