ADVERTISE HERE

Disabling Virtual Machine Guest-to-Host Time Synchronization on Multiple Hypervisors

Title: Disabling Virtual Machine Guest-to-Host Time Synchronization on Multiple Hypervisors
Author(s): Xtravirt (Paul Buckle)
Target Audience: Technical - Intermediate
Current Revision:
First Published: 27 August 2009
Products: VMware ESX, Microsoft Hyper-V, Citrix XenServer
UID: XD10123

This document details how to disable Virtual Machine guest-to-host time synchronization on VMware ESX, Microsoft Hyper-V and Citrix XenServer. It does not discuss the various Virtual Machine time keeping mechanisms available in virtualized environments, or aim to recommend any particular practice.

Punchy Text: 

Syncing clocks... now!

1.0 Introduction

The ability to synchronize the time of a Virtual Machine guest operating system to the Host it is running on (a feature typically enabled after the installation of the relevant “guest tools” software) is common to all enterprise-class virtualization platforms.

However, if the use of NTP (Network Time Protocol) or an alternative mechanism in the Virtual Machine is the preferred means of keeping the guest time accurate, this functionality should be disabled, as detailed below.

2.0 Process to Disable Guest-to-Host Synchronization

2.1 VMware ESX

ESX guest-to-host time synchronization is disabled as follows:

  1. From the Virtual Machine Guest operating system, edit the VMware Tools properties.
  2. Select the Options tab.
  3. Uncheck Time synchronization between the virtual machine and the ESX Server operating system.
  4. Click Apply.

VMware Tools Properties

While this will prevent the ongoing, periodic guest-to-host time synchronization, be aware that, by default, it will still occur once during each of the following each Virtual Machine operations:

  • Resume from suspend
  • Migrate with VMotion to another host
  • Take or revert to a snapshot
  • Shrink the virtual disk
  • Restart the VMware Tools service
  • Power on

To also disable time synchronization for the above operations, shut down the Virtual Machine, edit its configuration file (.vmx) and specify the following options:

    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"

2.2 Microsoft Hyper-V

Hyper-V guest-to-host time synchronization is disabled as follows:

  1. From Hyper-V Manager, select the Virtual Machine and click Settings in the Action pane.
  2. Select Integration Services in the Management section in the left hand pane.
  3. Uncheck Time synchronization in the right hand pane.
  4. Click Apply.

Settings for Windows Server

While this will prevent the ongoing, periodic guest-to-host time synchronization, be aware that it will still occur once each time the Virtual Machine is powered on.

2.3 Citrix XenServer

Windows VMs
There is currently no officially documented means of disabling Windows guest-to-host time synchronization.

Linux VMs
XenServer Linux guest-to-host time synchronization is disabled as follows:

  1. Logon to the Linux Virtual Machine as root and enter the command:

                echo 1 > /proc/sys/xen/independent_wallclock

    To make the same persist across reboots, edit the /etc/sysctl.conf file and add the following lines:

             # Set independent wall clock time
                xen.independent_wallclock=1

  2. An alternative to the above is to pass the following as a boot parameter to the Virtual Machibe:

                independent_wallclock=1

References: 

1. VMware Knowledge Base Article, “Disabling Time Synchronization”, http://kb.vmware.com/kb/1189
2. VirtualAdmin.com article, “Disabling Time Sync in a [Hyper-V] VM”, http://www.virtualizationadmin.com/kbase/VirtualizationTips/ServerVirtualization/MicrosoftHyper-VTips/PerformanceandScalability/DisablingTimeSyncinaVM.html
3. XenServer Virtual Machine Installation Guide, http://support.citrix.com/servlet/KbServlet/download/20641-102-330354/guest-1.0-5.5.0-en_gb.pdf

Spotlight:

VMware Documentation Downloader v11.08.30

Updated for vSphere 5 - A free tool for those on the move who need information FAST

vSphere 5 License Entitlement Changes

See what has changed in the license entitlement in vSphere 5?

Thin Client vs Zero Client

The differences between Thin and Zero desktop clients for VDI

Technology Exchange: