[ovirt-users] best way to migrate VMs from VMware to oVirt

Pavel Gashev Pax at acronis.com
Sat Jun 18 18:51:44 UTC 2016


Basically, I boot windows in safe mode and remove vmware tools. In this case I was able to use old VM if there are issues with conversion. Of course you can remove vmware tools before migration.

Linux VMs do not need the convertor. The procedure is much simpler:
1. Make sure you don't use device names in /etc/fstab and grub
2. Make sure initramfs has required drivers:
dracut -f --add-drivers "virtio virtio_net virtio_blk virtio_scsi virtio_pci"
3. Create appropriate VM in oVirt. Disks must be in raw format (default), but sparse. NICs must have the same MACs.
4. Hard link vmware and ovirt disk images, and fix permissions (chown 36:36 / chmod 0660)
5. Shutdown VM in vmware and immediately start VM in oVirt

On 17/06/16 16:08, "Cam Mac" <iucounu at gmail.com<mailto:iucounu at gmail.com>> wrote:

Hi Pavel,

Just to clarify: I've read on the virt-v2v page that you should remove the VMware tools from the Windows VM before migration - for step 13 in your list, does that apply only to non-windows VMs?

Cheers,

Cam

On Fri, Jun 17, 2016 at 10:54 AM, Cam Mac <iucounu at gmail.com<mailto:iucounu at gmail.com>> wrote:
Hi Pavel,

I was testing an import of a Win 7 VM, though there are 2012 ones to import as well. Thanks for all those steps, I'll try them out.

Cheers,

Cam

On Thu, Jun 16, 2016 at 7:31 PM, Pavel Gashev <Pax at acronis.com<mailto:Pax at acronis.com>> wrote:
Cam,

I did import vmware VMs, but it was not an easy procedure. Last time I did it, there were the following issues:
* oVirt engine didn't support 32bit VMs. If you have a 32bit VM in vCenter, you are not able to see the list VMs to import.
* There were issues if you have a cluster in vCenter. I had to setup a proxy server to fix URLs on the fly, but then I've found a better way. See below.
* RHEL/CentOS virt-v2v does't support 2012 and greater. I had to use virt-v2v from Fedora.

Thus, if you want to convert it manually, the procedure is the following:
1. Install vdsm-hook-nestedvt on ovirt nodes, and reboot
2. Setup a VM with latest Fedora, install virt-v2v.
3. Mount your NFS storage inside v2v VM.
4. Move windows VMs to the same NFS storage.
5. Connect to vcenter using the following command:
virsh -c vpx://vcenter/Folder/Datacenter/Cluster/server?no_verify=1
6. Find windows VM using 'list' command, and dump config using 'dumpxml VMNAME/ID'
7. Edit the xml providing full path to vmdk images (see «source file=»)
8. Create appropriate VM in oVirt
9. Find new VM IDs using ovirt-shell
10. Make sure the source VM is stopped
11. Execute virt-v2v (make sure:
virt-v2v -v -x -i libvirtxml VM.xml -o vdsm -of qcow2 -os /nfs/b1b74392-8f46-4a25-aeef-5344ac692c73 --vdsm-image-uuid 368487a5-d7f2-43d2-bd61-d15abbc5c482 --vdsm-vol-uuid 2f56c6cd-a212-44e6-a792-447787f5b073 --vdsm-vm-uuid 421e93a8-33d2-fc0e-4cfc-ac45a35db8c9
12. Fix resulting disk pemissions (chown 36:36 / chmod 0660)
13. Now you can start VM in oVirt. Remove vmware tools, and install oVirt tools and drivers.

I hope this helps.

On 15/06/16 20:41, "users-bounces at ovirt.org<mailto:users-bounces at ovirt.org> on behalf of Cam Mac" <users-bounces at ovirt.org<mailto:users-bounces at ovirt.org> on behalf of iucounu at gmail.com<mailto:iucounu at gmail.com>> wrote:

Hi,

I haven't had any luck using the oVirt GUI or virt-v2v (see earlier email), and I need to find a way to migrate quite a few Windows hosts (Windows 7, 2012, 2008, 2k3 etc) into my test oVirt cluster as a PoC so I can make a compelling case for getting rid of VMware. Using OVF files looks like a lot more manual work as compared to the GUI or virt-v2v, with their nice conversion features.

Any suggestions?

Thanks,

Cam


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160618/70fa8a6e/attachment-0001.html>


More information about the Users mailing list