VMware Cloud Community
lurims
Enthusiast
Enthusiast

How to get VCACVM payload properties after the VM is provisioned

How to get VCACVM properties after the VM is provisioned

I have to get some properties those are available in payload object when a VM is provisioned using a blue print.  Surprisingly some of these properties are not available using action com.vmware.library.vcac/getPropertiesFromVirtualMachine when run after the vRA VM is created.  How to get those properties.  I am looking for

["lifecycleState"]["state"]

["lifecycleState"]["phase"]

["lifecycleState"]["event"]

["machine"]["id"]

["machine"]["properties"]["VirtualMachine.Network0.MacAddress"]

["machine"]["properties"]["Hostname"]

And some other custom properties defined as part of VM provisioning.

0 Kudos
1 Reply
qc4vmware
Virtuoso
Virtuoso

You can get the machine information directly from the properties and extended properties on the vCACVM.  I'll attach an action that will do this.  For the lifecycle information I'm not sure if anything is available while an action is not initiated on the vm.  If there is lifecycle information I'd guess it is on the catalog resource for the component of maybe on the deployment?