From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server] hotplug pending: use machine type from running instance to avoid mismatch
Date: Mon, 3 Aug 2026 17:22:00 +0200 [thread overview]
Message-ID: <20260803152342.208291-1-f.ebner@proxmox.com> (raw)
The machine version from the configuration might be using the 'latest'
version, in which case the currently running machine version might be
different from the version of the installed QEMU binary. This is an
issue, because sub-calls of vmconfig_hotplug_pending() like
print_drivedevice_full() use the binary version as a fallback when
there is an unresolved 'latest' version. Hotplug needs to respect the
current running machine version for migration compatibility.
This also allows simplifying the call for the USB hotplug check,
because the 'latest' version is now already resolved to the explicit
version.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 9aec7f9c..d8dd9ea1 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -4602,7 +4602,7 @@ sub vmconfig_hotplug_pending {
my $defaults = load_defaults();
my $arch = PVE::QemuServer::Helpers::get_vm_arch($conf);
- my $machine_type = PVE::QemuServer::Machine::get_vm_machine($conf);
+ my $machine_type = PVE::QemuServer::Machine::get_current_qemu_machine($vmid);
# commit values which do not have any impact on running VM first
# Note: those option cannot raise errors, we we do not care about
@@ -4701,7 +4701,7 @@ sub vmconfig_hotplug_pending {
my $is_usb_hotplug_supported = sub {
return $usb_hotplug if defined($usb_hotplug);
my $ostype = $conf->{ostype};
- my $version = extract_version($machine_type, get_running_qemu_version($vmid));
+ my $version = PVE::QemuServer::Machine::extract_version($machine_type);
$usb_hotplug =
$hotplug_features->{usb}
&& min_version($version, 7, 1)
--
2.47.3
reply other threads:[~2026-08-03 15:23 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=20260803152342.208291-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