Please include output of guest-get-osinfo QEMU-GA command into bulk stats reported for domains. This feature is required for efficient consumption of qemu-ga info in oVirt.
I have posted a proposed patch series to the mailing list here: https://www.redhat.com/archives/libvir-list/2019-August/msg00016.html. It adds a new virDomainGetGuestInfo() API which returns various guest parameters in a typed parameter array. This should make it possible to extend in the future without breaking API.
virDomainGetGuestInfo() patches were merged upstream.
In virsh, this information is returned in the new 'guestinfo' command.
*** Bug 1704763 has been marked as a duplicate of this bug. ***
Verify this bug with: libvirt-6.0.0-2.module+el8.2.0+5513+34927b6c.x86_64 qemu-guest-agent-4.2.0-8.module+el8.2.0+5607+dc756904.x86_64 A) positive scenarios: 1) prepare one rhel and one linux guest # virsh list --all Id Name State ------------------------------------------- 2 rhel8.1 running 3 win10 running 2)check the os info [root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.1 (Ootpa) [root@localhost ~]# uname -a Linux localhost.localdomain 4.18.0-147.el8.x86_64 #1 SMP Thu Sep 26 15:52:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux 3)check the os info via guest agent # virsh guestinfo rhel8.1 --os os.id : rhel os.name : Red Hat Enterprise Linux os.pretty-name : Red Hat Enterprise Linux 8.1 (Ootpa) os.version : 8.1 (Ootpa) os.version-id : 8.1 os.machine : x86_64 os.kernel-release : 4.18.0-147.el8.x86_64 os.kernel-version : #1 SMP Thu Sep 26 15:52:44 UTC 2019 4)update the guest os and reboot, check the os info # cat /etc/redhat-release Red Hat Enterprise Linux release 8.2 Beta (Ootpa) [root@localhost ~]# uname -a Linux localhost.localdomain 4.18.0-167.el8.x86_64 #1 SMP Sun Dec 15 01:24:23 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux 5)check the os info via guest agent again # virsh guestinfo rhel8.1 --os os.id : rhel os.name : Red Hat Enterprise Linux os.pretty-name : Red Hat Enterprise Linux 8.2 Beta (Ootpa) os.version : 8.2 (Ootpa) os.version-id : 8.2 os.machine : x86_64 os.kernel-release : 4.18.0-167.el8.x86_64 os.kernel-version : #1 SMP Sun Dec 15 01:24:23 UTC 2019 6)check the os info of windows guest # virsh guestinfo win10 --os os.id : mswindows os.name : Microsoft Windows os.pretty-name : Windows 10 Enterprise os.version : Microsoft Windows 10 os.version-id : 10 os.machine : x86_64 os.variant : client os.variant-id : client os.kernel-release : 18363 os.kernel-version : 10.0 Negative Scenarios: 1) check the os info under read-only mode # virsh -r guestinfo win10 --os error: operation forbidden: read only access prevents virDomainGetGuestInfo 2) check the os info when guest agent is not connected [root@localhost ~]# systemctl stop qemu-guest-agent [root@localhost ~]# [root@localhost ~]# systemctl status qemu-guest-agent ● qemu-guest-agent.service - QEMU Guest Agent Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; disabled; > Active: inactive (dead) since Wed 2020-02-05 15:20:59 CST; 11s ago Process: 826 ExecStart=/usr/bin/qemu-ga --method=virtio-serial --path=/dev/vi> Main PID: 826 (code=exited, status=0/SUCCESS) Feb 05 14:43:27 localhost.localdomain systemd[1]: Started QEMU Guest Agent. Feb 05 15:20:59 localhost.localdomain systemd[1]: Stopping QEMU Guest Agent... Feb 05 15:20:59 localhost.localdomain systemd[1]: Stopped QEMU Guest Agent. # virsh guestinfo rhel8.1 --os error: Guest agent is not responding: QEMU guest agent is not connected 3)check guest os info when guest agent is not configured # virsh dumpxml rhel8.1 |grep agent (no output) # virsh guestinfo rhel8.1 --os error: argument unsupported: QEMU guest agent is not configured
As the testing match with expected results, mark the bug as verified
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, 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/RHBA-2020:2017