Page 1 of 1

When the host sleeps...

Posted: Sat Apr 29, 2023 1:03 pm
by jonesd
I'm running the field test on a laptop. When it goes to sleep and wake ups, the VMS time resumes from the time
VirtualBox was suspended. Since nothing was happening, the obvious thing is to jump the time forward to the current time. The NTP daemon doesn't appear designed to handle this situation.

Do hypervisors communicate a wake event to the guest and if so are there any plans to make OpenVMS handle it.

Re: When the host sleeps...

Posted: Sat Apr 29, 2023 3:12 pm
by arne_v
It is sort of to be expected.

As I understand my almost 30 years old IDSM then VMS read the HW clock at startup, stores it in memory (EXE$GQ_SYSTIME etc.) and a thousand times per second or more some interrupt code running at IPL 22 updates that memory location.

That does not work if the entire system is sleeping.

Obviously the basic mechanism can be changed, but I suspect that would be a major change to VMS.

Adding a configuration option to NTP "allow_rapid_time_jumps_forward_on_vms_on_pcs_to_handle_wakeup" would probably be the least intrusive (standard I believe NTP does not allow huge time jumps).

Re: When the host sleeps...

Posted: Mon May 01, 2023 6:02 am
by martin
RFC 5905 defines a parameter PANICT which, by default, is set at 1,000 seconds, or just under 20 minutes. See RFC5905ยง11.3. If any offset exceeds this value then NTP will consider it a "false-ticker" and exclude it from consideration. During ntpd (or equivalent) startup, systems can be configured to ignore this parameter and accept any offset leading to time jumping rather than slewing.

I suspect that you need to detect sleep-wakeup events and restart the NTP implementation. I've not done it myself, my VMs are on the server machine and so don't experience this particular problem.