VM - Windows Time Wrong

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Hi Everyone,

I am very new to the TrueNas Core system and I created a Windows 11 VM for running Plex and Shoko Server .. I noticed tonight while working on getting this setup that the time on my computer and the time on the VM computer were like hours off ..

I checked the time settings on the VM and everything is correct , so not sure why they were off or if there is something in Core I didn't setup yet ... So thougth I would ask and see what people thought ..

Thanks ..
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Have you set time to local or UTC in the VM settings? Windows expects local.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Here is a pic of the windows time and date screen ..
 

Attachments

  • Time.jpg
    Time.jpg
    87.5 KB · Views: 239

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The VM settings in TrueNAS, not the Windows settings,
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Sorry .. thought you meant the VM .. here is what I currently have ..

maybe I need to check the system clock
 

Attachments

  • VM Settings.jpg
    VM Settings.jpg
    35.8 KB · Views: 248

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Set the BIOS clock of the TrueNAS machine to UTC. Check time server and time zone settings of TrueNAS. Keep the VM clock set to local. That should fix any issues with wrong time at startup of the VM. Then enable network time synchronisation inside the VM.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Hey Patrick,

I am going to assume when you say "Set the BIOS clock of the TrueNAS machine to UTC" you mean inside the Bios of the motherboard ?

Here is a screen shoot of the NTP Servers , I hope that is the time settings for the TrueNas box ..

I also found the "timezone" settings finally in TrueNas and it was set wrong .. I changed that to US/East which is where I am ..

So I hope that will fix the issue ..
 

Attachments

  • Screenshot 2022-10-13 101109.jpg
    Screenshot 2022-10-13 101109.jpg
    33.5 KB · Views: 190

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yes, of course. I am speaking of the hardware clock of your machine. Unix systems run their clock in UTC, always. And convert to and from local time for output/input of dates. It's a multi user system - so multiple users can each have their own timezone settings.

Windows assumes a single user PC - even for the server systems for historical reasons. So the hardware clock should be set to "wall time". That concerns the settings for the emulated hardware (VM settings in TrueNAS) and then the timezone settings inside Windows.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Well when I go into the Asus Bios the time is wrong and it doesn't give me the options to change it ... So currently looking into that ..
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Ok so I got the bios time fixed .. So I hope I will be ok now .. will have to wait and see I guess ..
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Well I still have something wrong .. as the time on my VM is currently 9:30AM and its really 1:30pm here .. So not sure what I should do next please let me know .. Thanks ..
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Yes Spuky everything in the windows is set correctly .. and it worked for a couple of times and now the time is off again ..
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
So I set the time to manual on the VM and the time is still changing .. so its Noon here on east coast , but the VM has 8am on it .. Not sure what to do ..
 

spuky

Explorer
Joined
Oct 11, 2022
Messages
60
The Option: Set time zone automatically. (in windows) is off ?? this could lead to windows picking up some wrong location information and changing it since it thinks you changed to another timezone...
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Yes Spuky .. here is a pic of what the current settings are in the VM ..

One thing I think might be happening but I am not sure as I am not a Linux person or Truenas for that matter .. I found some shell commands and when I run them they all error out .. So maybe the NTP Servers are not running or working correctly ..
 

Attachments

  • Screenshot 2022-10-18 123802.jpg
    Screenshot 2022-10-18 123802.jpg
    43.5 KB · Views: 182

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The BIOS and VM configuration settings I advised you to use are relevant for boot time (first of TrueNAS, then of your VM) only. Time tends to drift inside VMs so you probably must use NTP.

Is the time accurate when the system is freshly booted?
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Hey Patrick ..

I rebooted the VM and the current time is 10:11AM .. but here on the east coast its 2:10pm .. it always seems to be 4 hours off ..

The VM settings say "System Clock: LOCAL"

As for the Bios I changed the time so it was correct .. As for Truenas I don't know where or how to check the time on it .. I just cant seem to find it ..
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Type date into a shell.
 

StarTrek133

Contributor
Joined
Sep 5, 2022
Messages
112
Thanks Patrick ..

So it looks like its the Truenas box as the time is wrong on it ..
 

Attachments

  • Screenshot 2022-10-18 152706.jpg
    Screenshot 2022-10-18 152706.jpg
    59 KB · Views: 129
  • Screenshot 2022-10-18 152750.jpg
    Screenshot 2022-10-18 152750.jpg
    71.7 KB · Views: 214
Top