Time is critical.
In VMs this criticality is even more pronounced. Time slips… CPU instructions go askew, and things get weird. That said, there are situations when you may wish to disable the built in VMware Tools Time sync service… completely. What do I mean by completely? Well, even with the tools time sync set to disabled, VMware will force a VM to sync with the host in some specific situations, and despite my valiant Google effort, I was unable to uncover exactly what these are.
According to KB 1189, you can disable TimeSync completely by adding a few parameters to the config file:
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, as shown below.
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"
While that is borderline awesome… when combined with Glenn’s script from get-admin:
$ExtraOptions = @{
"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";
} # build our configspec using the hashtable from above. I prefer this
# method over the use of files b/c it has one less needless dependency.
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
# note we have to call the GetEnumerator before we can iterate through
Foreach ($Option in $ExtraOptions.GetEnumerator()) {
$OptionValue = New-Object VMware.Vim.optionvalue
$OptionValue.Key = $Option.Key
$OptionValue.Value = $Option.Value
$vmConfigSpec.extraconfig += $OptionValue
}
# Get all vm's not including templates
$VMs = Get-View -ViewType VirtualMachine -Property Name -Filter @{"Config.Template"="false"} # Do it!
foreach($vm in $vms){
$vm.ReconfigVM_Task($vmConfigSpec)
}There you have it. Time disabled in all your VMs.

Pingback: Tweets that mention Time Is Marching On… Disabling TimeSync, Completely. -- Topsy.com
Pingback: Liens du jour #5 - Hypervisor.fr