]> git.proxmox.com Git - qemu-server.git/commit
Fix #1717: delete snapshot when vm running and drive not attached
authorAlexandre Derumier <aderumier@odiso.com>
Wed, 11 Jul 2018 11:55:53 +0000 (13:55 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 19 Jul 2018 08:42:03 +0000 (10:42 +0200)
commita2f1554b6eff7deefea6aec6dac1ca8bdfc5cece
tree5dbc8554e976b930dc68c21e048a6e081f062666
parentc2eb7ec274c7404121b9430528398ddc127bad1b
Fix #1717: delete snapshot when vm running and drive not attached

changelog v2:
 - remove hash
 - remove check if cdrom

if we try to delete a snapshot, and that is disk from the snapshot
is not attached anymore (unused), we can't delete the snapshot
with qemu snapshot delete command (for storage which use it (qcow2,rbd,...))

example:

...
unused0: rbd:vm-107-disk-3

[snap1]
...
scsi2: rbd:vm-107-disk-3,size=1G

-> die
 qmp command 'delete-drive-snapshot' failed - Device 'drive-scsi2' not found

If drive is not attached, we need to use the storage snapshot delete command
PVE/QemuServer.pm