Please include output of guest-get-users QEMU-GA command into bulk stats reported for domains. This feature is required for efficient consumption of qemu-ga info in oVirt.
User info was included in virDomainGetGuestInfo() patches which have been merged upstream.
Hi, Jonathon The guest bulk stats now does not contain any info about guest users version: libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64 # virsh domstats lizhu |grep user cpu.user=3300000000 <=== does not contain the info guest users And I noticed there are same issues in the other similar bugs about "Provide info from guest-get-* QEMU-GA command in bulk stats", Please help to check. Thanks
This information is returned in the new 'guestinfo' command.
Hi, Jonathon Is there anything else I need to pay attention to when I verify this bug, since now the bug looks almost the same with https://bugzilla.redhat.com/show_bug.cgi?id=1704761 Thanks
Hmm, you're right. That's a good question... Perhaps originally Tomas envisioned having two separate libvirt interfaces to obtain this information: one dedicated API (e.g. something like virDomainGetGuestUsers()) and also included in the bulk stats output. So perhaps that bug was for adding the dedicated API and this one was to include it in the bulk stats? In the end, the solution was neither of these. We introduced a new 'bulk' guest info API (virDomainGetGuestInfo()) Another possible explanation for the two bugs is that maybe one was intended to be filed against a different component or product? Tomas, do you have any idea about the difference between these two bugs?
You're right Jonathon, the original idea was to have API call for every guest-get-* QEMU-GA command and then also provide the unified access to all the information via bulk stats. As you say the resulting implementation is totally different so feel free to close or change the description of all the other bugs. By the way, is the new API properly reflected in libvirt-python or is there anything more we need to do?
I don't have a lot of experience with libvirt-python, but I believe that the libvirt-python API is mostly auto-generated, so this function should be included in a new release.
*** Bug 1704761 has been marked as a duplicate of this bug. ***
Per comments above, I've closed bug 1704761 as a duplicate
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.2 running 3 win10 running 2) login guest with root and non-root users [root@newhost ~]# last -F root ttyS0 Mon Feb 3 14:00:16 2020 still logged in root ttyS0 Mon Feb 3 13:59:45 2020 - Mon Feb 3 14:00:04 2020 (00:00) lizhu tty1 Mon Feb 3 12:21:01 2020 still logged in 3) check the active users # virsh guestinfo --user rhel8.2 user.count : 2 user.0.name : root user.0.login-time : 1580709616555 user.1.name : lizhu user.1.login-time : 1580703661621 4) check the login time of the 2 users for root: # date -d @1580709616.555 Mon Feb 3 14:00:16 CST 2020 for lizhu: # date -d @1580703661.621 Mon Feb 3 12:21:01 CST 2020 5) logout lizhu check the active user # virsh guestinfo --user rhel8.2 user.count : 1 user.0.name : root user.0.login-time : 1580709616555 6) check the active users of windows guest # virsh guestinfo --user win10 user.count : 1 user.0.name : test user.0.domain : WIN10-GUEST user.0.login-time : 1580705292340 7) check the login time # date -d @1580705292.340 Mon Feb 3 12:48:12 CST 2020 8) query user in windows guest C:\Users\test>query user USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME >test console 1 Active none 2/3/2020 12:48 PM 9)logout user test # virsh guestinfo --user win10 user.count : 0 A) negative scenarios: 1) stop guest agent service in guest, check the active users in guest # virsh guestinfo --user win10 error: Guest agent is not responding: QEMU guest agent is not connected 2) check active users under readonly mode # virsh -r guestinfo --user win10 error: operation forbidden: read only access prevents virDomainGetGuestInfo 3) check active users when guest agent is not configured # virsh guestinfo --user win10 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