I got to migrate an existing Red Hat VM to an ESX Server. Keep in mind, VMWare’s converter is still beta. Some words about the migration.
Once you start the migration wizard, ensure the following “Source Data” options: “Select volumes and resize to save or add space”. You must deselect the “Create separate disk for each volume” or you must update your mount configuration in a separate step at the end of the migration.
PS.: I suffered from converting both vmdks in a single step, it failed at the beginning of the conversion of Disk1. Thus, I migrated Disk0 and created a separate pseudo VM only for conversion of Disk1. Afterwards, I was able to add an existing harddisk vmdk to the existing VM and remove the pseudo VM from Inventory (not from Disk!)
However, if you are done with the conversion and you start the Red Hat VM you will receive a BIOS message stating “Error loading operating system”. This is a result of a bad boot sector on the boot partion (s.th. about bad boot sections is also logged in the VMWare conver log of this migration).
In this case, download a livecd of any linux distribution; I used this gentoo live cd. Mount the CD image by editing the VM hardware settings -> “CD/DVD Drive 1” and select for “Device Type” the option “Client Device”.
Then, ensure that you enter the BIOS the next time the VM starts by editing the VM options -> “Boot Options” and ensure you selected the only possible option for “Force BIOS Setup”.
After saving the settings you may select the proper disk image to be booted from.
Now send the “Ctrl + Alt + Del” command to the VM (you must not restart the system, otherwise the CD image mapping will be removed). Now you should enter the BIOS settings, here change the boot order to use removal disks first. Save changes and exist the BIOS. You are booting the Live CD — wait…
Once you’re in the live cd system check the partitions with
In my case
/boot is located on
/dev/sda1, thus we’ll mount this by
mkdir /tmp/sda1 and
mount /dev/sda1 /tmp/sda1
Now let’s fix the boot sector by running grub
grub-install --root-directory=/tmp/sda1 /dev/sda
Unmount the device by
umount /dev/sda1 and restart the VM. Now you can use restart the system by using the restart button, otherwise you’ve to remove the CD image.
Once you’ve restarted you might receive a
<grub> command line. Then type
Now your system should be booted.
Once your system is up and running, fix the grub with the proper grub-version used by your system by typing:
Restart the system a last time to check whether the original boot menu occurs and the system starts automatically.