VMware Cloud Community
ingram1987
Contributor
Contributor
Jump to solution

VM time syncs with host at reboot, even though it isn't set to. Why?

I have a VM (server 2008 R2) that is running on an ESXi 5.0 host. The time/date is wrong on the host. Everytime I reboot the virtual machine, the time/date on it sync with the host, even though I do not have that option enabled (in vsphere or vmware tools, see screenshot).

I adjusted the time/date on the host so the time is accurate when I reboot the VM now, but how do make sure that the VM does not sync the time/date with the host when it is rebooted?

Thanks, I can provide any other details you need.

0 Kudos
1 Solution

Accepted Solutions
jrmunday
Commander
Commander
Jump to solution

In which case, follow this KB article;

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1189

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77

View solution in original post

0 Kudos
10 Replies
jrmunday
Commander
Commander
Jump to solution

Check the registry to see what the authoritive time source is. I would set it to use the domain hierarchy;
To configure a client computer for automatic domain time synchronization

  1. Open a Command Prompt.

  2. Type the following command and then press ENTER:

    w32tm /config /syncfromflags:domhier /update

  3. Type the following command and then press ENTER:

    net stop w32time

  4. Type the following command and then press ENTER:

    net start w32time

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
jdptechnc
Expert
Expert
Jump to solution

Did you check the VM's settings, Options Tab, VMware tools for the same?

Please consider marking as "helpful", if you find this post useful. Thanks!... IT Guy since 12/2000... Virtual since 10/2006... VCAP-DCA #2222
0 Kudos
ingram1987
Contributor
Contributor
Jump to solution

It is already set to use the domain hierarchy:

reg query HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
    ServiceDll    REG_EXPAND_SZ    %systemroot%\system32\w32time.dll
    ServiceMain    REG_SZ    SvchostEntry_W32Time
    ServiceDllUnloadOnStop    REG_DWORD    0x1
    Type    REG_SZ    NT5DS
    NtpServer    REG_SZ    time.windows.com,0x9
w32tm /query /configuration
[Configuration]
EventLogFlags: 2 (Local)
AnnounceFlags: 10 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)
FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)
[TimeProviders]
NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
CrossSiteSyncFlags: 2 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 3600 (Local)
Type: NT5DS (Local)
NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)
VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
0 Kudos
ingram1987
Contributor
Contributor
Jump to solution

jdptechnc wrote:

Did you check the VM's settings, Options Tab, VMware tools for the same?

Yes I did. I posted that in the question and attached a screenshot of it

0 Kudos
jrmunday
Commander
Commander
Jump to solution

In which case, follow this KB article;

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1189

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
ingram1987
Contributor
Contributor
Jump to solution

Thanks

0 Kudos
ingram1987
Contributor
Contributor
Jump to solution

It seems odd that I would have to do that for every virtual machine to ensure that it doesn't sync time with the host. The article says the VM will sync with the host "after a few specific events that are likely to leave the time incorrect".

I wish I knew what those events were so I could resolve the root issue.

0 Kudos
jrmunday
Commander
Commander
Jump to solution

Do you use NTP time sources? Why don't you point the hosts at the time servers that your domain controllers use so that they are both in sync?

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
jrmunday
Commander
Commander
Jump to solution

Here is another useful link;

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1318

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
jrmunday
Commander
Commander
Jump to solution

I wish I knew what those events were so I could resolve the root issue.

See this information here;

http://pubs.vmware.com/vsphere-50/topic/com.vmware.vmtools.install.doc/GUID-C0D8326A-B6E7-4E61-8470-...


When you turn on periodic time synchronization, VMware Tools sets the time of the guest operating system to be the same as the time of the host.


After time synchronization occurs, VMware Tools checks once every minute to determine whether the clocks on the guest and host operating systems still match. If not, the clock on the guest operating system is synchronized to match the clock on the host.

If the clock on the guest operating system falls behind the clock on the host, VMware Tools moves the clock on the guest forward to match the clock on the host. If the clock on the guest operating system is ahead of that on the host, VMware Tools causes the clock on the guest to run more slowly until the clocks are synchronized.

Native time synchronization software, such as Network Time Protocol (NTP) for Linux and the Mac OS X, or Microsoft Windows Time Service (Win32Time) for Windows, is typically more accurate than VMware Tools periodic timesynchronization and is therefore preferred. Use only one form of periodic time synchronization in your guests. If you are using native time synchronization software, turn off VMware Tools periodic time synchronization.

Regardless of whether you turn on VMware Tools periodic time synchronization, time synchronization occurs after certain operations:


When the VMware Tools daemon is started (such as during a reboot or power on operation)

When resuming a virtual machine from a suspend operation

After reverting to a snapshot

After shrinking a disk

When the operating system starts or reboots, and when you first turn on periodic time synchronization, synchronization can be either forward or backward in time. For other events, synchronization is forward in time.

To disable time synchronization completely, you must edit the configuration file (.vmx file) of the virtual machine and set several synchronization properties to FALSE.

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos