all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Nicolas Frey <n.frey@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server 1/3] drive: add helper to detect VirtIO driver ISOs with known issues
Date: Wed, 16 Sep 2026 12:23:23 +0200	[thread overview]
Message-ID: <s8old91qyuc.fsf@toolbox> (raw)
In-Reply-To: <20260915143237.1033142-2-n.frey@proxmox.com> (Nicolas Frey's message of "Tue, 15 Sep 2026 16:32:35 +0200")

Nicolas Frey <n.frey@proxmox.com> writes:

> the wiki lists version ranges of the VirtIO driver ISO for Windows that
> are known to cause issues. these helpers should be the single source of
> truth in code for checking these known issues.
>
> Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
> ---
>  src/PVE/QemuServer/Drive.pm | 61 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
>
> diff --git a/src/PVE/QemuServer/Drive.pm b/src/PVE/QemuServer/Drive.pm
> index 17c46f36..9839bb48 100644
> --- a/src/PVE/QemuServer/Drive.pm
> +++ b/src/PVE/QemuServer/Drive.pm
> @@ -13,6 +13,7 @@ use PVE::Storage;
>  use PVE::Storage::Common;
>  use PVE::JSONSchema qw(get_standard_option);
>  
> +use PVE::QemuServer::Helpers;
>  use PVE::QemuServer::Monitor qw(qsd_qmp_peer vm_qmp_peer);
>  
>  use base qw(Exporter);
> @@ -766,6 +767,66 @@ sub drive_is_cdrom {
>      return $drive && $drive->{media} && ($drive->{media} eq 'cdrom');
>  }
>  
> +# version ranges of the VirtIO driver ISO for Windows that are known to cause issues, see
> +# https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers#Known_Issues
> +my $virtio_win_issues = [
> +    { from => [0, 1, 215], to => [0, 1, 262] }, { from => [0, 1, 285], to => [0, 1, 285] },
> +];
> +
> +# returns the version of the VirtIO driver ISO referenced by $volid if it is known to cause
> +# issues, undef otherwise
> +sub virtio_win_iso_issue {
> +    my ($volid) = @_;
> +
> +    my @version = ($volid // '') =~ m/virtio-win[_-](\d+)\.(\d+)\.(\d+)/i;
> +    return if !@version;
> +
> +    my $cmp_with = sub {
> +        my ($other) = @_;
> +
> +        return PVE::QemuServer::Helpers::version_cmp(map { ($version[$_], $other->[$_]) }
> +            0 .. 2);
> +    };
> +
> +    for my $issue ($virtio_win_issues->@*) {
> +        return join('.', @version)
> +            if $cmp_with->($issue->{from}) >= 0 && $cmp_with->($issue->{to}) <= 0;
> +    }
> +
> +    return;
> +}
> +
> +# warn if the CD-ROM drive $opt contains a VirtIO driver ISO that is known to cause issues
> +sub warn_about_virtio_win_issues {
> +    my ($opt, $volid) = @_;
> +
> +    my $version = virtio_win_iso_issue($volid);
> +    return if !defined($version);
> +
> +    log_warn("$opt: version $version of the VirtIO drivers for Windows is known to cause issues,"
> +        . " see https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers#Known_Issues");
> +
> +    return;

cosmetic nit: This return might be redundant.

> +}
> +
> +# warn about every CD-ROM drive in $conf that contains a problematic VirtIO driver ISO
> +sub warn_about_virtio_win_issues_in_config {
> +    my ($conf) = @_;
> +
> +    return if !PVE::QemuServer::Helpers::windows_version($conf->{ostype});
> +
> +    for my $opt (valid_drive_names()) {
> +        next if !defined($conf->{$opt});
> +
> +        my $drive = eval { parse_drive($opt, $conf->{$opt}) };
> +        next if !$drive || !drive_is_cdrom($drive, 1);
> +
> +        warn_about_virtio_win_issues($opt, $drive->{file});
> +    }
> +
> +    return;

cosmetic nit: This return might be redundant.

> +}
> +
>  sub parse_drive_interface {
>      my ($key) = @_;

-- 
Maximiliano




  parent reply	other threads:[~2026-09-16 10:23 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 [this message]
2026-09-15 14:32 ` [PATCH qemu-server 2/3] partially fix #7801: api: warn about problematic VirtIO driver ISOs Nicolas Frey
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=s8old91qyuc.fsf@toolbox \
    --to=m.sandoval@proxmox.com \
    --cc=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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal