* [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side
@ 2026-11-10 11:47 Fiona Ebner
2026-11-11 9:54 ` applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-11-10 11:47 UTC (permalink / raw)
To: pve-devel
A migration with both NBD storage migration and a passed-through
device (with shared=1, otherwise migration fails on the source side
already) would fail with "unable to parse volume ID 'XYZ'" on the
target side. The problematic call is parse_volume_id() in
vm_migrate_get_nbd_disks(). Without NBD storage migration, this is
not reached. Fix the bug by adding the same check for absolute paths
that scan_local_volumes() does on the source side.
Note that remote migration does not use vm_migrate_get_nbd_disks(),
but does its own NBD handling and absolute paths are limited to
'root@pam' only, so a configuration with absolute paths is denied for
the API token used for remote migration, when the volume access is
checked.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 8149184e..9f8c7b13 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5225,6 +5225,12 @@ sub vm_migrate_get_nbd_disks {
return if !$volid;
+ # Matching the check in scan_local_volumes().
+ if ($volid =~ m|^/|) {
+ return if $drive->{shared};
+ die "$ds: unexpected non-shared local file/device '$volid'\n";
+ }
+
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* applied: [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side
2026-11-10 11:47 [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side Fiona Ebner
@ 2026-11-11 9:54 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2026-11-11 9:54 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Tue, 10 Nov 2026 12:47:21 +0100, Fiona Ebner wrote:
> A migration with both NBD storage migration and a passed-through
> device (with shared=1, otherwise migration fails on the source side
> already) would fail with "unable to parse volume ID 'XYZ'" on the
> target side. The problematic call is parse_volume_id() in
> vm_migrate_get_nbd_disks(). Without NBD storage migration, this is
> not reached. Fix the bug by adding the same check for absolute paths
> that scan_local_volumes() does on the source side.
>
> [...]
Applied, thanks!
[1/1] fix #8251: migrate: nbd: align check for absolute path on target side
commit: 7d36250da4417c49c0367b721c16a747cad7a0f0
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-11 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 11:47 [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side Fiona Ebner
2026-11-11 9:54 ` applied: " Fabian Grünbichler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.