Migrate vm from ESXi to oVirt

oVirt: v3.3, CentOS,
ESXi: 5.x,

For Windows vm, do this
Before you begin make a copy of the VMware image.
Remove VMware tools
Start the Windows virtual machine on VMware and remove the VMware tools via the Windows control panel. Reboot.
Enable IDE
Start the Windows virtual machine on VMware and execute the mergeide.reg (File:Mergeide). Now the registry is changed that your Windows can boot from IDE, necessary for KVM.
Make sure Atapi.sys, Intelide.sys, Pciide.sys, and Pciidex.sys are in the %SystemRoot%\System32\Drivers folder. If any are missing they can be extracted from %SystemRoot%\Driver Cache\I386\Driver.cab which can be opened in Windows file Exlorer like a directory and then the missing files can be copied out.
see Microsoft KB article for details.
Shutdown Windows.

1. Create a nfs export domain on your oVirt datacenter.


2. Install virt-v2v on CentOS and add authentication.

# yum install virt-v2v
machine login root password 1234567

Change permission of .netrc as saying of manual or you will get a warning with wrong permission.

# chmod 600 ~/.netrc

3. Import myvm. Make sure that your vm in ESXi is powered off.

# virt-v2v -ic esx:// -o rhev -os --network mgmtnet myvm
myvm_myvm: 100% [====================================================]D 0h04m48s

virt-v2v: myvm configured with virtio drivers.

4. Import myvm from export domain to data domain.