Making Virtual Server Time Stand Still
Here's how to get control of a VM's virtual clock.
I found your last
column on disabling VMware time synchronization
to be very useful
and was wondering if you had a similar solution for Virtual PC or Virtual
I supposed that the lazy answer to this question would be to convert
your Virtual PC or Virtual Server VMs to a VMware platform using VMware
Converter and then follow the procedure in my last column, "Virtual
Time Freeze." However, I'm sure that this is not what you're
Virtual PC and Virtual Server both sync a virtual machine's CMOS system
clock with the physical host during any initial boot or reboot. Since
the clock synchronization occurs at the virtual hardware level, no manipulation
of the Virtual PC or Virtual Server additions software will stop the VM
from syncing with the physical host. If there is a way to stop time synchronization
between the virtual CMOS clock and physical host at the time a VM boots,
no one I could find at Microsoft is giving up the answer. Short of resorting
to torturing some members of the Microsoft Virtual Server team to learn
the answer, I do have a workaround.
Virtual PC and Virtual Server VMs will periodically sync their system
clocks with the physical host while they are running. The installed VM
Additions in each VM controls the time synchronization. If you want to
block the periodic time syncs, you can uninstall the VM additions from
each VM or you can make a slight modification to each VM's configuration
(.vmc) file. To disable time synchronization, open the VM's associated
.vmc file in Notepad and locate the "<Microsoft>\<Components>"
section. This section should appear similar to:
To disable time synchronization, set the enabled time value to "false."
If a <host_time_sync> section is not present in the .vmc file, then
you can add it to the <components> section as shown above. So when
set to disabled, the .vmc entries required to stop virtual to physical
time synchronization are:
Keep in mind that this workaround does have limitations. If you reboot
a VM, it will re-sync back with its physical host. So, to keep a VM at
a consistent date and time regardless of the physical host system's time,
you need to save the state of a VM when you are finished working with
it. When the VM resumes, its clock will reflect the date and time of the
last time the VM's state was saved.
I realize that this solution is far from perfect, since any reboots will
destroy any previously maintained time differences between a VM and its
host. But hopefully, this workaround will give you the versatility that
you need. Short of changing the date and time settings on the physical
host prior to starting a VM, there are no other known alternatives for
manually controlling the date and time that a Virtual PC or Virtual Server
VM assumes when it starts up or is rebooted.
I hope that helps. If anyone else has found a better answer to controlling
time synchronization between a Virtual PC or Virtual Server VM and its
physical host, please share your solution as a comment to this article.
Chris Wolf is VMware's CTO, Global Field and Industry.