Source:Troubleshooting KVM QEMU
(Redirected from KVM QEMU Troubleshooting)
KVM/QEMU
Merging and deleting leftover snapshots
Problem
- The backup fails and the snapshot is left behind.
⇒ Solution
Use the virsh utility, as shown in the example:
- List the available snapshots for the domain:
- List the virtual disks for the domain:
- For each device that refers to SEP sesam snapshot, start a block commit to merge the snapshot:
- Confirm that the device is now switched to the original disk device:
- Delete the snapshot metadata information:
- Delete the snapshot file:
user@hypervisor:~$ virsh snapshot-list <domain_name> Name Creation Time State ------------------------------------------------------------ Sesam_SF20173828282@XXXX 2017-07-06 08:15:11 +0200 disk-snapshot
In this example, one leftover snapshot for this VM exists.
user@hypervisor:~$ virsh domblklist <domain_name> Target Source ------------------------------------------------ sda /path/to//Sesam_SF20173828282@XXXX.snapshot
user@hypervisor:~$ virsh blockcommit <domain_name> sda --active --verbose --pivot Block Commit: [100 %] Successfully pivoted
user@hypervisor:~$ virsh domblklist <domain_name> Target Source ------------------------------------------------ sda /my/original/base.img
user@hypervisor:~$ virsh snapshot-delete <domain_name> --metadata --snapshotname Sesam_SF20173828282@XXXX Domain snapshot sesam_snapshot deleted
user@hypervisor:~$ rm /path/to//Sesam_SF20173828282@XXXX.snapshot
Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.