VMware Communities
rbraun204
Contributor
Contributor
Jump to solution

Disabling the time sync feature in Workstation 6.5

I have a question regarding clock management on linux guests. We're running Debian Etch/Lenny host systems with workstation 6.5. The guests are a lenny system with vmware tools installed. We have several streaming data feeds that we database, and we need to be able to go back in time and recreate the ingest of the data feeds for training purposes. The goal is to record the data from a day (for instance april 20 2008), boot up the VM and have the guest VM date be set to April 20 2008, while the hosts clock is still the current date.

I fired up a VM yesterday, made sure the vmware tools app was configured to not sync time, and rolled back the clock on the VM. when I came into work this morning, the clocks were sync'd up again. So I'd like to know how to disable the clock sync.

I had this running a couple of years ago with Workstation 5.x, but I don't remember having to do anything special with the time sync configuring....

0 Kudos
1 Solution

Accepted Solutions
IamTHEvilONE
Immortal
Immortal
Jump to solution

rbraun204,

There are several events that will still trigger time sync in a virtual machine (suspend, power on/off, and more).

RE KB 1189 (http://kb.vmware.com/kb/1189/)

If you want to completely disable time synchronization in the guest, open the virtual machine's configuration file (.vmx) in a text editor and set the following options to zero:

tools.syncTime = "0"

time.synchronize.continue = "0"

time.synchronize.restore = "0"

time.synchronize.resume.disk = "0"

time.synchronize.shrink = "0"

time.synchronize.tools.startup = "0"

Notes:

  • For some products (such as VMware Workstation), you may need to use "FALSE" instead of "0". For example:

tools.syncTime = "FALSE"

  • In some cases, the virtual machine may need to be rebooted.



Regards,

EvilOne

VMware vExpert 2009

5441_5441.jpg

NOTE: If your problem or questions has been resolved, please mark this thread as answered and award points accordingly.

View solution in original post

0 Kudos
6 Replies
IamTHEvilONE
Immortal
Immortal
Jump to solution

rbraun204,

There are several events that will still trigger time sync in a virtual machine (suspend, power on/off, and more).

RE KB 1189 (http://kb.vmware.com/kb/1189/)

If you want to completely disable time synchronization in the guest, open the virtual machine's configuration file (.vmx) in a text editor and set the following options to zero:

tools.syncTime = "0"

time.synchronize.continue = "0"

time.synchronize.restore = "0"

time.synchronize.resume.disk = "0"

time.synchronize.shrink = "0"

time.synchronize.tools.startup = "0"

Notes:

  • For some products (such as VMware Workstation), you may need to use "FALSE" instead of "0". For example:

tools.syncTime = "FALSE"

  • In some cases, the virtual machine may need to be rebooted.



Regards,

EvilOne

VMware vExpert 2009

5441_5441.jpg

NOTE: If your problem or questions has been resolved, please mark this thread as answered and award points accordingly.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

@ EvilOne

you definetely need to use "false" instead of "0"

here is some more info http://sanbarrow.com/vmx/vmx-always-start-tonight.html




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

rbraun204
Contributor
Contributor
Jump to solution

Great stuff! Thanks guys. I do have one more related request.

I am worried about clock skew on the guest with no time syncing going on. Is it at all possible to provide it an offset when syncing? For example, all our date's are kept in epoch times, so say 1266228000 is actually 2010-02-15 1000Z, and 1267039887 is 2010-02-24 1931Z. The difference between those 2 times in seconds is 811887. Now if I wanted to run my VM as if it were 2010-02-15 1000Z, could I provide the timesync an offset of 811887 to allow it to sync to the currenttime - the offset?

I suppose I could do some funky wrapping of ntpdate/date to manage that, but was just wondering out loud if there is a "proper" way to implement this sort of thing.

Thanks for the help guys!

0 Kudos
continuum
Immortal
Immortal
Jump to solution

AFAIK the only options that do not require special scripting to update the vmx-file are:

- start NOW = in sync with the host

- start at a fixed preset time = like described in the "always start tonight" example on my site

To start with a given offset like "allways seven weeks from now in the future" you would use some autoit-script for example to adjust the vmx-file




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
rbraun204
Contributor
Contributor
Jump to solution

hmmm I'm not sure thats what I'm looking for. From time to time we can have datasets upto 72 hours in size, and I've created a set of scripts inside the VM guest that allows the user to skip to a certain point in the dataset, which in turn would reset the system clock to the point they've selected. So I would need to be able to change the offset on the fly.

I'm thinking having an ntp service running on the host, then be able to do the following,

once I know what the offset is going to be (say for instance 811887).

Then create a script that would poll the ntp server for the current time in epoch, subtract my offset from that number and then use date --set to sync the clock. Then just set that up as a cronjob. Should be able to keep things in sync that way I would think? That way if I have a user that wants to fast forward a few hours (180min x 60s = 10800s) I could reduce the offset by 10800.

So the flow would be something like this (assuming the current time is 2010-02-24 1931Z or 1267039887)

1. VM boots up

2. User selects appropriate dataset (1266228000 or 2010-02-15 1000Z)

3. System clock set 1266228000

4. New offset established as 1267039887 - 1266228000 = 811887

5. cron job manages clock with above concept

6. user wishes to change the date to 2010-02-15 2000Z or 1266264000

7. system clock set to 1266264000

8. updated offset to 1267039887 - 1266264000 = 775887

9. cron job returns to managing the clock.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

what about running a self-made time-server ?






___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos