Check ESX times
Get-VMHost | sort Name | select Name,@{Name="Current VMHost Time";Expression={(Get-View $_.ExtensionData.ConfigManager.DateTimeSystem).QueryDateTime()}}Sets UTC time setting with all ESX Host:
#Set Time for ESX Host
$hosts =get-vmhost
foreach($i in $hosts){
$t = Get-Date
$dst = Get-VMHost $i | %{ Get-View $_.ExtensionData.ConfigManager.DateTimeSystem }
$dst.UpdateDateTime((Get-Date($t.ToUniversalTime()) -format u))
}
http://vmtoday.com/2014/02/powercli-script-set-dns-ntp-esxi-hosts/
GetHUB link
Check hardcoated machines
get-view
-viewtype
virtualmachine
-Filter
@{
'Config.Tools.SyncTimeWithHost'
=
'True'
} | select name
After this you will receive a list with VM name that have their vm tools time sync enabled.
One more thing that is worth reading while thinking about virtual machine tools time synchronization is this:
Disabling Time Synchronization (1189)
One more thing that is worth reading while thinking about virtual machine tools time synchronization is this:
Disabling Time Synchronization (1189)
And some more information about troubleshooting esx/esxi host system regarding ntp.
Troubleshooting NTP on ESX and ESXi (1005092)
If you would like to change policy for vm tools time sync you can see how i was changing the vmware tools upgrade policy http://wp.me/pAXaY-73 and just change 1 line in the code:
from:$spec.tools.toolsUpgradePolicy = “upgradeAtPowerCycle”
to:$spec.tools.syncTimeWithHost = $true // or $false
And this will do the trick.
Troubleshooting NTP on ESX and ESXi (1005092)
If you would like to change policy for vm tools time sync you can see how i was changing the vmware tools upgrade policy http://wp.me/pAXaY-73 and just change 1 line in the code:
from:$spec.tools.toolsUpgradePolicy = “upgradeAtPowerCycle”
to:$spec.tools.syncTimeWithHost = $true // or $false
And this will do the trick.
No comments:
Post a Comment