VMware Physical to Virtual with CentOS 5

I recently converted a physical CentOS 5 server to a virtual machine on VMWare ESXi 4.0. After the process completed successfully, I was elated since I have several similar servers that must be converted. I was not looking forward to the prospect of reinstalling each server manually and moving data manually. However, my elation quickly turned to dismay when I tried to turn on the newly created virtual machine and only got an empty black screen with a white cursor in the corner on the console. Here are the steps I took to resolve the issue:

1. Boot the virtual machine to a CentOS install disk.
2. At the first prompt, type “linux rescue” (without the quotes) to boot into rescue mode.
3. Follow the prompts to get to a rescue mode command prompt – no need for networking.
4. Issue the command “chroot /mnt/sysimage” to change the system root to the system installed on hard drives.
5. Issue the command “grub-install sda” to re-install the bootloader.
6. Disconnect the install disk image from the virtual machine.
7. Reboot the virtual server and be elated again as it boots into CentOS 5.

6 Responses to “VMware Physical to Virtual with CentOS 5”

  1. Jerry March 26, 2010 at 6:33 pm #

    How did you convert the physical CentOS into virtual machine?

  2. Jonathan March 26, 2010 at 8:56 pm #

    With VMWare VCenter Converter Standalone.

  3. Ian August 1, 2010 at 11:13 pm #

    But VMWare VCenter Converter Standalone doesn’t support CentOS, does it? I can’t make it see my CentOS release 5.4. Pointers would be appreciated.

  4. Jonathan August 2, 2010 at 11:03 am #

    It has worked fine for me on multiple occasions. Just choose RedHat EL5 as the operating system and make sure that SSH is working and not firewalled.

  5. Kashif December 23, 2010 at 1:06 am #

    Dear Jonathan,

    I want to convert my physical machine centos 5 but when i boot the machine with vcenter convertor 4.0 and trying to export image it will check on first step and check source and return me the error

    Warning source cannot configure and when i will try this from linux it will give same error and when i will convert windows machine with same way then it will show no error so could you tell me what is the problem

  6. Kashif December 23, 2010 at 1:12 am #

    Kindly if you have any perfect documentation please upload the steps its good for me

    Thanks

Leave a Reply