Friday, May 30, 2008

Converting Linux Boxes to VMWare ESX Virtual Machines

There is basically no documentation on this out there in the world, so I've decided to put it together for you as well as I can. I recently had the pleasure of converting a myriad of RedHat boxes from physical to virtual. (RH 7.3, 9, FC4 and ES4). This was by no means an easy task.

The largest issue was that I was going from IDE disks to SCSI disks with either LILO or GRUB as the boot loaders. LVM really did not help WHATSOEVER on this as well. Basically, Platespin and Converter were of ZERO use to me. Ghost was my friend...

My wish is that somewhere along the way that Converter and Platespin do something severely address this issue. I know, it's not any of their true business generated revenues, but come on, help out those that truly help you out.

So the biggest issue with these linux machines is that if you do any type of custom kernel, you probably don't include drivers for hardware that is not in use on your machine. Makes sense, no argument there. But prior to your P2V, make sure you include support for the scsi driver needed for vmware. Either a BusLogic (yikes!) or the LSI Logic scsi controller. At the very least compile the driver. You can go anywhere to figure out how to do this if you are unsure.

After this, use what ever disk image solution you know of to copy that machine up to your VMWare machine. You'll need to create the VM, and boot off whatever disk imaging solution you use. I used ghost and used the GhostCast Server piece to a succesful end.

Download the rescue disk for your distro or use a copy you already have and boot into rescue mode on that distro. You'll need to create a new memory image (mkinitrd) with the proper driver included in your /etc/modules.conf.

That's basically it, but no one went even into that much detail that I could find on the internet. It worked for me quite easily.