[pve-devel] [PATCH storage 3/5] plugin: use relative path for qcow2 rebase command
Fiona Ebner
f.ebner at proxmox.com
Tue Jul 29 11:01:38 CEST 2025
Am 29.07.25 um 9:39 AM schrieb Fabian Grünbichler:
> 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 at proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>
Tested-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> src/PVE/Storage/Plugin.pm | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 99e0e76..48cda30 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -1434,15 +1434,15 @@ 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";
> - print "running 'qemu-img rebase -b $parentpath -F qcow2 -f qcow2 $childpath'\n";
> + my $rel_parent_path = get_snap_name($class, $volname, $parentsnap);
> + print "running 'qemu-img rebase -b $rel_parent_path -F qcow2 -f qcow2 $childpath'\n";
> $cmd = [
> '/usr/bin/qemu-img',
> 'rebase',
> '-b',
> - $parentpath,
> + $rel_parent_path,
> '-F',
> 'qcow2',
> '-f',
More information about the pve-devel
mailing list