VMware Cloud Community
hchchchc
Contributor
Contributor

How to set HA Host Isolation Response and Enable EVC with PowerCLI

hi,

i' working on a script to automatically create clusters by powercli.

generally it works out very well, but there are 2 things i can't get to work:

- set ha host isolation response to "Shut Down VM"

- enable evc for intel hosts

does anyone know how (or if) this is possible to via powercli ?

thanks a lot for your help ::)

greets, chris

10 Replies
LucD
Leadership
Leadership

To set the isolation response you can use the Set-Cluster cmdlet like this

Get-Cluster <clustername> | Set-Cluster -HAIsolationResponse "PowerOff" -Confirm:$false

This sets the isolation response default for the cluster.

You can override this default on a per guest basis.

To enable EVC you have to use the ReconfigureComputeResource_Task method in the current PowerCLI build.

$cluster = Get-Cluster <clustername> | Get-View
$spec = New-Object VMware.Vim.ClusterConfigSpecEx
$spec.dpmConfig = New-Object VMware.Vim.ClusterDpmConfigInfo
$spec.dpmConfig.enabled = $true
$taskMoRef = $cluster.ReconfigureComputeResource_Task($spec, $true)
...


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

hchchchc
Contributor
Contributor

hi,

so as i see from your reply, there is NO way to set the host isolation response to "ShutDown" by script (only poweroff and donothing).

the second part of your answer shows how to enable distributed power management, but not evc :-((

do you have an idea for evc ?

thanks, chris

0 Kudos
admin
Immortal
Immortal

Luc I believe your script will enable DPM. As far as I know it is not possible to enable EVC directly via remote API. Certainly the vSphere Client can do it, and it may also be possible via host profiles but I'm not sure.

=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

LucD
Leadership
Leadership

In the ClusterDasVmSettingsIsolationResponse enumeration there are 3 possible values listed: none, powerOff and Shutdown. The last values was introduced with API v2.5u2.

These values seem to correspond with the values you see in the vSphere client: Leave powered on, Power off and Shut down.

In the current PowerCLI build the Set-Cluster cmdlet accepts the following values: AsSpecifiedByCluster, PowerOff, DoNothing.

That would mean you have to go for the ReconfigureComputeResource_Task method to select the "Shutdown" option (for now).

For the EVC part, I indeed misread the question and answered with the DPM config method.

Carter is right that the current API Reference guide doesn't include any EVC methods.

But with the method I described in The Onyx alternative ? you can see that there are a number of EVCManager methods used by the vSphere Client.

With the method used in the Invoke-TkeInternalMethod function in the VI Toolkit for Windows Community Extensions you could eventually call the EVCManager methods.

Couldn't try it out since I don't have any EVC capable CPUs in my test environment Smiley Sad


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

hchchchc
Contributor
Contributor

hi - thanks a lot !!! i'll try both and let you know ...

at vmworld they said, that there will be an update on powercli soon with a lot more options and functionality - do you know when this new release will be available ?

thanks, chris

0 Kudos
admin
Immortal
Immortal

Luc, you could call the method but as I remember there is a data object it requires that has no client-side representation, thus no XML serializers. Very difficult to call this stuff I'm afraid. Unfortunately EVC is not just flipping a switch like lockdown mode is.

=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

0 Kudos
Milk_Man
Contributor
Contributor

Anyone know if there has been any changes that would allow enabling EVC with PowerCLI?

0 Kudos
LucD
Leadership
Leadership

Afaik, no.

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ksudheer123
Contributor
Contributor

Hi,

I'm looking for same solution also.. does anyone know if there has been any latest changes that would allow enabling EVC with PowerCLI?


Thanks,

Sudheer

0 Kudos
LucD
Leadership
Leadership

No change afaik.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos