Direct and Linked
Children
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 parentVirtualApp.
- Each child can participate in power-on and power-off sequences.
- The lifetime of each child is determined by the parentVirtualAppobject.
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 parentVirtualAppobject. 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 theUpdateLinkedChildrenmethod. Linked children increase the flexibility of theVirtualAppby allowing child entities to use different resources from the parentVirtualAppobject. Linked children can be part of a different clusters, but a virtual application and its children must be in the sameDatacenter. Both virtual machines and virtual applications can be linked children.
Linked children gives better flexibility. In
particular, you can create virtual applications that span clusters. The vSphere
Client does not support adding or removing links, though it does show links.
When you add a linked child to a virtual
application, the following rules apply:
- AnInvalidArgumentfault is thrown if theUpdateLinkedChildrenmethod is called on a link target that is a direct child of another virtual application.
- When you add a virtual machine or virtual application that is already a linked child of another virtual application, the existing link is removed and replaced with the new link.
- The life-time of a linked child is determined by thedestroyWithParentproperty on theVAppEntityConfigInfodata object. If set totrue, the child is destroyed when the parentVirtualAppis destroyed. Otherwise, the link is removed when theVirtualAppis destroyed.
If you add a virtual application that consists
of multiple entities, for example multiple virtual machines, the entities are
moved sequentially and committed one at a time, as specified in the list. If a
failure is detected, the method terminates with an exception.