by https://lore.proxmox.com/pve-devel/20250729115320.579286-1-f.gruenbich...@proxmox.com/T/#t
On July 29, 2025 9:38 am, Fabian Grünbichler wrote: > we don't want qcow2 files to reference their backing chains via > absolute paths, as that makes renaming the base dir or VG of the storage > impossible. in most places, qemu already allows simply passing a > filename as backing-file reference, which will be interpreted as a > reference relative to the backed image. > > I haven't found any further code paths that trigger absolute references, > but I might have missed some. the full backing chain should show > relative backing-file members when queried via > > qemu-img info --output json --format qcow2 --backing-chain > /path/to/main/image.qcow2 > > such, as: > > "full-backing-filename": > "/var/lib/extsnap/images/210/snap-test2-vm-210-disk-0.qcow2", > "backing-filename": "snap-test2-vm-210-disk-0.qcow2", > > note that full-backing-filename will always contain the resolved, > absolute path and that is okay. we could warn about both members > containing full paths in `volume_snapshot_info`. > > for existing "broken" images, an "unsafe" rebase with > > qemu-img rebase -u -f qcow2 -F qcow2 -b <relative backing file path> > <absolute backed filed path> > > should just rewrite the qcow2 header to replace the backing file > reference - this should of course not be run while the image is being > written by other process or QEMU. > > pve-storage: > > Fabian Grünbichler (4): > plugin: fix typo in rebase log message > lvm plugin: fix typo in rebase log message > plugin: use relative path for qcow2 rebase command > lvm plugin: use relative path for qcow2 rebase command > > src/PVE/Storage/LVMPlugin.pm | 5 +++-- > src/PVE/Storage/Plugin.pm | 6 +++--- > 2 files changed, 6 insertions(+), 5 deletions(-) > > qemu-server: > > Fabian Grünbichler (1): > blockdev-stream/-commit: make backing file relative > > src/PVE/QemuServer/Blockdev.pm | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > -- > 2.39.5 > > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel