plugin: use relative path for qcow2 rebase command

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.gruenbichler@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250729115320.579286-4-f.gruenbichler@proxmox.com
This commit is contained in:
Fabian Grünbichler
2025-07-29 13:53:18 +02:00
committed by Fiona Ebner
parent 191cddac30
commit 7da44f56e4

View File

@ -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',