Just the other day, I had the “privilege” of P2V’ing some really old CentOS 3.7 and 3.8 physical servers. The process certainly had it’s challenges. Here is how I did it.
Very old distributions of Linux will not support any of the virtual SCSI controllers provided to the guest by vSphere.
You need to firstly convert the disks to IDE, then modify GRUB to boot the OS from the converted IDE disks.
- P2V the server
- When till the process is completes, or errors at at the end.
- We will now convert the disks to IDE. Edit the VM’s Settings and remove the Disks.
- SSH into an ESX server, and cd to /vmfs/volumes/<datastore>/<vmname>
- Edit <vmname>.vmdk and change “lsilogic” to “ide”. If there is more than one disk, do the same for the other.
- Go back to the vSphere client and add the disks back in, you may need to fiddle with the Node number of the CD drive in order to make sure the boot drive gets 0:0.
- Boot into a rescue CD
- Mount the disk if it hasn’t been automatically mounted
- chroot to the mount (eg chroot /mnt/sysimage)
- Edit /boot/grub/device.map and change the last line to hda
- Edit /etc/grub.conf and change entries where necessary
- Run grub-install /dev/hda
- Reboot the server
Your VM should now boot into the OS.