I need to resize an image and receive an error when using qemu-img the resize is not supported because snapshots exist. Sure enough, even though virt-manager does not show any snapshots, I see the following when listing the snapshots with qemu-img:

[root@nebula216-1 ~]# qemu-img snapshot -l /vm_images/valuelynk-www.img
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         snapshot1                 0 2017-12-20 00:47:40   00:00:00.000
2         pre-upgrade-freebsd11   2.0G 2018-05-19 14:58:50  165:51:36.706
3         freebsd11-mysqlsslrepl      0 2018-05-20 12:18:42   21:07:22.606

The problem is, this VM has two disks and both show these same snapshots. How can I get virt-manager in sync or safely delete all snapshots so I can resize the image?

It seems using qemu-img to remove all snapshots from both disks works just fine. At least on a test server, I was able to do the following for all three snapshots on both images:

qemu-img snapshot -d $SNAPSHOT_NAME $DISK_IMAGE

Afterward, the qemu-img resize worked without issue.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.