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 parent
    VirtualApp
    .
  • Each child can participate in power-on and power-off sequences.
  • 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.
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:
  • An
    InvalidArgument
    fault is thrown if the
    UpdateLinkedChildren
    method 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 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.
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.