We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3b4815 commit f287f12Copy full SHA for f287f12
scripts/storage/qcow2/managesnapshot.sh
@@ -152,8 +152,8 @@ destroy_snapshot() {
152
fi
153
lvm lvremove -f "${vg}/${snapshotname}-cow"
154
elif [ -f $disk ]; then
155
- #delete all the existing snapshots
156
- $qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2
+ #delete all the existing disk snapshots
+ $qemu_img snapshot -l $disk |tail -n +3| grep -i '[0-9a-z]\{8\}-[0-9a-z]\{4\}' | awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2
157
if [ $? -gt 0 ]
158
then
159
failed=2
0 commit comments