Automation

 View Only
  • 1.  Querying Guest OS time

    Posted Jun 25, 2008 10:16 PM

    Is there a way to query on the VM's time (Guest OS: Win2k, xp, 2k3). I'd like to be able to generate a report or output that will show if there are any VM's that are out of sync. We have many standalone VM's (workgroup) that do not sync time with a domain controller. I would like to occasionally check for any "drifters". I can't find anything under vm.config. Any ideas?



  • 2.  RE: Querying Guest OS time

    Posted Jun 26, 2008 07:32 AM

    Time on guests has been the subject of many discussions in other forums (just do a search on "time" and "guest").

    The best way, in my opinion, to keep accurate time on the guests is the following:

    1) configure your ESX hosts to run ntp and sync with a reliable source in your network

    2) install the VMware tools on your guests

    3) configure VMware tools to sync time with the host

    4) disable the Windows Time service

    5) exception could be a virtual Windows Active Directory environment but then don't use Tools time sync and Windows Time together on 1 guest

    Example:

    - virtual DC(s) : use Tools time sync

    - other virtual AD computers: use Windows Time service to sync with the DC and do not use Tools time sync

    The Tools time sync can also be set with the CustomizeVM_Task method.

    Use the syncTimeWithHost property in the ToolsConfigInfo object.

    Querying the actual time on the guests can't be done via the VI Toolkit or the SDK.

    You will have to use a function on the (Windows) guests.

    For example via WMI (provided your guests are not isolated from your network).