[Info-vax] clock problems with OpenVMS x86 on VirtualBox

Gary Sparkes mokuba at gmail.com
Fri May 12 19:32:09 EDT 2023


On Friday, May 12, 2023 at 5:56:13 AM UTC-4, Johnny Billquist wrote:
> On 2023-05-12 01:02, gah4 wrote: 
> > On Saturday, May 6, 2023 at 9:49:43 AM UTC-7, Craig A. Berry wrote: 
> >> I am running OpenVMS x86_64 E9.2-1 under VirtualBox 7.0.8 on macOS 
> >> Ventura 13.3.1 (a). The host is a 2019 MacBook Pro with 2.3 GHz 8-Core 
> >> Intel Core i9. The clock isn't working right, most easily seen by the 
> >> fact that the following two commands were typed exactly one minute apart: 
> > 
> >> $ sh time 
> >> 5-MAY-2023 19:07:35 
> >> $ sh time 
> >> 5-MAY-2023 19:07:45 
> > 
> > I haven't thought about this recently. 
> > 
> > As well as I know it, many OS were designed to know about emulators, 
> > and virtual machines, and virtual machines to know about client systems. 
> > 
> > The OS should be able to request the right time from VirtualBox.
> That is something you could/would do at boot time to get initial time, 
> but not after that. 
> During normal operation, most OSes uses a clock interrupt at a known 
> frequency, and this is in turn used to update the wall clock in the OS. 
> There are some tickless operating systems - mostly embedded RTOS stuff 
> where you want to reduce power consumption, but otherwise this is how 
> you normally do stuff, since you want to schedule all kind of things 
> based on time, and it would make no sense to have a VM go out and read 
> the host time hundreds of times per second as a way of just polling to 
> get time. 

Virtualization aware OSes *Will* update/request host time at specified intervals.

Not just at boot.

Most mainstream OSes have this capability to avoid VM time drift.

It can also be disabled, which is the recommended setting for Windows AD Domain 
controllers, for example - the PDC emulator hosting one does external time sync,
all other DCs sync to that, and then you sync your hardware to those sources (the DCs)

All other guest VMs use host time sync. If the host's time drifts too far, you will
have a Bad Day (tm) in a kerberos authentication environment because the guest
VMs time will drift too. Without reboot. Because the guest VMs are hypervisor time aware
unless you disable host time sync and/or don't install the VM tooling (if required, linux
for example wouldn't need it if the hypervisor support is compiled into kernel for
time sync to work)

So yes, it is done after boot. Constantly.



More information about the Info-vax mailing list