* [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side
@ 2026-11-10 11:47 Fiona Ebner
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2026-11-10 11:48 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox