Open shashi2713 opened 7 years ago
Sample codes to disable cluster vSphere HA/das as below.
from pyVmomi import vim
from pyVim.task import WaitForTask
das_enabled = cluster.configuration.dasConfig.enabled
if das_enabled:
cluster_spec = vim.cluster.ConfigSpecEx()
das_info = vim.cluster.DasConfigInfo()
das_info.enabled = False
cluster_spec.dasConfig = das_info
task = cluster.ReconfigureComputeResource_Task(cluster_spec, True)
res = WaitForTask(task, si=vcenter._server)
I would like to enable / disable HA and DRS on my cluster, can anyone send me the code?