qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Guest Agent issue with 'guest-get-osinfo' command on Windows
@ 2021-09-02 12:36 Konstantin Kostiuk
  2021-09-02 13:11 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Konstantin Kostiuk @ 2021-09-02 12:36 UTC (permalink / raw)
  To: Developers
  Cc: Vladimir Sementsov-Ogievskiy, Michael Roth, Yuri Benditovich,
	Tomas Golembiovsky, Yan Vugenfirer, Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]

Hi Team,

We have several bugs related to 'guest-get-osinfo' command in Windows Guest
Agent:
https://bugzilla.redhat.com/show_bug.cgi?id=1998919
https://bugzilla.redhat.com/show_bug.cgi?id=1972070

This command returns the following data:
{
"name": "Microsoft Windows",
"kernel-release": "20344",
"version": "N/A",
"variant": "server",
"pretty-name": "Windows Server 2022 Datacenter",
"version-id": "N/A",
"variant-id": "server",
"kernel-version": "10.0",
"machine": "x86_64",
"id": "mswindows"
}

The problem is with "version" and "pretty-name". Windows Server
2016/2019/2022 and Windows 11 have the same MajorVersion ("kernel-version")
= 10, so to get pretty-name the guest agent uses a conversion matrix
between Windows build and name (
https://github.com/qemu/qemu/blob/59a89510b62ec23dbeab8b02fa4e3526e353d8b6/qga/commands-win32.c#L2170
).

This solution has several problems: need to update the conversion matrix
for each Windows build, one Windows name can have different build numbers.
For example, Windows Server 2022 (preview) build number is 20344, Windows
Server 2022 build number is 20348.

There are two possible solutions:
1. Use build number range instead of one number. Known implementation
issue: Microsoft provides a table (
https://docs.microsoft.com/en-Us/windows-server/get-started/windows-server-release-info)
only with stable build numbers. So, we exactly don't know the build number
range.

2. We can read this string from the registry
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion). Known
implementation issues: ProductName value is localized (in a Russian version
of Windows, the word "Microsoft' is translated), so we should ignore it.
ReleaseId value does not equal to Windows Server version (for Windows
Server 2019, ReleaseId is 1809)

In conclusion, I have the next questions:
What solution we should implement to get the Windows release name?
Does someone know how end-users use this information? Should it be English
only or it can be localized? Should we have exactly the same output as now?
What should we do with the 'Standard' server edition? Currently, the guest
agent always returns 'Datacenter'.

Best wishes,
Kostiantyn Kostiuk

[-- Attachment #2: Type: text/html, Size: 3435 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-09-06 16:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-02 12:36 Guest Agent issue with 'guest-get-osinfo' command on Windows Konstantin Kostiuk
2021-09-02 13:11 ` Philippe Mathieu-Daudé
2021-09-02 13:15   ` Philippe Mathieu-Daudé
2021-09-02 13:24 ` Marc-André Lureau
2021-09-02 13:36 ` Daniel P. Berrangé
2021-09-02 13:55   ` Richard W.M. Jones
2021-09-02 14:12     ` Konstantin Kostiuk
2021-09-02 14:54       ` Marc-André Lureau
2021-09-06 15:45         ` Konstantin Kostiuk
2021-09-06 15:59           ` Richard W.M. Jones
2021-09-06 16:30             ` Konstantin Kostiuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).