From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server] fix #8251: migrate: nbd: align check for absolute path on target side
Date: Tue, 10 Nov 2026 12:47:21 +0100 [thread overview]
Message-ID: <20261110114818.78160-1-f.ebner@proxmox.com> (raw)
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
reply other threads:[~2026-11-10 11:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261110114818.78160-1-f.ebner@proxmox.com \
--to=f.ebner@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