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 <f.gruenbich...@proxmox.com>
Reviewed-by: Fiona Ebner <f.eb...@proxmox.com>
Tested-by: Fiona Ebner <f.eb...@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 de41bfe..f54a38c 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',
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to