VMware {code} Community
Franpom
Contributor
Contributor

Create vApp

Hello,
I have not found anything on the Internet to create a vApp on a host in perl
Do you have any idea how I can create a vApp on esx?
Thank you in advance for your answers.

0 Kudos
4 Replies
stumpr
Virtuoso
Virtuoso

You mean directly to ESXi or just on vSphere?

Creating a vApp container is pretty simple, then you have to populate it by moving VMs (or creating VMs) in it.  vApps are basically a hybrid folder+resource pool (with some start-stop properties).

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos
Franpom
Contributor
Contributor

Hello,
Thank you for your reply.
I want to create a vApp using a perl script directly on the host that represents the ESX.
Is this possible and how?

0 Kudos
stumpr
Virtuoso
Virtuoso

Yes, should be.

You need to call CreateVApp from a resource pool object.  On a standalone host, you'll need to go to $service_content->{rootFolder}{childEntity}[0]{hostFolder}{childEntity}[0]{resourcePool}.  There are other ways to get the ComputeResource object, but that's the direct path on a stand alone host.  Then you'll need to call get_view() on that resource pool object, and then call CreateVApp().

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos
Franpom
Contributor
Contributor

Thank you for the answer.

But I don'tunderstand how to implement it.
Have you a sample?

0 Kudos