Skip to content

Instantly share code, notes, and snippets.

@jonathanmedd
Created January 21, 2020 15:24
Show Gist options
  • Save jonathanmedd/85fd2f6f981a5b819c24d1a3917e51d3 to your computer and use it in GitHub Desktop.
Save jonathanmedd/85fd2f6f981a5b819c24d1a3917e51d3 to your computer and use it in GitHub Desktop.
VM dependency restart condition
$cluster = Get-Cluster -Name "MyCluster"
$spec = New-Object VMware.Vim.VMware.Vim.ClusterConfigSpecEx
$spec.orchestration = New-Object VMware.Vim.ClusterOrchestrationInfo
$spec.orchestration.defaultVmReadiness = New-Object VMware.Vim.ClusterVmReadiness
$spec.orchestration.defaultVmReadiness.readyCondition = 'guestHbStatusGreen'
$modify = $true
$cluster.ExtensionData.ReconfigureCluster($spec,$modify)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment