From: David Schwartz on
On May 6, 2:05 am, Jack Snodgrass <jacks_temp_id_blu...(a)verizon.net>
wrote:

> It starts and runs... it just doesn't keep my non-stable-clock system up
> to date. If I let my vmware guest run for 24 hours, the time on the
> vmware guest gets off by about 2 hours.

This is a vmware-specific issue and has to be fixed with the
appropriate vmware-specific solutions. This has nothing to do with the
stability of any actual clock the ntpd could fix.

> Currently, I have ntpd disabled and I have a cron job that runs every
> minute and runs ntpdate to keep the time accurate...
>
> I thought that ntpd was supposed to be able to do this....

It is, for an actual physical system with a hardware clock of some
kind.

> If ntpd can't keep the time on the local box accurate... what's the
> purpose of it? I've had this issue with ntpd for years... I've always
> had to resort to disableing it and running ntpdate from cron.

You have two conflicting requirements. In general, 'vmware' tries to
make itself invisible, such that the system works the same with or
without vmware. It also tries to present a 'virtual CPU' to the
virtual machine that works the same as a physical CPU.

The problem is this -- sometimes the physical CPU is busy, and vmware
can't give the virtual CPU as many clock cycles in a second as it
normally does. When this happens, it has two choices:

1) Make it seem like the correct amount of actual time has passed, in
which case the virtual machine will know something's wrong -- it
didn't get as many clock cycles per second as it should have.

or

2) Make it seems like less actual time has passed, in which case the
virtual machine will be okay, but its clock will be off.

In many cases, 2 is the better solution. Suppose your physical CPU is
very busy with high-priority tasks and the virtual machine gets no CPU
time at all. What will the effect on that machine be if it's suddenly
5 seconds later in wall clock time and none of the things the virtual
machine expected to do in those past 4 seconds have gotten done?
(Vmware has no idea what the consequences of that might be, so it
doesn't force you to live with them without knowing for sure that
that's a good idea.)

This is a fundamental issue with vm software, and there are many many
ways to deal with it. The one you have chosen is not one of them. ;)

DS