VMware Cloud Community
CAE0621
Enthusiast
Enthusiast
Jump to solution

Get-DRSClusterGroup not finding members in VMGroup in CLI, though they are there in GUI

About two weeks back I migrated a large amount of VMs out of a DRS group, then for some reason my script stopped being able to find members of that group. It happened in two different datacenters, both clusters & drs-groups are named the same. It didn't happen to the other clusters with similar naming conventions & data. Screenshots to clarify:

CAE0621_0-1667928042302.png

CAE0621_1-1667928054598.png

You can see via the GUI that the DRS group has almost 900 VMs in it, but it shows as entirely blank in CLI. In contrast, the other cluster in the same datacenter:

CAE0621_2-1667928124112.png

CAE0621_3-1667928131707.png

It has no problem finding VMs in the group.

 

I've tried rebooting the VCSA thinking it was just a glitch, but I can't find any logical reason why this would be affecting just my "R04-Genpop" cluster in two different datacenters and only the VMGroup named "Genpop_VMs". If anyone sees something I'm missing, please let me know

 

 

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

It might be that you have hit a PowerCLI bug.
Since it seems to work in the Web Client and using the API, it obviously points to PowerCLI.

You might first try to upgrade your PowerCLI version.

If that doesn't help I suggest opening an SR.

If GSS claims PowerCLI is not supported without a Developer Support contract, point them to Online Documentation - PowerCLI 12.3.0 User’s Guide - VMware {code}


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

View solution in original post

3 Replies
LucD
Leadership
Leadership
Jump to solution

Which vSphere and PowerCLI version are you using?

Can you check via the API what is actually there?
Something like this for example

$clusterName = 'cluster'    # <== change name

$cluster = Get-Cluster -Name $clusterName
$cluster.ExtensionData.ConfigurationEx.Group |
where{$_ -is [VMware.Vim.ClusterVmGroup]} |
ForEach-Object -Process {
  New-Object -TypeName PSObject -Property ([ordered]@{
    Groupname = $_.Name
    VMCount = $_.Vm.Count
    VM = (Get-View -Id $_.VM -Property Name).Name -join '|'
  })
}


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

Reply
0 Kudos
CAE0621
Enthusiast
Enthusiast
Jump to solution

vsphere:

Version: 7.0.3 

Build: 19480866

powercli:

Get-Module -Name VMware* | select name, version

Name Version
---- -------
VMware.Vim 7.0.2.17839075
VMware.VimAutomation.Cis.Core 12.3.0.17839331
VMware.VimAutomation.Common 12.3.0.17838947
VMware.VimAutomation.Core 12.3.0.17839688
VMware.VimAutomation.Sdk 12.2.0.17531155

given command:

CAE0621_0-1667930574854.png

 

That version you sent worked, any idea why it would work in that format but not the original?

 

 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

It might be that you have hit a PowerCLI bug.
Since it seems to work in the Web Client and using the API, it obviously points to PowerCLI.

You might first try to upgrade your PowerCLI version.

If that doesn't help I suggest opening an SR.

If GSS claims PowerCLI is not supported without a Developer Support contract, point them to Online Documentation - PowerCLI 12.3.0 User’s Guide - VMware {code}


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