Kvm to vmware migration – lvm based guest + multipathing

device-mapperkvm-virtualizationvmware-esxi

What is recommended way of migrate from kvm to vmware in case of lvm based guest with multipathing? I found that similar questions were already asked few years ago:

How to migrate KVM based VMs running in LVM setup to Vmdk images

converting KVM virtual machines to VMware-vsphere

But the problem with vCenter converter is that base on documentation linux volumes mounted by device mapper multipath aren't supported.
What is currently the proper way to proceed in case of multipath environment?

Best Answer

VMware converter can migrate from any source machine regardless of the source type. (virtual/physical/KVM/Hyper-V) The only trouble is VMware converter can't migrate software RAID or LVM. So the solution for this is to create a skeleton server with the bare minimum of the source machine and push everything with the tar command from the source server.

I had to use this solution, when I was migrating quite a few racks bare metal server to VMware and some had softraid or LVM installed.

Steps to follow for this:

1: Create your target vm box

2: Install a minimum version of the same system that your source has (network, ssh server and tar must be available)

3: Create a list of directorys we don't want to include

boot proc dev sys etc/fstab etc/lvm etc/blkid mnt/yourexternalhdd

save it under /tmp/nocopy

4: Take a snapshot of your target in case something goes wrong

5: SSH to your source and as root: cd /; tar -zcvpf - -X /tmp/nocopy * |ssh target "cd /; tar -zxvpf - --numeric-owner" 6: Reset target.

E.G.:

tar -zcvpf - -X /tmp/nocopy * | ssh root@10.0.4.158 "cd /; tar -zxvpf - --numeric-owner"