VMware Cloud Community
CirConFleX
Contributor
Contributor

ClusterComputeResource

Hi,

does anyone have an explanation why this command does not return anything ? Thank you.

Get-View -ViewType ClusterComputeResource

 

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership

Are there any clusters?
Does Get-Cluster return anything?
Are you connected to the correct vCenter?
What does $global:defaultVIServers return?


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

Reply
0 Kudos
CirConFleX
Contributor
Contributor

Yes any other commands work normally for example Get-VMHost returns results.

But not Get-Cluster, it's also return empty result. There are 2 clusters in our vSphere environment.

$global:defaultVIServers returns our vCenter.

Reply
0 Kudos
LucD
Leadership
Leadership

Do you see any ClusterComputeResource entries when you do this?

$si = Get-View ServiceInstance
Get-View -SearchRoot $si.Content.RootFolder -ViewType ComputeResource |
Select Name,@{N='Type';E={$_.GetType().Name}}


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

Reply
0 Kudos
CirConFleX
Contributor
Contributor

Sorry for the late reply, i was on vacation. Yes this command is working.

PS C:\Windows\system32> $si = Get-View ServiceInstance
PS C:\Windows\system32> Get-View -SearchRoot $si.Content.RootFolder -ViewType ComputeResource |
>> Select Name,@{N='Type';E={$_.GetType().Name}}

Name Type
---- ----
xxxx-1.loc ComputeResource
xxxx-2.loc ComputeResource
xxxx-3.loc ComputeResource
Reply
0 Kudos
LucD
Leadership
Leadership

That looks as if there are only ESXi nodes in that vCenter, not Clusters


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

Reply
0 Kudos