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).
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?
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().
Thank you for the answer.
But I don'tunderstand how to implement it.
Have you a sample?