From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 3/5] plugin: use relative path for qcow2 rebase command
Date: Tue, 29 Jul 2025 09:38:42 +0200 [thread overview]
Message-ID: <20250729073844.185466-4-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20250729073844.185466-1-f.gruenbichler@proxmox.com>
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>
---
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',
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-29 7:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 7:38 [pve-devel] [PATCH storage/qemu-server 0/5] avoid absolute qcow2 references Fabian Grünbichler
2025-07-29 7:38 ` [pve-devel] [PATCH storage 1/5] plugin: fix typo in rebase log message Fabian Grünbichler
2025-07-29 8:09 ` Fiona Ebner
2025-07-29 7:38 ` [pve-devel] [PATCH storage 2/5] lvm " Fabian Grünbichler
2025-07-29 8:09 ` Fiona Ebner
2025-07-29 7:38 ` Fabian Grünbichler [this message]
2025-07-29 9:01 ` [pve-devel] [PATCH storage 3/5] plugin: use relative path for qcow2 rebase command Fiona Ebner
2025-07-29 7:38 ` [pve-devel] [PATCH storage 4/5] lvm " Fabian Grünbichler
2025-07-29 9:04 ` Fiona Ebner
2025-07-29 7:38 ` [pve-devel] [PATCH qemu-server 5/5] blockdev-stream/-commit: make backing file relative Fabian Grünbichler
2025-07-29 9:17 ` Fiona Ebner
2025-07-29 12:02 ` [pve-devel] superseded: [PATCH storage/qemu-server 0/5] avoid absolute qcow2 references Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250729073844.185466-4-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox