VMware {code} Community
kbr5678
Contributor
Contributor

In vApp under virtualMachine.

Hi

vApp vms get only VirtualApp entity only.Not in HostSystem or VirtualMachine.so for vApp vm details ( runtime,guest,config,datastore ) get through getDynamicProperty only..Is any other idea to get vApp vms.

Thanks

ram

Reply
0 Kudos
2 Replies
SMART3GGS
Contributor
Contributor

Hi,

Did you ever figure out the code for this? I'm trying to figure out how to find all the snapshots associated with a vm under a vapp, but can not exactly figure out how to find the vm's to do that.

Thx

Reply
0 Kudos
lamw
Community Manager
Community Manager

This is pretty trivial, what you need to do is understand how to find and locate vApps in your environment. Once you have access to the vApp, then getting the VMs will be straight forward and you'll be able to query for the snapshots.

Take a look at this sample script that works with vApps -

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos