VMware Cloud Community
mbietz
Contributor
Contributor

Taking a snapshot changes time in guest operating system?!

I have some strange behavior with taking snapshots of running systems.

If i take a snapshot, the time in the guest operating system is immediately

changing to the time of the esx host.

How can i prevent this?

0 Kudos
4 Replies
mbietz
Contributor
Contributor

no-one any idea??

0 Kudos
dgrace
Enthusiast
Enthusiast

I think most people are using the ESX hosts to keep time in their VMs so they probably don't see it what you are dealing with. It's been recommended to set your ESX host to NTP servers and then have your VMs pull time from ESX through VMTools.

0 Kudos
admin
Immortal
Immortal

That would be a problem if you want the host to run on GMT (or even the server's local time), but you want a guest to run on the users local timezone.

Interestingly enough, the guests in my VMWare Workstation 5 keep their time separate from the host. But I've confirmed that the guests in my ESX 3.0.1 do not.

In the advanced config, you're supposed to be able to set the following attribute in VirtualCenter:

tools.syncTime: FALSE

This prevents it from syncing while the guest tools are loaded. But even with that set, my guests lose their own time each time theyre restarted.

\[root@vc-vm-rgesx3 netpipes]# date -s 10:01:01

Thu Nov 16 10:01:01 CST 2006

\[root@vc-vm-rgesx3 netpipes]# /sbin/hwclock --systohc

(((booted guest, XP Pro -- time showed up as 10:04AM)))

\[root@vc-vm-rgesx3 netpipes]# /usr/sbin/ntpdate -b tick.uh.edu

16 Nov 11:23:11 ntpdate\[24769]: step time server 129.7.1.66 offset 4619.688717 sec

Confirmed what you're seeing though: I ran "hwclock --systohc" again, and the guest continued keeping its time independently of the ESX server. However, on a poweroff, the guest OS displayed the time of the ESX server again.

Only way I can think around this in the meantime, is that you can set the guest to its local timezone and then sync the clock (NTP protocol) to a public timeserver (i.e. time.windows.com or tick.uh.edu) rather than to the ESX host, which it seems you don't want the clock to sync with anyway.

Doing that anyway, the guest displays the timezone I set it as, but on a server thats a particularily irksome proposition, as on bootup, all of my events and timestamps are going to match the ESX host until it syncs with an NTP server. Search the forums for "tools.syncTime" and see if you can find some tips on others peoples experience with this, it might be worth submitting an SR on this if it isnt a known issue.

0 Kudos
craigal
Enthusiast
Enthusiast

Sorry to raise on old thread but I have discovered the same problem and this thread did not present a solution to the problem.

To the original poster, did you ever find a solution to this problem?

In our environment our VMs are part of a Windows 2003 AD domain and thus get their time from the domain controller. I do NOT have the sync with host option selected in VMWare tools.

Cheers

Craig

0 Kudos