Hi Luc,
can you please suggest if i can use rest apis to anayse health of vcenter appliance using connect-cisserver.
i used following and health of vcenter appliance comes as orange .right now i dont have vcenter root password to check gui.are there further apis to analyse further .
I'm afraid there is currently no fool-proof way available to make the link between a guest OS partition and the VMDK on which it lives.
But luckily, the VCSA partition-VMDK mapping is well documented.
See for example the table in William's post Updates to VMDK partitions & disk resizing in VCSA 6.5
What you are seeing for /storage/archive is intentional and by design (see KB57829).
The issue with the warning message is fixed VCSA 6.7U1b
Note that you increase the VCSA file sizes via a REST API (/appliance/system/storage/resize)
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, there are quite a few.
Use the API EXplorer (https://<vcsa-FQDN>/apiexplorer) to see what is available in your vSphere version.
It depends what you want to see.
There is for example the option to check the status of the services.
$vmon = Get-CisService -Server $vcName -Name 'com.vmware.appliance.vmon.service'
$services = $vmon.list_details()
$services.GetEnumerator() |
Select @{N='Service';E={$_.Key}},
@{N='State';E={$_.Value.state}},
@{N='Health';E={$_.Value.health}},
@{N='Startup';E={$_.Value.startup_type}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc .since the health of storage comes out orange as mentioned in the screen shot .i am trying to see the partitions space for vcsa.
Afaik, that is not available through the REST API.
Can't you see that with
(Get-VM -Name <vcsa>).Guest.Disks
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks .i found /storage/archive is nearly full .there are 12 partitions and 13 hard drives .now we need to find disk corresponding to /storage/archive.
i thought of finding in percentage format as this thing is missing in all powercli commands . can we add some logic in below to find corresponding vmdk to be increased ??
Connect-CisServer -Server "servervc" -Credential $credential
$health_appliancestorage=(Get-CisService -Name 'com.vmware.appliance.health.storage').get()
$health_appliancestorage
if($health_appliancestorage -ne 'green')
{
Disconnect-CisServer -Server "servervc"
Connect-VIServer -Server "servervc" -Credential $credential
$vm=get-vm servervc
$paths=$vm.Guest.Disks
$paths
foreach($p in $paths)
{
$partition_freespace_percent=$p.freespacegb/$p.capacityGB*100
$partition_freespace_percent_round=[math]::Round($partition_freespace_percent)
$p|select @{N='vmname';E={$vm.name}},@{N='partition';E={$p.Path}},@{N='freespacepercent';E={$partition_freespace_percent_round}}
}}
I'm afraid there is currently no fool-proof way available to make the link between a guest OS partition and the VMDK on which it lives.
But luckily, the VCSA partition-VMDK mapping is well documented.
See for example the table in William's post Updates to VMDK partitions & disk resizing in VCSA 6.5
What you are seeing for /storage/archive is intentional and by design (see KB57829).
The issue with the warning message is fixed VCSA 6.7U1b
Note that you increase the VCSA file sizes via a REST API (/appliance/system/storage/resize)
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thnaks luc.as per the vmware kB it should be autoclearedby archiver service .
i also run your code to check all the services started .is there any specific service realted to archiver .
That should be the vmware-postgres-archiver service.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
tx .since it is started I think as mentioned in kb 6.71b update will get rid of this.
The update will get rid of the message mentioned in the KB.
The partition will always be close to 100% used, that is how it set up.
The archiver will remove old entries when there is a need to have more space.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
though it is by design to utilise nearly 100 percent of partition space but update will make health green from orange .
and this will avoid confusion of unhealthy vcenter appliance. Is that correct?
That is indeed how I understood the explanation in the KB.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks .let me paint it green:smileylaugh: