In the vSphere Web Services SDK, the VirtualApp managed object represents a virtual application. A VirtualApp object extends ResourcePool with the following capabilities:
■
■ Import and export of VirtualApp objects as OVF packages.You can use the Web Services SDK to create and manage virtual applications by following these steps:
1 Call the CreateVApp method to create a virtual application without children. See Creating a VirtualApp.
3 A virtual application consists of one or more child virtual machines or virtual applications. VirtualApp children have the following characteristics:
■ Each child has exactly one parent VirtualApp.
■ The lifetime of each child is determined by the parent VirtualApp object.VirtualApp children are either direct or linked, based on where a child derives its resources.
■ Direct Children. A direct child of a virtual application is a virtual machine or virtual application object that you add explicitly. See Managing VirtualApp Children for a list of methods. Direct children share resources with the parent VirtualApp object. Both virtual machines and virtual application can be direct children.
■ Linked Children. A linked child of a virtual application is a virtual machine or virtual application that you add by calling the UpdateLinkedChildren method. Linked children increase the flexibility of the VirtualApp by allowing child entities to use different resources from the parent VirtualApp object. Linked children can be part of a different clusters, but a virtual application and its children must be in the same Datacenter. Both virtual machines and virtual applications can be linked children.
■ An InvalidArgument fault is thrown if the UpdateLinkedChildren method is called on a link target that is a direct child of another virtual application.
■ The life-time of a linked child is determined by the destroyWithParent property on the VAppEntityConfigInfo data object. If set to true, the child is destroyed when the parent VirtualApp is destroyed. Otherwise, the link is removed when the VirtualApp is destroyed.A virtual application typically consists of one or more virtual disk files and a configuration file.The OVF package contains metadata that describes the capabilities and infrastructure requirements of the virtual application, and contains references to the virtual disks and other files that store the virtual machine state. Most of this information is stored in an XML document called the OVF envelope. When an OVF package is instantiated into either a VirtualApp or a VirtualMachine object (which depends on metadata in the envelope), then the configuration stored in the OVF envelope is applied to the VirtualVApp and the VirtualMachine objects.Some of the information in the OVF file is used unaltered, with entire ovf:Section_Type elements included in the VirtualApp object body. Other sections are transformed or extended by instantiation. You do not need detailed knowledge of all OVF package elements, but a basic understanding of key parts of the package and how they relate to virtual applications is useful.