From 7da44f56e40e887e03a8bbeb608e68137247f02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 29 Jul 2025 13:53:18 +0200 Subject: [PATCH] plugin: use relative path for qcow2 rebase command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise the resulting qcow2 file will contain an absolute path, which makes changing the backing path of the directory storage impossible. Signed-off-by: Fabian Grünbichler Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Link: https://lore.proxmox.com/20250729115320.579286-4-f.gruenbichler@proxmox.com --- src/PVE/Storage/Plugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 0b3b64a..66de14f 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -1434,14 +1434,14 @@ sub volume_snapshot_delete { } else { #we rebase the child image on the parent as new backing image - my $parentpath = $snapshots->{$parentsnap}->{file}; print "$volname: deleting snapshot '$snap' by rebasing '$childsnap' on top of '$parentsnap'\n"; + my $rel_parent_path = get_snap_name($class, $volname, $parentsnap); $cmd = [ '/usr/bin/qemu-img', 'rebase', '-b', - $parentpath, + $rel_parent_path, '-F', 'qcow2', '-f',