darianf Posted February 1, 2017 Share Posted February 1, 2017 initially i faced strange issue while setting the time in the tower. NTP as not getting correct time. when setting it manually, the time was update to a value +1 from what i was configuring. Had to do a trick to update manually to an incorrect hour, to account the for unraid's stubbornness to add the extra hour. Once the time was manually ok and time zone ok, i switched to automatically/ntp since then the time was ok in unraid. but now i see in windows vm, that the time advances every time i restart (could not yet identify if VM or unraid box restart) anything you can suggest please? Quote Link to comment
darianf Posted February 5, 2017 Author Share Posted February 5, 2017 hi guys, this issue drives me crazy... Somehow the unraid insists to reduce the time i set manually by 1 hour. I have to account for this nasty thing, by adding 1 hour extra. finally i manage to set it up like this: ntp - yes time zone - utc+2, for athens, bucharest, istanbul (btw, if i set it up 1-2 minutes off, after NTP enabled it does not correct this - i would expect that the time will be adjusted to the second, but it's not the case - is this some clue that NTP is not working?) I start the Windows 10 guest, guest time is ok. Restart the VM, guest time remains ok. I restart the tower entirely, unraid time remains ok, but Windows 10 guest VM advances by 1 hour. Will try to restart the tower several times, to see how much i can time travel! Quote Link to comment
Squid Posted February 5, 2017 Share Posted February 5, 2017 Maybe a stupid question, but have you ever checked the date/time settings in the Windows VM? Quote Link to comment
darianf Posted February 5, 2017 Author Share Posted February 5, 2017 hi squid I try to explain the steps i perform while setting up the time of unraid tower (settings>date and time). In red what's wrong, in green what is expect behavior. NTP: no time zone: utc+2 athens, bucharest, istanbul I set the time to the current time and save - immediately the time is updated to 1 hour less, by the unraid interface probably - some javascript maybe... Then i change the unraid time to account for this strange behavior, by adding 1 hour. Save => the time is again reduced by 1 hour, but it's accurate as per my current time. Then i enable NTP as Yes, time textbox gets grayed out and is accurate. Next step is to start the Windows 10 VM. In the guest, i have similar settings like: time zone - utc+2 Athens, Bucharest Set time automatically is ON Time is 1 hour extra. Then i perform these changes: 1) Set time automatically is set to OFF 2) change time to reflect current time 3) Set time automatically is set to ON Time is accurate. I restart the Windows VM - time remains accurate I restart the unraid box. unraid time remains accurate after restart. I start also the Windows VM. Guest time is extra 1 hour. I go in Windows Settings, Date & Time. I switch OFF, then ON the "Set time automatically" = > time is accurate for the session. But then, any restart of unraid will change the time in the VM by adding extra hour. next step i will do to understand more of this, I will leave uncorrected the guest time, but will perform several unraid box restarts, and see when it stops adding this extra hour nonsense... Quote Link to comment
trurl Posted February 5, 2017 Share Posted February 5, 2017 Do you have another Windows 10 computer? Does it handle your time zone correctly? Quote Link to comment
darianf Posted February 5, 2017 Author Share Posted February 5, 2017 hi trurl, the same computer was used up till few days ago, with windows 10, directly from the ssd. no issues with the time / time zone. Not sure what is the risk of playing with the time / time zone - basically following the same steps i described in my previous post - but probably the issue can be replicated easily. btw, i just updated to 6.3.0, but same behavior was present in 6.2.4 as well. Quote Link to comment
Squid Posted February 5, 2017 Share Posted February 5, 2017 Have you tried setting up Date & Time via Control Panel in Windows not via Settings... In particular the Internet Time section... Everything in the VM is going to trump unRaid settings.... Quote Link to comment
darianf Posted February 6, 2017 Author Share Posted February 6, 2017 thanks squid, will try also this thoroughly. at certain point i think i changed also there, but not sure what if the results were relevant... but i just restarted the entire unraid box and now the time did not advanced in guest VM. now thinking if power off vs restart of unRaid makes a difference. will try more - this is a hard nut to crack especially with this inconsistency... I am afraid that this is a case of OS trying to modify the Bios clock as well, and different OS will act differently. Quote Link to comment
darianf Posted February 6, 2017 Author Share Posted February 6, 2017 i found something, will check when i'll reach home, to see what's inside my xml https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-Virtualization-Tips_and_tricks-Libvirt_Managed_Timers.html Quote Link to comment
BoKKeR Posted June 13, 2020 Share Posted June 13, 2020 I have had the same issue, but I solved it by enabling windows time sync on startup. services->windows time->automatic Quote Link to comment
reyo Posted March 14, 2021 Share Posted March 14, 2021 Just view it as XML, find the clock section and change the <clock offset='localtime'> to <clock offset='utc'> . Seems like Windows wants UTC as base and adds the timezone to that. Thats why the time goes wrong: it gets localtime from host (which is already +3h e.g) like 14:00, adds offset +3 and you get 17:00. Which is 3 hours ahead. 2 Quote Link to comment
axipher Posted October 18, 2021 Share Posted October 18, 2021 On 3/14/2021 at 6:21 AM, reyo said: Just view it as XML, find the clock section and change the <clock offset='localtime'> to <clock offset='utc'> . Seems like Windows wants UTC as base and adds the timezone to that. Thats why the time goes wrong: it gets localtime from host (which is already +3h e.g) like 14:00, adds offset +3 and you get 17:00. Which is 3 hours ahead. Thanks for this, was driving me nuts every time my Windows VM that runs some scripts reboots, the time is off by my timezone and I need to toggle off/on the auto sync time option. This change in the VM XML fixed that issue. Quote Link to comment
ilnahro Posted October 22, 2023 Share Posted October 22, 2023 On 3/14/2021 at 11:21 AM, reyo said: Just view it as XML, find the clock section and change the <clock offset='localtime'> to <clock offset='utc'> . Seems like Windows wants UTC as base and adds the timezone to that. Thats why the time goes wrong: it gets localtime from host (which is already +3h e.g) like 14:00, adds offset +3 and you get 17:00. Which is 3 hours ahead. This works like a charm. Which just begs the question: How can we get this implemented as default when users create a VM with the Windows presets? Windows has been like this for at least the better part of the last decade. Is there some way we can flag this 1 minute fix to Lime Tech to implement? Quote Link to comment
JonathanM Posted October 23, 2023 Share Posted October 23, 2023 11 hours ago, ilnahro said: How can we get this implemented as default when users create a VM with the Windows presets? @SimonF? Quote Link to comment
SimonF Posted October 23, 2023 Share Posted October 23, 2023 On 10/22/2023 at 1:43 PM, ilnahro said: This works like a charm. Which just begs the question: How can we get this implemented as default when users create a VM with the Windows presets? Windows has been like this for at least the better part of the last decade. Is there some way we can flag this 1 minute fix to Lime Tech to implement? Do you not have time update enabled in Windows? I have not seen this issue on my Windows VM. Quick review of the code the value is being used to Identify Windows vs other so it is not just a default change. Also timer section is currently only written for a new VM. Quote Link to comment
ilnahro Posted November 5, 2023 Share Posted November 5, 2023 On 10/23/2023 at 7:30 PM, SimonF said: Do you not have time update enabled in Windows? I have not seen this issue on my Windows VM. Quick review of the code the value is being used to Identify Windows vs other so it is not just a default change. Also timer section is currently only written for a new VM. I do have this enabled but for some reason, Windows doesn't execute this frequently enough for it to fix the issue. Before I made the change suggested above, it literally set the wrong time every boot from the emulated UEFI without checking with the NTP servers Quote Link to comment
SimonF Posted November 5, 2023 Share Posted November 5, 2023 On 10/23/2023 at 1:10 AM, JonathanM said: @SimonF? Started a PR to allow users to change offset and timers see here: https://github.com/unraid/webgui/pull/1494 But needs a bit of testing before it will be available for a new release. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.