Linux – P2V Wouldn’t Boot, Rebuilt initrd, Need to Clean Up

centoslinuxredhatvmware-esxi

We have a CentOS 5.4 server (build 2.6.18-164.el5xen).

We went to P2V this server so we can have redundancy, the physical only has one PSU.

The P2V only completed 99% of the way, we have a VMWare ticket opened, but they marked the ticket as low priority.

I was able to boot into a rescue disc of Red Hat 5.4 and rebuild the initrd with the help of this blog post.

Now the only issue is the original server had a modified initrd, which was also from a different OS build and made by an outside provider. We do not have a document outlining modifications.

My question is, is it at all possible to copy the initrd off of the physical server and replace it on the virtual and some how have the virtual machine boot?

Thanks for any input.

Edit:
I copied the initrd img from the physical and it recreated the original issue. Here is a screen capture of the error. http://i.imgur.com/MqC73.jpg

Edit2:

echo Scanning logical volumes

lvm vgscan –ignorelockingfailure

echo Activating logical volumes

lvm vgchange -ay –ignorelockingfailure VolGroup00

resume /dev/VolGroup00/LogVol01

echo Creating root device.

mkrootdev -t ext3 -o defaults,ro /dev/VolGroup00/LogVol00

echo Mounting root filesystem.

mount /sysroot

Best Answer

I have always had much better success booting the physical system with "Parted Magic" USB or CD, imaging the system with Clonezilla (from inside of PMagic), then restoring in the virtual machine with the same Parted Magic disk.

If you are migrating a Windows machine, "mergeide" might also be quite helpful for you.

More on mergeide: http://www.biermann.org/philipp/STOP_0x0000007B/