>Yesterday, I had to relocate 4 VMWare Server machines to an ESX. A Windows Server VM, 2 Linux installations with LVM and one without LVM. Normally, you just copy the vmdk to the ESX machine, open a console and type
vmkfstools -i {vmserver.vmdk} {vmesx.vmdk}
and it will convert your VMWare Server VM to a format ESX can use. After that, just create a new VM on the ESX Server and add the converted vmdk file as a harddisk. So far so good… the problem is, it won’t work as soon as you use LVM
So we have to use some magic in form of dd.
- Create a new VM on the ESX Server, the Harddisk must have the same size as the one your VMWare Server VM uses.
- Start the ESX VM and boot from a Linux Live-CD, I suggest you use Backtrack.
- Now start the VMWare Server VM but instead of booting from the HD, use the Linux Live-CD too.
- After both systems have started with their live cds, make sure Backtrack hasn’t mounted your Harddisk. Use [mount] to check this and [unmount] anything that isn’t necessary.
- On your target machine (ESX), type the following command:
- nc -l -p 55555 | dd of=/dev/sda
- And on the source machine (VMWare Server):
- dd if=/dev/sda | nc {IP_TARGET_VM_ON_ESX} 55555
- Now you have to wait until the system has finished copying, which, depending on your network speed, may take a while.
- As soon as dd has finished, you can restart your VM on the ESX Server and boot from HD instead of the live-cd.
If everything went right, you’ll have a old new system running