Migrating from RAW LVM to qcow2

totalimpact

Renowned Member
Dec 12, 2010
133
18
83
I guess this is more for posterity and reference as I didnt find much on it here...

Main questions- is this sane? am i missing anything?

Currently I have a RAW LVM storage media (block devices), on local volume group called VMStor1, and wish to move to a normal ext3 formatted array mounted at /mnt/VMStor2.

shutdown VM.... convert:
Code:
qemu-img convert -O qcow2 /dev/VMStor1/vm-100-disk-1 /mnt/VMStor2/images/100/vm-100-disk-1.qcow2

change storage /etc/pve/qemu-server/100.conf to this:
Code:
virtio0: VMStor2:100/vm-100-disk-1.qcow2,size=8G
restart VM

I know RAW is typically rated as fasterr, but newer qcow2 seems to show better performance closing that gap, and offers instant snapshotting, which I ffind more important than speed in this scenario.... am I missing anything else here??
 
I guess this is more for posterity and reference as I didnt find much on it here...

Main questions- is this sane? am i missing anything?

Currently I have a RAW LVM storage media (block devices), on local volume group called VMStor1, and wish to move to a normal ext3 formatted array mounted at /mnt/VMStor2.

shutdown VM.... convert:
Code:
qemu-img convert -O qcow2 /dev/VMStor1/vm-100-disk-1 /mnt/VMStor2/images/100/vm-100-disk-1.qcow2

change storage /etc/pve/qemu-server/100.conf to this:
Code:
virtio0: VMStor2:100/vm-100-disk-1.qcow2,size=8G
restart VM

I know RAW is typically rated as fasterr, but newer qcow2 seems to show better performance closing that gap, and offers instant snapshotting, which I ffind more important than speed in this scenario.... am I missing anything else here??
I'm trying to move a VM from a RAW LVM to another server with same RAW LVM,
Can I Convert it to qcow2, transfer the file and then convert it back to RAW LVM ?
 
I'm trying to move a VM from a RAW LVM to another server with same RAW LVM, Can I Convert it to qcow2, transfer the file and then convert it back to RAW LVM ?

Hi,
if your storage is a "shared storage", available to all cluster servers, you can "live" move the VM to the other server, without stopping it or have clients to disconnect. this usually works with any kind of shared storage, including LVM raw devices. Ie: you don't need the intermediate qcow2 step.

and on a "shared storage" also storage migration works, ie: you can keep the VM on the same server and make its disks move from one storage to another (and you can also convert it to any other storage type while doing this).

in the future, as reported by the current roadmap ("Live migration with local storage (qemu) to the gui") something like this could be possible even with local storage, due to new features of virtualization software (qemu). Note this is already possible from 5.0 but not from the web gui.
 
It's not like that, hence Storage is shared but each Host is currently connected to a Separate LUN.
I've done the migration with less risky method :

Turned off the VM on the source machine and convert it to a RAW Image :
qemu-img convert -p /dev/VG_Group/LV_specific_for_vm -O raw /root/tempdisk/vm.raw.img

On the proxmox on target machine, first create the VM so its LV with it's schema get created.
Then on the target host, we've transfered the image into our LV

dd if=/dev/tempdisk/vm.raw.img of=/dev/VG_Group/LV_VM
 
Hi,

I'm joining to this topic due to the kvm (lvm images) to Proxmox migration waiting for me at the customer environment. My customer has pure kvm virtualization with vm disk as lvm volumes on OVH VPS server and would like to move it to own server room in his building and switch it to Proxmox VE.

What steps you suggest for the best and safest migration apart from backup of course?

Does the
Code:
qemu-img convert -O qcow2 ...
will be enough?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!