Tuesday, March 1, 2011

Virtualizing Linux

Virtualization offers some amazing benefits and is an intriguing option for any business looking to cut costs on hardware, introduce greater flexibility in their deployment scenarios, and make their systems redundant without having to investigate in essentially 2 or more of everything. I began researching virtualization as an option for our environment, and settled on comparing XenServer from Citrix and VMWare. Ubuntu is our Linux distro of choice.

Virtualization ain't cheap, not if you're trying to realize all of the benefits. Sometimes decision-makers don't get that, and are prone to throw around the idea without understanding the upfront investment necessary to successfully implement it. It became immediately clear that VMWare, the industry standard, was also the most expensive. At a minimum you need vSphere Essentials Plus to get HA and vMotion, not to mention the need to invest in a fast storage system like a SAN. This can easily start you off in the area of $3500. On the other hand, you can start off for $1000 per server with XenServer. XenServer doesn't officially support Ubuntu 64-bit, but I figured I'd try it out anyway. Ultimately though this turned out to be a real barrier and I couldn't successfully create virtual Ubuntu servers at all. I wiped the server and went with ESXi4 instead.

VMWare does actually officially support Ubuntu, even the 64-bit version, which was nice, and I found it pretty easy to get a basic machine up and going pretty quickly. What I wanted to try next was P2V. We have way too many new servers to go completely virtual, but the ability to create virtual copies of physical servers and spin those up in the event of a server failure, or even to add to our farm by using a base image, would be pretty valuable. I downloaded and used the Standalone Converter, which did not work at...all. I pretty much tore my hair out trying to figure out why the conversion was failing. I thought it was a network problem, then perhaps a permissions problem. In the end I figured out that it was a problem with GRUB. If I understood correctly Ubuntu 10.04 uses GRUB2, and VMWare attempts to install GRUB when doing the conversion, which resulted in the virtual machine being unbootable. I attempted to use the original Ubuntu ISO as an emergency boot disc and edit GRUB manually, but that failed miserably.

I struggled with this for a bit and tried to get this working a number of ways. In all of my research and internet wanderings I came across a suggestion to create images of the physical servers using something like Clonezilla and using those as the basis for P2V. It isn't exactly the same since the benefit of P2V is hot-cloning, but I found another imaging tool called Mondo Rescue which actually does the trick nicely. It allows you to create ISOs without having to take the server down, although it is inaccessible while the image is being created. But still, it means no one has to go to the colo to physically reboot the server and create an image, which in turn means we'll be more likely to keep images recent.

Mondo Rescue in and of itself is a pretty awesome utility as well. I made images of my test boxes and restored them a few different times, and it was pretty easy to do, so I'm pleased about that.

No comments:

Post a Comment