Please include output of guest-get-timezone QEMU-GA command into bulk stats reported for domains. This feature is required for efficient consumption of qemu-ga info in oVirt.
timezone information was included in virDomainGetGuestInfo() patches which have been merged upstream.
In virsh, this information is returned in the new 'guestinfo' command.
*** Bug 1704764 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.2 running 3 win10 running 2) check timezone of rhel guest [root@newhost ~]# timedatectl status Local time: Mon 2020-02-03 16:07:16 CST Universal time: Mon 2020-02-03 08:07:16 UTC RTC time: Mon 2020-02-03 08:07:15 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: no NTP service: active RTC in local TZ: no 3) check timezone via guest agent # virsh guestinfo rhel8.2 --timezone timezone.name : CST timezone.offset : 28800 4) change timezone in guest [root@newhost ~]# timedatectl set-timezone America/New_York [root@newhost ~]# timedatectl status Local time: Mon 2020-02-03 03:09:55 EST Universal time: Mon 2020-02-03 08:09:55 UTC RTC time: Mon 2020-02-03 08:09:54 Time zone: America/New_York (EST, -0500) System clock synchronized: no NTP service: active RTC in local TZ: no 5)check timezone via guest agent # virsh guestinfo rhel8.2 --timezone timezone.name : EST timezone.offset : -18000 6) check timezone in windows guest PS C:\Users\test> Get-TimeZone Id : China Standard Time DisplayName : (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi StandardName : China Standard Time DaylightName : China Daylight Time BaseUtcOffset : 08:00:00 SupportsDaylightSavingTime : False 7)get guest timezone via guest agent # virsh guestinfo win10 --timezone timezone.name : China Standard Time timezone.offset : 28800 8) change windows guest timezone PS C:\Users\test> Get-TimeZone Id : E. Australia Standard Time DisplayName : (UTC+10:00) Brisbane StandardName : E. Australia Standard Time DaylightName : E. Australia Daylight Time BaseUtcOffset : 10:00:00 SupportsDaylightSavingTime : False 8) check guest timezone via guest agent # virsh guestinfo win10 --timezone timezone.name : E. Australia Standard Time timezone.offset : 36000 Negative scenarios: 1) get guest timezone info under read-only mode # virsh -r guestinfo win10 --timezone error: operation forbidden: read only access prevents virDomainGetGuestInfo 2) stop guest agent service in guest, then get guest timezone [root@newhost ~]# 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 Mon 2020-02-03 03:45:17 EST; 35s ago Process: 824 ExecStart=/usr/bin/qemu-ga --method=virtio-serial --path=/dev/vi> Main PID: 824 (code=exited, status=0/SUCCESS) Feb 02 22:11:45 newhost systemd[1]: Started QEMU Guest Agent. Feb 03 03:45:17 newhost systemd[1]: Stopping QEMU Guest Agent... Feb 03 03:45:17 newhost systemd[1]: Stopped QEMU Guest Agent. [root@8-1-virt ~]# virsh guestinfo rhel8.2 --timezone error: Guest agent is not responding: QEMU guest agent is not connected 3) get guest timezone when guest agent is not configured # virsh guestinfo rhel8.2 --timezone 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