Bug 2136425 - Windows 11 is detected as Windows 10
Summary: Windows 11 is detected as Windows 10
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.11.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.13.0
Assignee: Aviv Turgeman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks: 2156246
TreeView+ depends on / blocked
 
Reported: 2022-10-20 09:14 UTC by Dominik Holler
Modified: 2023-02-09 11:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2156246 (view as bug list)
Environment:
Last Closed: 2023-01-24 13:41:30 UTC
Target Upstream Version:
Embargoed:
lkladnit: needinfo-


Attachments (Terms of Use)
screenshot (158.18 KB, image/png)
2022-10-20 09:14 UTC, Dominik Holler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 932 0 None Merged Bug 2136425: Windows 11 is detected as Windows 10 2022-10-31 09:34:59 UTC
Github kubevirt-ui kubevirt-plugin pull 984 0 None open Bug 2136425: Windows 11 is detected as Windows 10 2022-11-24 08:36:58 UTC
Red Hat Issue Tracker CNV-21965 0 None None None 2022-10-27 15:10:47 UTC
Red Hat Product Errata RHSA-2023:0408 0 None None None 2023-01-24 13:41:41 UTC

Description Dominik Holler 2022-10-20 09:14:34 UTC
Created attachment 1919209 [details]
screenshot

Created attachment 1919209 [details]
screenshot

Description of problem:
  In the VM Overview, a Windows 11 VM is shown as "Operating system Windows 10 Pro"


Version-Release number of selected component (if applicable):

OpenShift Virtualization 4.11.1-42 and virtio-win 1.9.24


Steps to Reproduce:
1. Create a Windows 11 VM with guest agent installed, e.g. using the attached yaml
2. Have a look at the Overview tab of the VM in the UI
3.

Actual results:
Windows 11 VM is shown as "Operating system Windows 10 Pro"

Expected results:
Windows 11 VM is shown as "Operating system Windows 11 Pro"

Comment 2 Guohua Ouyang 2022-10-20 12:31:17 UTC
This looks like a backend issue to me, I will test it before move to virt.

Comment 3 Aviv Turgeman 2022-10-23 11:08:49 UTC
Hi Dominik thanks for opening this issue,

I have a follow-up question, if you switch between the VM's tabs

