1.15 Virtual Machine Clock Settings

When booting, virtual machines get their initial clock time from their host. After getting their initial clock time, fully virtual machines manage their time independently from the host. Paravirtual machines manage clock time according to their independent wallclock setting. If the independent wallclock is enabled, the virtual machine manages its time independently and does not synchronize with the host. If the independent wallclock is disabled, the virtual machine periodically synchronizes its time with the host clock.

NOTE:OES 2 NetWare virtual machines manage clock time independently after boot up. They do not synchronize with the host clock time.

If a guest operating system is configured for NTP and the virtual machine's independent wallclock setting is disabled, it will still periodically synchronize its time with the host time. This dual type of configuration can result in time drift between virtual machines that need to be synchronized. To effectively use an external time source, such as NTP, for time synchronization on a virtual machine, the virtual machine's independent wallclock setting must be enabled (set to 1). Otherwise, it will continue to synchronize its time with its host.

Viewing the Independent Wallclock Setting

  1. Log in to the virtual machine’s operating system as root.

  2. In the virtual machine environment, enter

    cat /proc/sys/xen/independent_wallclock
    
    • 0 means that the virtual machine is getting time from the host and not using independent wallclock.

    • 1 means that the virtual machine is using independent wallclock and managing its time independent from the host.

Permanently Changing the Independent Wallclock Setting

  1. Log in to the virtual machine environment as root.

  2. Edit the virtual machine’s /etc/sysctl.conf file.

  3. Add or change the following entry:

    xen.independent_wallclock=1
    

    Enter 1 to enable or 0 to disable the wall clock settting.

  4. Save the file and reboot the virtual machine operating system.

    When it boots, a virtual machine gets its initial clock time from the host. Then, if the wallclock setting is set to 1 in the sysctl.conf file, it manages its clock time independently and does not synchronize with the host clock time.

Temporarily Changing the Independent Wallclock Setting

  1. Log in to the virtual machine environment as root.

  2. Enter the following command:

    echo "1" > /proc/sys/xen/independent_wallclock
    

    Enter 1 to enable or 0 to disable the wall clock settting.

  3. Add or change the following entry:

    xen.independent_wallclock=1
    

    Enter 1 to enable or 0 to disable the wall clock settting.

    Although the current status of the independent wallclock changes immediately, its clock time might not be immediately synchronized. It might take a long time to sync. The setting persists until the virtual machine reboots. Then, it gets its initial clock time from the host and uses the independent wallclock according to setting specified in the sysctl.conf file.