forcing time synch on debian guest after windows host hybernate

Discussions about using Linux guests in VirtualBox.
Post Reply
Oloap
Posts: 2
Joined: 3. Mar 2023, 12:32

forcing time synch on debian guest after windows host hybernate

Post by Oloap »

Hello,

I have a debian 11.6 guest on a windows 11 host.
When the windows host resumes from hybernate, the debian guest show the wrong clock time, out of synch from the guest.

How to force the debian guest to synch the clock with the host?
A systematic solution preferred, but a manual solution such a terminal command for the guest would be acceptable as well.

I'm on virtualbox 7.06, with stock configuration. The debian install is also a stock configuration with guest additions; no additional customizations of the time/clock management.

Thanks.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: forcing time synch on debian guest after windows host hybernate

Post by arQon »

Search the docs for timesync-set-threshold.

Nominally,
if the host is suspended for more than 20 mins, the guest resyncs time properly on resume.
if it's been LESS than 20 mins though, the guest is supposed to "slowly" correct its time
to match the host
As of at least Nov 2019 though,
- but it never does: right now i've got a guest that's 17 mins behind
the host, and has been for well over 2 hours now with no change at all to the delta.
10s has apparently been working well enough for me since then that I haven't changed it in 3+ years. Whether it does or not for you will depend on what you're doing in the guest.

add> I'm a little surprised a stock install of anything doesn't hide the bug via NTP though, which is an adequate (if inferior) workaround for most cases, so you might want to check on that.
Oloap
Posts: 2
Joined: 3. Mar 2023, 12:32

Re: forcing time synch on debian guest after windows host hybernate

Post by Oloap »

@arQon Thanks, exactly what I was looking for!
Post Reply