Comment 4 Aviv Turgeman 2022-10-23 11:13:06 UTC
(In reply to Aviv Turgeman from comment #3)
> Hi Dominik thanks for opening this issue,
> 
> I have a follow-up question, if you switch between the VM's tabs
if you switch between the VM's tabs does the operating system info changes? this might point to a UI issue

Comment 5 Dominik Holler 2022-10-24 08:20:54 UTC
The UI seems to get this value from kubevirt's VMI, the VMI seems to get this value from the qemu-guest-agent:

[dominik@p1gen3 yaml]$ oc get pods
NAME                                          READY   STATUS    RESTARTS   AGE
virt-launcher-rhel9-married-tarantula-2vs7p   1/1     Running   0          29m
virt-launcher-win11-vm0-l7zx6                 3/3     Running   0          80m
[dominik@p1gen3 yaml]$ oc exec --stdin --tty   virt-launcher-win11-vm0-l7zx6 -- virsh  qemu-agent-command default_win11-vm0 '{"execute":"guest-get-osinfo", "arguments":{}}'
Defaulting container name to compute.
Use 'oc describe pod/virt-launcher-win11-vm0-l7zx6 -n default' to see all of the containers in this pod.
Authorization not available. Check if polkit service is running or see debug message for more information.
{"return":{"name":"Microsoft Windows","kernel-release":"22621","version":"Microsoft Windows 11","variant":"client","pretty-name":"Windows 10 Pro","version-id":"11","variant-id":"client","kernel-version":"10.0","machine":"x86_64","id":"mswindows"}}

[dominik@p1gen3 yaml]$ oc exec --stdin --tty   virt-launcher-win11-vm0-l7zx6 -- virsh  qemu-agent-command default_win11-vm0 '{"execute":"guest-info", "arguments":{}}'
Defaulting container name to compute.
Use 'oc describe pod/virt-launcher-win11-vm0-l7zx6 -n default' to see all of the containers in this pod.
Authorization not available. Check if polkit service is running or see debug message for more information.
{"return":{"version":"102.10.0","supported_commands":[{"enabled":true,"name":"guest-get-devices","success-response":true},{"enabled":true,"name":"guest-get-osinfo","success-response":true},{"enabled":true,"name":"guest-get-timezone","success-response":true},{"enabled":true,"name":"guest-get-users","success-response":true},{"enabled":true,"name":"guest-get-host-name","success-response":true},{"enabled":true,"name":"guest-exec","success-response":true},{"enabled":true,"name":"guest-exec-status","success-response":true},{"enabled":false,"name":"guest-get-memory-block-info","success-response":true},{"enabled":false,"name":"guest-set-memory-blocks","success-response":true},{"enabled":false,"name":"guest-get-memory-blocks","success-response":true},{"enabled":true,"name":"guest-set-user-password","success-response":true},{"enabled":true,"name":"guest-get-fsinfo","success-response":true},{"enabled":true,"name":"guest-get-disks","success-response":true},{"enabled":false,"name":"guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-get-vcpus","success-response":true},{"enabled":true,"name":"guest-network-get-interfaces","success-response":true},{"enabled":false,"name":"guest-suspend-hybrid","success-response":false},{"enabled":true,"name":"guest-suspend-ram","success-response":false},{"enabled":true,"name":"guest-suspend-disk","success-response":false},{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze-list","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{"enabled":true,"name":"guest-file-flush","success-response":true},{"enabled":true,"name":"guest-file-seek","success-response":true},{"enabled":true,"name":"guest-file-write","success-response":true},{"enabled":true,"name":"guest-file-read","success-response":true},{"enabled":true,"name":"guest-file-close","success-response":true},{"enabled":true,"name":"guest-file-open","success-response":true},{"enabled":true,"name":"guest-shutdown","success-response":false},{"enabled":true,"name":"guest-info","success-response":true},{"enabled":true,"name":"guest-set-time","success-response":true},{"enabled":true,"name":"guest-get-time","success-response":true},{"enabled":true,"name":"guest-ping","success-response":true},{"enabled":true,"name":"guest-sync","success-response":true},{"enabled":true,"name":"guest-sync-delimited","success-response":true}]}}

Vadim, is the qemu-guest-agent expected to provide a pretty-name for Windows 11?

Comment 6 Dominik Holler 2022-10-24 08:47:41 UTC
same behavior on guest agent 104 from virtio-win 1.9.28 :

[dominik@p1gen3 yaml]$ oc get pods
NAME                                          READY   STATUS    RESTARTS   AGE
virt-launcher-rhel9-married-tarantula-2vs7p   1/1     Running   0          57m
virt-launcher-win11-vm0-szkfs                 3/3     Running   0          2m9s
[dominik@p1gen3 yaml]$ oc exec --stdin --tty   virt-launcher-win11-vm0-szkfs -- virsh  qemu-agent-command default_win11-vm0 '{"execute":"guest-get-osinfo", "arguments":{}}'
Defaulting container name to compute.
Use 'oc describe pod/virt-launcher-win11-vm0-szkfs -n default' to see all of the containers in this pod.
Authorization not available. Check if polkit service is running or see debug message for more information.
{"return":{"name":"Microsoft Windows","kernel-release":"22621","version":"Microsoft Windows 11","variant":"client","pretty-name":"Windows 10 Pro","version-id":"11","variant-id":"client","kernel-version":"10.0","machine":"x86_64","id":"mswindows"}}

[dominik@p1gen3 yaml]$ oc exec --stdin --tty   virt-launcher-win11-vm0-szkfs -- virsh  qemu-agent-command default_win11-vm0 '{"execute":"guest-info", "arguments":{}}'
+Defaulting container name to compute.
Use 'oc describe pod/virt-launcher-win11-vm0-szkfs -n default' to see all of the containers in this pod.
++Authorization not available. Check if polkit service is running or see debug message for more information.
{"return":{"version":"104.0.2","supported_commands":[{"enabled":true,"name":"guest-get-devices","success-response":true},{"enabled":true,"name":"guest-get-osinfo","success-response":true},{"enabled":true,"name":"guest-get-timezone","success-response":true},{"enabled":true,"name":"guest-get-users","success-response":true},{"enabled":true,"name":"guest-get-host-name","success-response":true},{"enabled":true,"name":"guest-exec","success-response":true},{"enabled":true,"name":"guest-exec-status","success-response":true},{"enabled":false,"name":"guest-get-memory-block-info","success-response":true},{"enabled":false,"name":"guest-set-memory-blocks","success-response":true},{"enabled":false,"name":"guest-get-memory-blocks","success-response":true},{"enabled":true,"name":"guest-set-user-password","success-response":true},{"enabled":true,"name":"guest-get-fsinfo","success-response":true},{"enabled":true,"name":"guest-get-disks","success-response":true},{"enabled":false,"name":"guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-get-vcpus","success-response":true},{"enabled":true,"name":"guest-network-get-interfaces","success-response":true},{"enabled":false,"name":"guest-suspend-hybrid","success-response":false},{"enabled":true,"name":"guest-suspend-ram","success-response":false},{"enabled":true,"name":"guest-suspend-disk","success-response":false},{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze-list","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{"enabled":true,"name":"guest-file-flush","success-response":true},{"enabled":true,"name":"guest-file-seek","success-response":true},{"enabled":true,"name":"guest-file-write","success-response":true},{"enabled":true,"name":"guest-file-read","success-response":true},{"enabled":true,"name":"guest-file-close","success-response":true},{"enabled":true,"name":"guest-file-open","success-response":true},{"enabled":true,"name":"guest-shutdown","success-response":false},{"enabled":true,"name":"guest-info","success-response":true},{"enabled":true,"name":"guest-set-time","success-response":true},{"enabled":true,"name":"guest-get-time","success-response":true},{"enabled":true,"name":"guest-ping","success-response":true},{"enabled":true,"name":"guest-sync","success-response":true},{"enabled":true,"name":"guest-sync-delimited","success-response":true}]}}

Comment 7 Aviv Turgeman 2022-10-24 10:12:25 UTC
Hi Dominik

according to the data provided by you, the UI has no issue
the operating system information is taken from the guest agent from the prettyName attribute which here I see it's `Windows 10 Pro` in both cases you shown
just in case we do not have any info from prettyName attr we fallback to the name attr.

Comment 8 Guohua Ouyang 2022-10-24 10:17:34 UTC
set the correct needinfo

Comment 11 Dominik Holler 2022-10-25 11:21:20 UTC
The qemu-guest-agent is doing what it is claiming to do: 
in https://github.com/qemu/qemu/blob/2906f933dd1de6d94c54881cc16ea7390a6ba300/qga/qapi-schema.json#L1322 it says "Windows: product name" and in https://github.com/qemu/qemu/blob/2906f933dd1de6d94c54881cc16ea7390a6ba300/qga/commands-win32.c#L2256 it extracts the "ProductName" from the registry.
So if Windows 11 thinks that the product name is "Windows 10", this information is forwarded.

One way of solving this might be to change the definition of the "pretty-name" of the qemu-guest-agent, which might be pretty, but might break backward compatibility.
Another solution would be to add a new attribute to the GuestAgentInfo, which contains something which is easy to understand for the user, e.g. "Windows 11 Pro" or even "Windows 11 Pro (22H2)".
A third solution might be to propagate the user-relevant information, maybe GuestAgentInfo.name and GuestAgentInfo.version, via kubevirt to OpenShift Virtualization UI.

What is the qemu-guest-agent view on this?




just for reference, an example GuestAgentInfo for RHEL:
virsh --connect qemu:///system  qemu-agent-command rhel9 '{"execute":"guest-get-osinfo", "arguments":{}}'
{"return":{"name":"Red Hat Enterprise Linux","kernel-release":"5.14.0-142.el9.x86_64","version":"9.1 (Plow)","pretty-name":"Red Hat Enterprise Linux 9.1 Beta (Plow)","version-id":"9.1","kernel-version":"#1 SMP PREEMPT_DYNAMIC Thu Aug 4 15:31:24 EDT 2022","machine":"x86_64","id":"rhel"}}

Comment 12 Kostiantyn Kostiuk 2022-10-25 16:36:44 UTC
Hi Dominik,

The guest agent returns only the proper "version" and "version-id" for Windows 11.
The "pretty-name" is read from the registry and will be incorrect until the
MS updates the registry. We do not have any solution to get "pretty-name" without
localization and a proper Windows number.


This question was discussed previously.
https://bugzilla.redhat.com/show_bug.cgi?id=1998919#c8 - reference from the previous discussions.

Comment 13 Yvugenfi@redhat.com 2022-10-26 10:51:33 UTC
(In reply to Dominik Holler from comment #11)
> The qemu-guest-agent is doing what it is claiming to do: 
> in
> https://github.com/qemu/qemu/blob/2906f933dd1de6d94c54881cc16ea7390a6ba300/
> qga/qapi-schema.json#L1322 it says "Windows: product name" and in
> https://github.com/qemu/qemu/blob/2906f933dd1de6d94c54881cc16ea7390a6ba300/
> qga/commands-win32.c#L2256 it extracts the "ProductName" from the registry.
> So if Windows 11 thinks that the product name is "Windows 10", this
> information is forwarded.
> 
> One way of solving this might be to change the definition of the
> "pretty-name" of the qemu-guest-agent, which might be pretty, but might
> break backward compatibility.
> Another solution would be to add a new attribute to the GuestAgentInfo,
> which contains something which is easy to understand for the user, e.g.
> "Windows 11 Pro" or even "Windows 11 Pro (22H2)".
> A third solution might be to propagate the user-relevant information, maybe
> GuestAgentInfo.name and GuestAgentInfo.version, via kubevirt to OpenShift
> Virtualization UI.
> 
> What is the qemu-guest-agent view on this?
> 
> 
> 
> 
> just for reference, an example GuestAgentInfo for RHEL:
> virsh --connect qemu:///system  qemu-agent-command rhel9
> '{"execute":"guest-get-osinfo", "arguments":{}}'
> {"return":{"name":"Red Hat Enterprise
> Linux","kernel-release":"5.14.0-142.el9.x86_64","version":"9.1
> (Plow)","pretty-name":"Red Hat Enterprise Linux 9.1 Beta
> (Plow)","version-id":"9.1","kernel-version":"#1 SMP PREEMPT_DYNAMIC Thu Aug
> 4 15:31:24 EDT 2022","machine":"x86_64","id":"rhel"}}

{"execute":"guest-get-osinfo"}
{"return": {"name": "Microsoft Windows", "kernel-release": "22000", "version": "Microsoft Windows 11", "variant": "client", "pretty-name": "Windows 10 Enterprise", "version-id": "11", "variant-id": "client", "kernel-version": "10.0", "machine": "x86_64", "id": "mswindows"}}

So guest agent already returns "Microsoft Windows 11" in "version" field and "11" in "version-id". That can be used by upper layers. 
Unfortunately MS decided to keep Windows 10 in the full SKU name for compatibility reason unknown to us.

Comment 14 Yvugenfi@redhat.com 2022-10-26 10:55:32 UTC
And Konstantin mentioned localization, what he meant is that the registry value that we send as "pretty-name" is actually a localised string to the guest. We prefer not to manipulate it as we don't want to test the effects on different localized Windows installations.

Comment 15 Dominik Holler 2022-10-26 11:01:39 UTC
> {"execute":"guest-get-osinfo"}
> {"return": {"name": "Microsoft Windows", "kernel-release": "22000",
> "version": "Microsoft Windows 11", "variant": "client", "pretty-name":
> "Windows 10 Enterprise", "version-id": "11", "variant-id": "client",
> "kernel-version": "10.0", "machine": "x86_64", "id": "mswindows"}}
> 
> So guest agent already returns "Microsoft Windows 11" in "version" field and
> "11" in "version-id". That can be used by upper layers. 
> Unfortunately MS decided to keep Windows 10 in the full SKU name for
> compatibility reason unknown to us.

@gouyang Can the UI change to show the GuestAgentInfo.name and GuestAgentInfo.version instead of the prettyName ?

> And Konstantin mentioned localization, what he meant is that the registry
> value that we send as "pretty-name" is actually a localised string to the
> guest. We prefer not to manipulate it as we don't want to test the effects
> on different localized Windows installations.

sure.

Comment 16 Aviv Turgeman 2022-10-26 13:48:14 UTC
Hi Dominik
(In reply to Dominik Holler from comment #15)
> @gouyang Can the UI change to show the GuestAgentInfo.name and
> GuestAgentInfo.version instead of the prettyName ?

sure, PR is for that in here: https://github.com/kubevirt-ui/kubevirt-plugin/pull/932

Comment 18 Aviv Turgeman 2022-10-31 09:35:00 UTC
Moving to 'ON_QA' as PR here [1] is merged

[1] https://github.com/kubevirt-ui/kubevirt-plugin/pull/932

Comment 19 Leon Kladnitsky 2022-11-02 15:10:31 UTC
The attached YAML creates without guest agent installed. post-install.ps1 from ConfigMap is not run for some reason

Comment 22 Aviv Turgeman 2022-11-07 10:50:17 UTC
I'm not sure about the guest agent, can you please help Dominik?

Comment 23 Dominik Holler 2022-11-07 13:45:18 UTC
(In reply to Aviv Turgeman from comment #22)
> I'm not sure about the guest agent, can you please help Dominik?

Unfortenly the example VM is not yet automated completely. To trigger Windows 11 installation automation there is still pressing a key after starting the VM required (https://issues.redhat.com/browse/CNV-20138).

Comment 24 Leon Kladnitsky 2022-11-10 16:53:48 UTC
> Unfortenly the example VM is not yet automated completely. To trigger
> Windows 11 installation automation there is still pressing a key after
> starting the VM required (https://issues.redhat.com/browse/CNV-20138).

Where and which key should be pressed? I could not find something useful in CNV-20138.
Dominik, can you assist please?

Comment 28 Guohua Ouyang 2022-11-23 10:29:56 UTC
Tested on the latest kubevirt-console-plugin version, there are two issues:
1. The win 11 vm is detected as "Microsoft Windows Microsoft Windows 11" on vm overview tab.
2. On vm details tab, it's still "Windows 10 Pro".

For #1, I think the text should be "Microsoft Windows 11", will open a separate issue to guest-agent.

Comment 29 Yvugenfi@redhat.com 2022-11-23 10:41:21 UTC
(In reply to Guohua Ouyang from comment #28)
> Tested on the latest kubevirt-console-plugin version, there are two issues:
> 1. The win 11 vm is detected as "Microsoft Windows Microsoft Windows 11" on
> vm overview tab.
> 2. On vm details tab, it's still "Windows 10 Pro".
> 
> For #1, I think the text should be "Microsoft Windows 11", will open a
> separate issue to guest-agent.

Please check comment#12 and comment#13.

quest agent is passing a value directly from registry. MS decided to keep calling Windows 11 as Windows 10 for compatibility reasons.

Comment 30 Guohua Ouyang 2022-11-23 11:23:34 UTC
Talked with Aviv, the current text is referring to data.os.name and data.os.version, and the value of them are:
data.os.name = Microsoft Windows
data.os.version = Microsoft Windows 11

So maybe it should just refer to data.os.version for windows VM, for RHEL and other OSes, it still use both of data.os.name and data.os.version.

Comment 31 Hilda Stastna 2022-11-23 20:38:08 UTC
Note that for the newest code or 4.12, I was able to reproduce this issue also with other operating systems (not always), such as RHEL, not only for Windows.

Also sometimes the OS name is kinda doubled - in VM Overview page, for example I can see "Microsoft Windows Microsoft Windows Server 2019".

Also I was able to create a VM from template with Win 11 OS and then I saw "Microsoft Windows Microsoft Windows Server 2019" as the OS name
in the VM Overview tab when provisioning the VM, while in the VM's Details tab there was "Guest agent is required".

I suggest to test also those cases when verifying the fix. Thanks.

Comment 34 Guohua Ouyang 2022-12-05 04:40:31 UTC
verified on v4.13.0-1207, the OS of windows/linux displayed normally and correctly

Comment 38 errata-xmlrpc 2023-01-24 13:41:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:0408


Note You need to log in before you can comment on or make changes to this bug.