public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Nicolas Frey <n.frey@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/3] partially fix #7801: api: warn about problematic VirtIO driver ISOs
Date: Tue, 15 Sep 2026 16:32:36 +0200	[thread overview]
Message-ID: <20260915143237.1033142-3-n.frey@proxmox.com> (raw)
In-Reply-To: <20260915143237.1033142-1-n.frey@proxmox.com>

Warn when a CD-ROM drive of a Windows guest gets a VirtIO driver ISO
with known issues assigned on update and create.

The OS type can be set in the same request as the drive, so prefer a
newly requested one over the one from the configuration.

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 71247eec..b2860a49 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -1511,6 +1511,8 @@ __PACKAGE__->register_method({
                     my $vga = PVE::QemuServer::parse_vga($conf->{vga});
                     PVE::QemuServer::assert_clipboard_config($vga);
 
+                    PVE::QemuServer::Drive::warn_about_virtio_win_issues_in_config($conf);
+
                     # auto generate uuid if user did not specify smbios1 option
                     if (!$conf->{smbios1}) {
                         $conf->{smbios1} = PVE::QemuServer::generate_smbios1_uuid();
@@ -2411,6 +2413,15 @@ my $update_vm_api = sub {
 
                 # new drive
                 $check_drive_perms->($opt, $param->{$opt});
+
+                # warn about virtio win known issues only on windows
+                my $ostype = $param->{ostype} // $conf->{pending}->{ostype} // $conf->{ostype};
+                if (PVE::QemuServer::Helpers::windows_version($ostype)) {
+                    my $drive = PVE::QemuServer::parse_drive($opt, $param->{$opt}, 1);
+                    PVE::QemuServer::Drive::warn_about_virtio_win_issues($opt, $drive->{file})
+                        if $drive && PVE::QemuServer::drive_is_cdrom($drive, 1);
+                }
+
                 PVE::QemuServer::vmconfig_register_unused_drive(
                     $storecfg,
                     $vmid,
-- 
2.47.3




  parent reply	other threads:[~2026-09-15 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 14:32 [PATCH qemu-server 0/3] fix #7801: warn about problematic VirtIO ISOs Nicolas Frey
2026-09-15 14:32 ` [PATCH qemu-server 1/3] drive: add helper to detect VirtIO driver ISOs with known issues Nicolas Frey
2026-09-16 10:16   ` Maximiliano Sandoval
2026-09-16 10:23   ` Maximiliano Sandoval
2026-09-15 14:32 ` Nicolas Frey [this message]
2026-09-15 14:32 ` [PATCH qemu-server 3/3] partially fix #7801: vm start: warn about problematic VirtIO ISOs Nicolas Frey
2026-09-16 10:21 ` [PATCH qemu-server 0/3] fix #7801: " Maximiliano Sandoval
2026-09-16 10:26   ` Maximiliano Sandoval
2026-09-17 13:17 ` Jonas Theisen

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=20260915143237.1033142-3-n.frey@proxmox.com \
    --to=n.frey@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal