Bug 1245801

Summary: Windows 2012 guest reports incorrect time randomly and after a cold restart.
Product: Red Hat Enterprise Virtualization Manager Reporter: Javier Coscia <jcoscia>
Component: ovirt-engineAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
Status: CLOSED ERRATA QA Contact: Nisim Simsolo <nsimsolo>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: istein, jcoscia, lpeer, lsurette, mgoldboi, michal.skrivanek, nsimsolo, rbalakri, Rhev-m-bugs, vfeenstr, yeylon, ykaul
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0Flags: mgoldboi: Triaged+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 3.6.0 Doc Type: Bug Fix
Doc Text:
Previously, missing handling for the Time Zone conversion of (GMT-06:00) Central Standard Time (Mexico) caused the offset used to be 0, putting the time in the guest operating system off by 6 hours. Now that the handling has been added, all selectable timezones are being handled, restoring the correct time to the guest operating system.
Story Points: ---
Clone Of:
: 1255062 (view as bug list) Environment:
Last Closed: 2016-03-09 21:10:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1255062    

Description Javier Coscia 2015-07-22 19:51:20 UTC
Description of problem:

Windows 2012 guest reports incorrect time in a random manner and also after a restart.

Version-Release number of selected component (if applicable):

RHEV-M: 
3.5.0-1

RHEV-H: 
6.6 (20150512.0.el6ev)
vdsm-4.16.13.1-1.el6ev.x86_64
libvirt-0.10.2-46.el6_6.6.x86_64

How reproducible:

Steps to Reproduce:
1.  Create a new Windows 2012 VM with Time Zone - (GMT-05:00) Central Standard Time (Mexico)
2.  Start the VM
3.  Verify the time on the Window guest and correct if necessary.
4.  Shutdown or Poweroff the VM.
5.  Start the VM and verify the time.

Actual results:

The time on the Windows 2012 VM is not set to correct time, it changes to UTC +0.

Expected results:

The time on the VM should correct based on the timezone selected in the RHEV Web UI and as per the configuration inside the OS.

Additional info:

For the random changes we've asked customer to disable "Internet Time Sync" inside the Windows guest and let RHEV to manage the offsets

Comment 5 Michal Skrivanek 2015-07-23 11:04:55 UTC
it's not taken from utc_diff, but derived from the time zone (which should be those 18000s). So every time you start the VM it should start with offeset relative to UTC on host

how random is the time? is NTP really disabled - then it should not vary

Comment 7 Vinzenz Feenstra [evilissimo] 2015-07-23 14:12:09 UTC
The problem is the mapping, there's a missing mapping to the right timezone. The used timezone is valid, however internally it can't get mapped to the right java timezone, which needed to get the offset value.

I'll be having a patch for this soon and some unit test to validate this for the future.

Comment 11 Nisim Simsolo 2015-09-22 09:23:03 UTC
Verified :
Windows 2012x64 VM
rhevm-3.6.0-0.13.master.el6
vdsm-4.17.6-1.el7ev.noarch
qemu-kvm-rhev-2.3.0-22.el7.x86_64
sanlock-3.2.4-1.el7.x86_64
libvirt-client-1.2.17-5.el7.x86_64

Verification scenario:
1. Create Windows 2012 VM and install RHEV-Tools on it. 
2. Run VM, Verify what is current time zone on it (in my case UTC-08:00 Pacific Time US&Canada).
3. Open VM console and navigate to date and time configuration, disable "synchronize with an internet time server").
3. Edit VM > System tab and change time zone to GMT-03:00 Greenland Standard.
4. Shut Down VM and run it again.
5. Open VM console and verify VM time shifted to GMT-03:00 (although in windows configuration it remains UTC-08:00)

Comment 12 Vinzenz Feenstra [evilissimo] 2015-09-22 10:19:27 UTC
Please do the verification with the reported time. Any other time should work, the problematic one was "(GMT-05:00) Central Standard Time (Mexico)"

If you do use Greenland time, that ofc works, as this wasn't broken.

Thank you

Comment 13 Nisim Simsolo 2015-09-24 07:53:29 UTC
OK.. I verified it again this time using "(GMT-06:00) Central Standard Time (Mexico)", which for some reason on my setup does not appear as GMT-05:00 as you mentioned.
Just to be sure I also verified it with "(GMT-05:00) Eastern Standard Time".

Comment 15 errata-xmlrpc 2016-03-09 21:10:27 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, 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://rhn.redhat.com/errata/RHEA-2016-0376.html