Recently I quickly mentioned the universal PowerCLI applet Search-Cloud that can be used when dealing with vCloud Director. Howevery it seems you have to verify its output when using it to query Provider Vdc parameters. The output mixes the “allocation” and “used” counters for CPU, Memory and Storage as you can see in the example below (“used” is larger than “limit”).

$aPvdc = Search-Cloud -QueryType ProviderVdc;
$Pvdc = $aPvdc[0];
PS > $Pvdc.PropertyList

Key                  Value
---                  -----
Name                 PvDC-SITEA-01
IsEnabled            True
IsDeleted            False
VcpuRatingMhz        1000
CpuAllocationMhz     266368
CpuLimitMhz          478901
CpuUsedMhz           774192
MemoryAllocationMB   1575227
MemoryLimitMB        4221102
MemoryUsedMB         2298626
StorageAllocationMB  5516196
StorageLimitMB       17408000
StorageUsedMB        55212916
NumberOfDatastores   7
NumberOfVdcs         101
IsBusy               False
Status               READY
Id                   urn:vcloud:providervdc:deaddead-dead-dead-dead-deaddeaddead
AnyAttr              {vcName, cpuOverheadMhz, vc, numberOfResourcePools...}

When you query the underlying PvDC with REST directly (or via vCO GUI) vCD returns correct results.

This issue was detected with PowerCLI version “VMware vSphere PowerCLI 5.1 Release 1 build 793510” (and vCloud version “VMware vCloud Director PowerCLI Component 1.5 build 793505”).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.