« Microsoft Identity Management Server (MIIS) Sessions at TechEd | Main | Finally back up and running! »

April 07, 2005

Time Synch Between Guests and Hosts

A very common request in the public news groups is, "How can I disable the time synch between guests and the hosts OS? <insert any number of varied reasons why this needs to be disabled>. One of the big problems with the way time synch is implemented in both Virtual PC 2004 and Virtual Server 2005 is that it doesn't respect time zone differences between the guest and the host. What exactly do this mean? Well, say for example the your host is set to Eastern Standard time (UTC -5) and one or more of your guests are set to Pacific Standard time (UTC -8) and that the current time on the host is 11:00 AM EST. This means that the time in PST should be 8:00 AM PST (3 hours earlier). When the time is synched between the guest and the host, VS and VPC don't take into account the fact that the time zones require a delta of 3 hours and the time in the guest will be set to 11:00 AM, which means that it will be off by 3 hours. This can cause all kinds of problems, for example Kerberos authentication issues if both your guests and your host are in the same Active Directory domain. As I mentioned above, there are a number of other reasons why you may want to disable the time synch, this is just one example.
Disabling the time synch in Virtual Server 2005 is very easy. Simply open the VS Administration web site, edit the configuration of the virtual machine in question, on the Status page, click the Virtual Machine Additions link, and then clear the Host time synchronization check box. Note that the virtual machine needs to be completely shut down in order to make this change. If the guest is running, or is in a saved state, the check box will be disabled.
In Virtual PC 2004 disabling the time synch is more involved as there is nothing in the GUI that allows this change to be made. It is important to understand that time synch occurs in two different ways; any time you boot a guest it synchs time with the host, and periodically while the guest is running (if you have the additions installed) it also synchs time with the host. Completely disabling time synch in the guest requires two changes in VPC:

  1. In the guest, you need to disable the Virtual Machines Additions Services Application service. This can be done through the Services console. Note that disabling this service does not impace the performance gains you receive when the additions are installed, nor does it affect the additional display capabilities provided by the additions. In all of my testing, the only impact this has is on the time synch. Of course, you should test this as YMMV.

  2. Edit the .VMC file used by the guest

The .VMC files used by the guests are XML format files that contain configuration information specific to each guest. NOTE: I strongly suggest that you make a copy of your .VMC file before attempting to make any manual changes to it. Also, make sure that the guest is shutdown. You can use any text editor to make these changes.
You need to add some XML tags to this file, and it is important that they be added in the correct location. The new tabs need to be added to the integration/microsoft portion of the tree and it is important that you add the tags to the existing tree and that you do not create a new tree. Here are the steps to make this change:

  1. Open the .VMC file in a text editor and search for <integration>.

  2. The should be only one <integration> string in the file, and it should be immediately followed, on a new line, by <microsoft>.

  3. Directly below the <microsoft> tag, add the following tags, each tag on a new line:

  4. <components>
    <host_time_synch>
    <enabled type="boolean">false</enabled>
    </host_time_synch>
    </components>

  5. Save the file and start your guest

Time synch between the guest and the host will now be disabled.
Note that this is obviously not the optimal solution. I'd like to see two things in future versions:

  1. A GUI based method to disable time synch in VPC

  2. Have the time synch process respect the time zone differences between the guests and the host. Ideally this would be a configurable option as I can anticipate some situations where this would be useful and some where it would not be desirable

One final caveat here. You may well find that disabling the time synch feature means that your guests loose time (after all, there is a reason that the time synch feature is in the products in the first place). You should thouroughly test the effect that disabling this feature has before deciding on whether or not it is the right way to go.
If you have any questions, please feel free to add a comment to this entry.

Posted by Paul Adare at April 7, 2005 06:47 AM

Comments

Hi Paul. I´m Rogerio Melo, MCT from Brazil. Nice tip about the time sync on VPC! I´m passing it I was selected for proctoring at TechEd Orlando, MGT track, and I hope we can meet for a beer over there. Also, I will do all the possible to have some free time slots to see your presentations about RMS and Virtual Server. I´m building an msn spaces blog, can I put your blog as a reference ? Thanks a lot. Rogerio

Posted by: Rogerio Melo at April 12, 2005 05:26 PM

Hi Roger, nice to hear from you again. TechEd should be a lot of fun and I'm looking forward to meeting you.
Feel free to put a link to my blog in your MSN Space!

Posted by: Paul Adare [TypeKey Profile Page] at April 13, 2005 05:11 PM

Ok Paul, Thanks a lot. For sure your blog it´s a great source of stuff. Soon it will be a "must read" betweeen MCTs and It Pros ! See you there then !

Posted by: Rogerio Melo at April 24, 2005 04:58 AM