VMware Cloud Community
SlawekBigAir
Contributor
Contributor

Get-CIVM vs Get-CIview -CIobject ${Get-CIVM -Name "MyVM"} status attribute

I use:

PowerCLI 6.5 Release 1 build 4624453,

vCloud Director for Cloud Service Providers 8.20 U1

When running:

Get-CIVM -name "MyVM"

I get CIObject that contain property 'Status'. 'Status' is of type CIVAppStatus and I can see the value "Powered On".

PowerCLI Reference says that CIVappStatus:

PowerCLI Reference

CIVAppStatus - Enum

Property of
CIVMTemplate, CIVAppTemplate, CIVM, CIVApp
Parameter to
Get-CIVApp, Get-CIVM

Enum Constants

Name
FailedCreation
Unresolved
Resolved
Deployed
Suspended
PoweredOn

...etc...

Now, when I run

$vm = get-civm -name "MyVM"

Get-CIview -CIobject $vm

the 'Status' parameter show value 4.

Get-CIview returns AbstractVApp, with property Status that is integer.

I can't find in PowerCLI any reference to AbstractVApp nor it property 'Status'.

I am in pursuit for vm overall health status that I could get from vCloud director like the one I can get from vCenter Server - 

(Get-View -ViewType VirtualMachine -Filter @{"Name" = "MyVM"}).OverallStatus

0 Kudos
1 Reply
vMarkusK1985
Expert
Expert

Hello,

you can find the main vApp states in the API Dokumentation:

VMware Documentation Library

Kind regards,

Markus

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos