Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 171074

Re: QueryVMField.VAPPNAME causes VCloudException

$
0
0

Ok I too ran into that same error and didn't see why that was happening. Maybe that field is not available however its in the enum (its actually a struct but you get my point). There is always another way to skin the cat though. Once you have your references you could simple do this:

 

          //using the method I posted above

          var vApps = GetQueryvAppReferences("MyVAppName");

 

            foreach (var vApp in vApps)

            {

                    //get the reference to the vapp here

                     var vAppObject = Vapp.GetVappByReference(_client, vApp);

 

                    //now its easy to get the children vms

                     var vms = vAppObject.GetChildrenVms();

            }

 

I find using the query service you have to write way more lines of code then you need to.


Viewing all articles
Browse latest Browse all 171074

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>