Hi guys. I use Mandrake 9.1 in VMware 4.0.1 and it runs great. The only problem I have is that every time i suspend the virtual machine andthen resume it like the next day, the darn system clock is does not update itself to the present time. Its still stuck in the past. I use cvs to do some programming so I need the system time to be correct otherwise cvs is gonna get messed up. I tried installing ntpd but i still cant get that to bring my linux clock back to the right time. Anyone has any idea on how i can fix this problem? Thanks loads :)

Dani AI

Generated

Short summary and a cause: the guest’s wall clock stops advancing while the VM is suspended, so on resume the guest can still show the old time. VMware Tools can (and by default will) perform a one‑time sync on events such as resume, and it also offers a periodic sync option — but that behavior and the .vmx sync flags matter for how and when the guest clock is adjusted. ’s symptom is exactly the common suspend/resume case; ’s “shut down” workaround avoids it by doing a full reboot rather than a resume. (scribd.com)

Practical immediate fix (manual): if you need the clock corrected right after resume, force a one‑time NTP correction instead of waiting for ntpd to slowly slew the clock. A reliable sequence (SysV style systems) is:

sudo /etc/init.d/ntp stop
sudo ntpd -gq
sudo /etc/init.d/ntp start

ntpd -gq lets ntpd step the clock once even if the offset is large (recommended replacement for older ntpdate use). (support.ntp.org)

Better: automate it on resume. VMware Workstation/Tools supports running guest scripts on suspend/resume (or use the Tools “Scripts” tab). Put a short executable script that runs the three commands above (or runs vmware-toolbox-cmd timesync enable if you prefer host-sync) so the time is fixed as soon as the VM is resumed. Decide whether you want native NTP or VMware Tools periodic sync — don’t run both as they can conflict; if you keep NTP, disable VMware periodic sync but still use an on‑resume one‑time fix if needed. (fr.scribd.com)

Extra tip: once system time is correct, update the guest’s hardware/RTC so future boots start close to real time:

sudo hwclock --systohc

That saves the corrected time to the (virtual) CMOS. (docs.redhat.com)

Summary recommendation: either enable/verify VMware Tools timesync (and keep host time accurate), or keep ntpd as the single periodic source and add a resume hook that runs ntpd -gq (or an equivalent one‑shot sync) so suspended sessions do not leave the clock frozen.

Recommended Answers

All 4 Replies

Well, this isn't a solution, but a workaround.

Shut down the guest. :P... I'm sure you weren't looking for that answer lol

Well, this isn't a solution, but a workaround.

Shut down the guest. :P... I'm sure you weren't looking for that answer lol

Yup you are right about that. Booting up the linux guest takes almost 2 minutes. I definately dont wanna wait that long every time I need to use the nix environment.

I'm sure this isn't the answer you were looking for either ... but you do have "synchronize guest with host" enabled, right? Perhaps you can use some other time synchronization utility? Sorry, I've never heard of ntpd? Is that supposed to be some sorta time sync daemon?

NTP = network time protocol. So, I'm assuming NTPd is Network Time Protocol Damon (syncs time with a network time server). If ya need a good NTP server, do a search on the web for NASA's - I would think that theirs is accurate enough for ya ;-).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.