Vmware 2 LVM conversion

Creol123

New Member
Jun 1, 2016
2
0
1
52
Is it possible to convert a VM from vSphere to an LVM in PVE?

I have seen a lot of old posts about moving the vmdk's to the PVE server and then running qemu-img convert, but that created a raw file. How do you then turn that into an lvm disk? can you just use dd?

I have one server that I cannot easily rebuild. It is linux so I am hoping that there is some way to do this. Any help is appreciated.

Chris
 
Hi,

You can use qemu-img.
So the easiest way is create a new VM on PVE with the same disksize on LVM.
Then you convert with qemu-img to the new lvm dev.
 
So it would look something like this?
1. Copy the VMDK to the PVE server using scp
2. convert to raw... or is there a direct convertion to lv?
qemu-img convert client.vmdk -O raw client.raw
3. create VM in PVE with 50GB(for example) using webgui
4. dd if=/path/to/client.raw of=/dev/same/as/new_vm_lv

Does that look right? I will try tonight if I get some time. I keep getting pulled away for other work. Ugh!

Thanks wolfgang!
 
It's possible to write directly to existing lv. I've used commands like following, and it worked fine:

qemu-img convert -p -f vmdk -O raw ./vmdisk01.vmdk /dev/pve/vm-101-disk-1​