VMware Cloud Community
GreyhoundHH
Enthusiast
Enthusiast
Jump to solution

Report hosts in DRS-Rules

Hi,

we're currently using DRS for distribution of Windows-VMs on specific hosts within our clusters. These hosts are bundled in a DRS-Group "Windows licensed hosts" in each cluster.

For our license-management I need to report the current number of hosts (and CPUs per host) assigned to these DRS-Groups each month.

As the environment is growing bigger I want to automate this task by using a scheduled report.

How can I get a list of relevant hosts incl. physical CPUs per cluster and a total CPU-count?

We're using vSphere 5.1 and PowerCLI doesn't seem to offer a lot for DRS-Groups out of the box.

I just need to know how to get the list of hosts, I can do anything around that (adding PSModule, connection to vVenter, report per mail, etc.) by myself

Any help appreciated.

0 Kudos
1 Solution

Accepted Solutions
schepp
Leadership
Leadership
Jump to solution

Hi Daniel,

right, PowerCLI doesn't offer much out of the box.

But there's a module you can import:

http://www.lucd.info/2015/01/22/drsrule-drs-rules-and-groups-module/

That should help 😉

Tim

View solution in original post

4 Replies
schepp
Leadership
Leadership
Jump to solution

Hi Daniel,

right, PowerCLI doesn't offer much out of the box.

But there's a module you can import:

http://www.lucd.info/2015/01/22/drsrule-drs-rules-and-groups-module/

That should help 😉

Tim

GreyhoundHH
Enthusiast
Enthusiast
Jump to solution

That's looking good 😃

Just did my first steps using it...

PowerCLI C:\> Get-Cluster CLUSTER | Get-DrsVMHostGroup -Name '*Windows*' | select VMHost

VMHost

------

{HOST1, HOST2}

How can I iterate through this list of hosts now?

Foreach doesn't work as it's no array.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Try doing a Select -ExpandProperty VMHost


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

GreyhoundHH
Enthusiast
Enthusiast
Jump to solution

Thanks a lot that worked.

0 Kudos