XenServer

vApps

A vApp is a logical group of one or more related Virtual Machines (VMs) which can be started up as a single entity. When a vApp is started, the VMs contained within the vApp start in a user-predefined order. This feature enables VMs which depend upon one another to be automatically sequenced. An administrator no longer has to manually sequence the startup of dependent VMs when a whole service requires restarting (for instance for a software update). The VMs within the vApp do not have to reside on one host and can be distributed within a pool using the normal rules.

The vApp feature is useful in the Disaster Recovery situation. You can group all VMs that are on the same Storage Repository or all VMs that relate to the same Service Level Agreement (SLA).

Note:

vApps can be created and changed using both XenCenter and the xe CLI. For information on working with vApps using the CLI, see Command Line Interface.

Manage vApps in XenCenter

The Manage vApps dialog box enables you to create, delete, change, start, and shut down vApps, and import and export vApps within the selected pool. If you select a vApp in the list, the VMs it contains are listed in the details pane on the right.

You can use Manage vApps to do the following actions:

  • To change the name or description of a vApp
  • To add or remove VMs from the vApp
  • To change the startup sequence of the VMs in the vApp

To change vApps:

  1. Select the pool and, on the Pool menu, select Manage vApps.

    Alternatively, right-click in the Resources pane and select Manage vApps on the shortcut menu.

  2. Select the vApp and choose Properties to open its Properties dialog box.

  3. Select the General tab to change the vApp name or description.

  4. Select the Virtual Machines tab to add or remove VMs from the vApp.

  5. Select the VM Startup Sequence tab to change the start order and delay interval values for individual VMs in the vApp.

  6. Click OK to save your changes and close Properties.

Create vApps

To group VMs together in a vApp follow the procedure:

  1. Choose the pool and, on the Pool menu, select Manage vApps.

  2. Type a name for the vApp, and optionally a description. Click Next.

    You can choose any name you like, but a name that describes the vApp is best. Although it is advisable to avoid creating multiple vApps that have the same name, it is not a requirement. XenCenter does not force vApp names to be unique. It is not necessary to use quotation marks for names that include spaces.

  3. Choose which VMs to include in the new vApp. Click Next.

    You can use the search field to list only VMs that have names that include the specified text string.

  4. Specify the startup sequence for the VMs in the vApp. Click Next.

Value Description
Start Order Specifies the order in which individual VMs are started up within the vApp, allowing certain VMs to be restarted before others. VMs that have a start order value of 0 (zero) are started first. VMs that have a start order value of 1 are started next. Then VMs that have a start order value of 2 are started, and so on.
Attempt to start next VM after Specifies how long to wait after starting the VM before attempting to start the next group of VMs in the startup sequence. That next group is the set of VMs that have a lower start order.
  1. On the final page of Manage vApps, you can review the vApp configuration. Click Previous to go back and change any settings or Finish to create the vApp and close Manage vApps.

    Note:

    A vApp can span across multiple hosts in a single pool, but cannot span across several pools.

Delete vApps

To delete a vApp, follow the procedure:

  1. Choose the pool and, on the Pool menu, select Manage vApps.

  2. Select the vApp you want to delete from the list. Click Delete.

Note:

The VMs in the vApp are not deleted.

Start and shut down vApps by using XenCenter

To start or shut down a vApp, use Manage vApps, accessed from the Pool menu. When you start a vApp, all the VMs within it are started up automatically in sequence. The start order and delay interval values specified for each individual VM control the startup sequence. These values can be set when you first create the vApp. Change these values at any time from the vApp Properties dialog box or individual VM Properties dialog box.

To start a vApp:

  1. Open Manage vApps: Choose the pool where the VMs in the vApp are located and, on the Pool menu, select Manage vApps. Alternatively, right-click in the Resources pane and select Manage vApps on the shortcut menu.

  2. Choose the vApp and click Start to start all the VMs it contains.

To shut down a vApp:

  1. Open Manage vApps: Choose the pool where the VMs in the vApp are located and, on the Pool menu, select Manage vApps. Alternatively, right-click in the Resources pane and select Manage vApps on the shortcut menu.

  2. Choose the vApp and click Shut Down to shut down all the VMs in the vApp.

    A soft shutdown is attempted on all VMs. If a soft shutdown is not possible, then a forced shutdown is performed.

Note:

A soft shutdown performs a graceful shutdown of the VM, and all running processes are halted individually.

A forced shutdown performs a hard shutdown and is the equivalent of unplugging a physical server. It might not always shut down all running processes. If you shut down a VM in this way, you risk losing data. Only use a forced shutdown when a soft shutdown is not possible.

Import and export vApps

vApps can be imported and exported as OVF/OVA packages. For more information, see Import and Export VMs.

To export a vApp:

  1. Open Manage vApps: on the Pool menu, select Manage vApps.

  2. Choose the vApp you want to export in the list. Click Export.

  3. Follow the procedure described in Export VMs as OVF/OVA.

Exporting a vApp can take some time.

To import a vApp:

  1. Open Manage vApps: on the Pool menu, select Manage vApps.

  2. Click Import to open the Import dialog box.

  3. Follow the procedure described in Import VMs as OVF/OVA.

After the import is complete, the new vApp appears in the list of vApps in Manage vApps.

vApps