Bug 1957377

Summary: Downstream qemu-ga should report the build number and not QEMU version
Product: Red Hat Enterprise Linux 8 Reporter: Arik <ahadas>
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
virtio-win sub component: qemu-ga-win QA Contact: dehanmeng <demeng>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: ailan, ali.khalidy, coli, jinzhao, juzhang, lijin, mdean, michal.skrivanek, mkalinin, virt-maint, ymankad, yvugenfi, zhguo
Version: 8.4Keywords: Triaged, ZStream
Target Milestone: beta   
Target Release: 8.5   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: mingw-qemu-ga-win-102.2.0-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1974317 (view as bug list) Environment:
Last Closed: 2021-11-09 18:52:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1974317    

Description Arik 2021-05-05 17:23:43 UTC
With virtio-win 1.9.16 we see in agents.json:

{
  "arch": "x86",
  "agent_version": "102.0.0-2",
  "name": "Red Hat QEMU guest agent"
},
{
  "arch": "amd64",
  "agent_version": "102.0.0-2",
  "name": "Red Hat QEMU guest agent"
},

while qemu-ga itself now reports version 5.2.0 (see https://bugzilla.redhat.com/show_bug.cgi?id=1936298#c34).

This makes RHV showing the user that there is an update to qemu-ga although the user uses the latest version.

Comment 1 dehanmeng 2021-05-06 09:18:50 UTC
Reproduce this issue successfully,

Versions:
virtio-win-prewhql-198.iso
mingw-qemu-ga-win-102.0.0-2.el8

Steps:
1.boot up win2016 guest
2.Connect guest via qga and send qga-cmd 'guest-info' to query qga version
[root@dell-per440-12 kar]# nc -U /tmp/avocado_uaggkdgh/serial-org.qemu.guest_agent.0-20210505-043826-fZOMC62q
{"execute":"guest-info"}
{"return": {"version": "5.2.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}....
3.Query qga version via cmd:
[root@dell-per440-12 kar]#  cat /usr/share/virtio-win/agents.json
{
  "agents": [
    {
      "arch": "x86",
      "agent_version": "102.0.0-2",
      "name": "Red Hat QEMU guest agent"
    },
    {
      "arch": "amd64",
      "agent_version": "102.0.0-2",
      "name": "Red Hat QEMU guest agent"
    }

Comment 2 dehanmeng 2021-05-06 09:29:05 UTC
(In reply to dehanmeng from comment #1)
> Reproduce this issue successfully,
> 
> Versions:
> virtio-win-prewhql-198.iso
> mingw-qemu-ga-win-102.0.0-2.el8
> 
> Steps:
> 1.boot up win2016 guest
> 2.Connect guest via qga and send qga-cmd 'guest-info' to query qga version
> [root@dell-per440-12 kar]# nc -U
> /tmp/avocado_uaggkdgh/serial-org.qemu.guest_agent.0-20210505-043826-fZOMC62q
> {"execute":"guest-info"}
> {"return": {"version": "5.2.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}....
> 3.Query qga version via cmd:
> [root@dell-per440-12 kar]#  cat /usr/share/virtio-win/agents.json
> {
>   "agents": [
>     {
>       "arch": "x86",
>       "agent_version": "102.0.0-2",
>       "name": "Red Hat QEMU guest agent"
>     },
>     {
>       "arch": "amd64",
>       "agent_version": "102.0.0-2",
>       "name": "Red Hat QEMU guest agent"
>     }

virtio-win 1.9.16virtio-win 1.9.16 still hit this issue. and the issue was considered a normal change at first, so this problem was not pointed out.

Comment 3 ali.khalidy 2021-06-02 21:28:48 UTC
Hello,

can we get an eta for this? We have this exact same issue as well.

Comment 12 Yvugenfi@redhat.com 2021-06-17 11:20:05 UTC
The fix in mingw-qemu-ga-win-102.4.0-0.el8

Comment 13 dehanmeng 2021-06-18 01:11:09 UTC
Tried to verify this issue on win2016-64 guest with the fixed build mingw-qemu-ga-win-102.2.0-2.el8, but the issue seems still be there. the version of build still is '5.2'

Actual result.
[root@dell-per440-01 whql_autotest]# nc -U /tmp/avocado_3ysnlr_l/serial-org.qemu.guest_agent.0-20210607-121055-kSowKNHY
{"execute":"guest-info"}
{"return": {"version": "5.2.0", "supported_commands": [{"enabled": true, "name": "guest-get-devices", "success-response": true},...........}

Comment 14 dehanmeng 2021-06-18 01:45:39 UTC
Sorry about the last comment, I reuse the latest version of qemu-ga build. and try to verify it again. now the result is correct.

Verify steps as comment.

Actual result:
[root@dell-per440-01 Verify_bug]# nc -U /tmp/avocado_3ysnlr_l/serial-org.qemu.guest_agent.0-20210607-121055-kSowKNHY
{"execute":"guest-info"}
{"return": {"version": "102.4.0", "supported_commands"........} 
Expected result:
{"return": {"version": "102.4.0", "supported_commands"........} 


Thanks for your effort Yan, This issue is gone.

Comment 21 errata-xmlrpc 2021-11-09 18:52:47 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 (virtio-win bug fix and enhancement 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/RHEA-2021:4341