Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 193198

Need sample java using vim25 to create vApp from scratch.

$
0
0

This is a continuation of a prior discussion titled "Does deleting vApp also delete VMs contained within?", but with regards to sample programs only. In that discussion I ask for pointers to good sample programs using the SDK. I reviewed the code at a link provided in a reply and lots of code found elsewhere related to the vSphere SDK and VIJAVA, and though there are some sample programs I can't seem to find either examples related to what I need to do or enough information to figure out how to do what I need to do.

 

At present I am trying to figure out the best way to use Java to programatically create a vApp, add and subtract VMs from the vApp, and perform basic tasks on the vApp. I can find a lot of sample programs that perform the later item, but all of those example are working against an existing vApp. I'm looking for some sample code where a vApp is created from scratch. I'm currently working on a toy program which gets the Service Instance and Server Connection, and pulls the VIM Service reference (I end up with a VimPortType object). From that reference I can call the "createVApp()" method. Where I'm having trouble is figuring out how to set up the resource and configuration specifications (params 2 and 3). The docs don't seem to provide enough information for me to know how to set these up or what values I should use (can they be null or will default values suffice). I also don't know if this is even the best approach to creating a vApp programatically.

 

My practice development target is an ESXi 5.n hypervisor and I'm using vim25 libraries. I've created a single folder to hold practice vApps. There are no other folders or VMs on the hypervisor. Eventually I want to be able to move VMs in and out of the vApp as needed. Regardless of the approach, I'm hoping to find some sample programs that provide context to the thin usage documentation I've been able to locate so far.

 

Thanks in advance,

 

Ron


Viewing all articles
Browse latest Browse all 193198

Trending Articles



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