Can't resize disk VM - block by snapshot.

krogac

Member
Jul 18, 2018
35
0
11
43
Hello,

i have VM which was migrate from pure KVM. I must resize disk of this VM, but PVE say "VM 101 qmp command 'block_resize' failed - Can't resize an image which has snapshots (500)"

I check by: qemu-img snapshot -l /path_to_vm_/vm.qcow2
and there was a snapshots. I remove them and now are any snapshots.
What can I do with this situation?
 
To resize qcow2 file with snapshots you have to copy each snapshot in a separate image file with qemu-img convert, resize all images with qemu-img resize, then rebase in order with qemu-img rebase each image on the appropriate precedent image (snapshot) and push to base with qemu-img commit and create a snapshot with qemu-img snapshot.