VMware Cloud Community
gopinathan
Contributor
Contributor
Jump to solution

How to read EVC setting using vSphere PowerCLI

I am trying to read the host EVC setting using get-view. So far no success. Anybody?

Reply
0 Kudos
1 Solution

Accepted Solutions
jeveenj
Enthusiast
Enthusiast
Jump to solution

You can try below code snippet, which will give you some details about host’s EVC

Connect-VIServer <server> -User <user> -Password <password>
$vmHost = Get-VMHost -Name <host_name> | Get-View

#unset if this host cannot participate in any EVC mode
$maxEVC = $vmHost.Summary.MaxEVCModeKey

If($maxEVC -eq $null){
	"Host cannot participate in any EVC mode"
}
else{
	Write-Host "The most capable ECV mode supported by the host hardware and software: $maxEVC" 
}

#this will be unset if it will not match the cluster's EVC mode
$currentEVC = $vmHost.Summary.CurrentEVCModeKey

If($currentEVC -eq $null){
	"Current EVC mode not available/unset"
}
else{
	Write-Host "The Enhanced VMotion Compatibility mode that is currently in effect for this host: $currentEVC"
}

Hope this helps.

-If you found this information useful, please consider awarding points for Correct or Helpful.

View solution in original post

Reply
0 Kudos
3 Replies
jeveenj
Enthusiast
Enthusiast
Jump to solution

You can try below code snippet, which will give you some details about host’s EVC

Connect-VIServer <server> -User <user> -Password <password>
$vmHost = Get-VMHost -Name <host_name> | Get-View

#unset if this host cannot participate in any EVC mode
$maxEVC = $vmHost.Summary.MaxEVCModeKey

If($maxEVC -eq $null){
	"Host cannot participate in any EVC mode"
}
else{
	Write-Host "The most capable ECV mode supported by the host hardware and software: $maxEVC" 
}

#this will be unset if it will not match the cluster's EVC mode
$currentEVC = $vmHost.Summary.CurrentEVCModeKey

If($currentEVC -eq $null){
	"Current EVC mode not available/unset"
}
else{
	Write-Host "The Enhanced VMotion Compatibility mode that is currently in effect for this host: $currentEVC"
}

Hope this helps.

-If you found this information useful, please consider awarding points for Correct or Helpful.
Reply
0 Kudos
gopinathan
Contributor
Contributor
Jump to solution

Thanks a lot. That helps!

Reply
0 Kudos
regis
Contributor
Contributor
Jump to solution

Hello

and how to set evc mode ?

$clusterview.Summary.CurrentEVCModeKey("intel-merom"), doesn't work !!

can use set_CurrentEVCModeKey ?

Thank you.

Régis

Reply
0 Kudos