[pve-devel] applied: [RFC storage] rbd: unprotect all snapshots on image removal

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Dec 11 10:55:34 CET 2019

On 11/29/19 12:00 PM, Fabian Grünbichler wrote:
> we need to unprotect more snapshots than just the base one, since we
> allow linked clones of regular VM snapshots. unprotection will only work
> if no linked clones exist anymore.
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> it's still rather ugly if such a linked clone exists, since unprotection
> and thus deletion will fail, but the VM config is gone. at least with
> this patch, "pvesm free storage:image" will work after
> removing/flattening all the linked clones ;)
> alternatively we could iterate over all snapshots in vm_destroy and
> attempt to delete them (which will unprotect them in case of RBD),
> leaving non-PVE-managed snapshots untouched.
>  PVE/Storage/RBDPlugin.pm | 39 +++++++++++++++++++++++++++++++++++----
>  1 file changed, 35 insertions(+), 4 deletions(-)

applied, thanks!

More information about the pve-devel mailing list