Persistence is futile or Adventures with virtualising a RedHat server

QUITE Some time ago I began working on options for virtualising a physical Redhat server running on Dell hardware. Given my experience with various operating systems and migration to virtual machines – it wasn’t immediately obvious that this one would prove to be so stubborn. But it turned out to be an epic spanning almost a year and many different approaches and problems.

The initial test was using a Vmware cold clone cd which completed but ended up with a machine which could not locate its disks. Futher research showed that this was a relatively common occurence. Next using Acronis to generate .tib file images and trying to restore those into a vm via Vmware convertor. Again no success despite long and repeated interaction with Acronis.

The issue seemed to always be that the conversion need to inject drivers for the scsi controller and other tools but was not completing this. Researching from the Redhat end gave very little information about the cause or possible remedies when the VM could not boot. Attempts to inject various drivers and configure kernels lead nowhere.

The next more esoteric attempt involved transferring an image of the server via the network using a combination of unix utilities dd and nc but ultimately it also failed. At this stage there was nothing else left to try except a competing converter from Platespin but this failed with errors that the supplier could not rectify.

So the project was left on the back burner with an occasional re-attempt at cold cloning with newer releases of VMware Converter. However it was after a conversation with a colleague that lead me back to to this particular problem. I’d been discussing my recent migration to Vsphere 4 and issues and changes relating to this.

While checking something else on the VMware site I noticed a software release that had come out during a period while I was on leave that could be useful in this project.

Converter Installer for Linux Version 4.0.1 | 161434 release 21 May 09 – which you can get from the Vmware site

On reading the Vmware notes on this

Interoperability: Broad support for source physical machines and image formats
Broad support for source physical machines and image formats.

■ Source physical machines running 64-bit Windows XP/2003, WinNT SP4+, Windows 2000, Windows XP, Windows 2003, windows Server 2008, and Linux (RHEL, SUSE and Ubuntu)
■ Source third party images: Microsoft Virtual Server, Microsoft Virtual PC, Parallels Desktop, Symantec Backup Exec System Recovery (formerly called Live State Recovery), Norton Ghost, Acronis, and StorageCraft
■ Source/Destination virtual machines: VMware Workstation, VMware GSX Server, VMware Player, VMware Server, VMware Fusion, VMware ESX (Managed by VMware VirtualCenter 2.x)
*Linux P2V support is available for the Standalone version only.

It was the last one that made me consider this worth checking out again.

In this case its through hot cloning that I decided to approach this Linux P2V conversion. I installed the tool directly on the server in question and was able to run and point the conversion (which looks exactly as the cold boot cloning does) at an ESX server. Despite a few small problems about access permissions and account details once the root user was given temporary ability to login using ssh – the conversion begin.

First thing I noted was that the conversion was quicker than previous attempts – although this may have had as much to do with network topology. Once completed I powered on the newly converted machine and low and behold the linux tool Kudzu kicked in to declare that various pieces of hardware were no longer present and that additional new (vmware) hardware elements were present. After removing the items that were not longer in the VM and approving the new hardware and configuring the Network cards – the system continued to boot and gave me a graphical login prompt for the first time.

Logging in and checking the application that this server runs was operating as expected showed the conversion as a complete success. So if you like me have had to wrestle with the less that straightforward conversions that projects throw up – this tool finally gave the result I wanted. So remember if in doubt – persist – there is always more than one way to “skin a cat”.