iohyve debian guest time incorrect after reboot

Status
Not open for further replies.

melbournemac

Dabbler
Joined
Jan 21, 2017
Messages
20
Hi,

Build FreeNAS-9.10.2-U1 (86c7ef5)
Platform Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
Memory 24482MB
System Time Sat Apr 29 21:12:16 AEST 2017

Guest OS
Distributor ID: Debian
Description: Debian GNU/Linux 8.7 (jessie)
Release: 8.7
Codename: jessie


I have finally gotten around to setting up the VMs in iohyve that I used to have in a virtualbox jail. I have run into an issue with the guest time being incorrect after a reboot of the guest

The date and timezone of the FreeNAS server appear to be correct
Code:
[root@freenas] ~# date
Sat Apr 29 21:26:59 AEST 2017
[root@freenas] ~# date -u
Sat Apr 29 11:31:03 UTC 2017
[root@freenas] ~#


However the date in the guest is incorrect
Code:
userxxx@deb64vm003:~$ date
Sunday 30 April  07:32:57 AEST 2017
userxxx@deb64vm003:~$ date -u
Saturday 29 April  21:33:01 UTC 2017
userxxx@deb64vm003:~$


I can set the date on the guest, but it does not survive a reboot

I looks as if the guest's date (UTC) is being set from the local timezone (AEST) of the host & then the timezone shift is applied again

I'm guessing I can overcome this by implementing ntp on the guests, but wondering if there is something else I am missing. I am relatively new to virtualisation & do not have *NIX admin background

Appreciate any help,

Steve
 

melbournemac

Dabbler
Joined
Jan 21, 2017
Messages
20
kept googling away & think I have fixed it. Appreciate if anyone with experience would confirm if this is the best way.

Took solution from here

As a summary
  • Set system date correct for my timezone
  • updated /etc/adjtime so that the 3rd line was LOCAL not UTC
  • Copied system date to hardware clock
  • rebooted the guest
Date / time / timezone appear to all be correct after reboot

Not sure how the guest's hwclock is being set from the host.

Will monitor for a couple of days & mark as solved if OK

regards,

Steve
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
I've had this with ESXi as well. There is a setting called 'syncronise guest and host time'. This is a problem with Windows versus a POSIX system, since typically a POSIX system uses a correction applied to the hardware time which is UTC. Windows simply uses the local time stored in the hardware.

Windows can be set to use UTC instead. Since you are doing virtualization on a POSIX system, this might be a good tip for the future.
 
Status
Not open for further replies.
Top