[PVE-User] pvesh delete /nodes/{node}/qemu/{vmid}/snapshot/{snapname} -force doesnt work as expected ?
IMMO WETZEL
IMMO.WETZEL at adtran.com
Thu Nov 24 13:41:16 CET 2016
Hi,
help command shows delete snapshot with option force but this isnt executed correctly.
See output below. Or do I something wrong ?
Background: The snapshot doesnt exists in qcow2 disk file but in config. Therefore force should help as expected and remove the snapshot entry from the config file.
root at prox01:/root# pvesh help /nodes/prox05/qemu/161/snapshot/initialSnapShot --verbose
help [path] [--verbose]
cd [path]
ls [path]
USAGE: delete /nodes/{node}/qemu/{vmid}/snapshot/{snapname} [OPTIONS]
Delete a VM snapshot.
-force boolean
For removal from config file, even if removing disk snapshots
fails.
...
So -force should be the one I need.
But see here:
root at prox01:/root# pvesh delete /nodes/prox05/qemu/161/snapshot/initialSnapShot -force
usage: delete [path]
So why I see the usage string here ?
Following is correct cos snapshot can't be found
root at prox01:/root# pvesh delete /nodes/prox05/qemu/161/snapshot/initialSnapShot
command '/usr/bin/qemu-img snapshot -d initialSnapShot /mnt/pve/Storage/images/161/vm-161-disk-1.qcow2' failed: exit code 1
qemu-img: Could not delete snapshot 'initialSnapShot': (Can't find the snapshot)
UPID:prox05:00007C50:48ACCCD1:5836D31B:qmdelsnapshot:161:root at pam:200 OK
More information about the pve-user
mailing list