VCP 5 – Objective 4.2 – Create and Deploy vApps

Identify vApp settings

Before idenitifying the different settings of a vAPP its probably best to define what a vApp is.  A vAPP is simply a container and like a resource pool can contain one or more VMs, resource pools, or other vApps.  A vApp can be powered on and off and cloned.  The vApps metadata actually resides in the vCenter DB, thus making it possible for a vApp to be distributed amongst different hosts.  You should always backup your vApp to an ovf in the case that you lose your db.
 
The following settings are available for a vAPP.
  • Options Tab
    • Resources – A vAPP works much like a resource pool in the fact that you can assign it cpu and memory shares. 
    • Properties – you can globally set the time zone for a vAPP
    • IP Allocation Policy – defines how IPs are assigned to the VM.  There are three further options
      • Fixed – simple right, hard coded address
      • Transient – IPs will be automatically allocated from the managed IP network range in vCenter.  Assigned upon power on, and released on power off.
      • DHCP – DHCP Server is used.
    • Advanced – can assign product name, version, url, vendor, application URL, and properties of the ovf.
  • Start Order
    • Controls the startup and shutdown options of VMs in the vApp.
    • VMs in the same group will start concurently with each other.  However, each group subsequently waits for the group above it to be started before proceding with its own startup.
    • Can set the startup option (power on, none) and shutdown action (None, power off, guest shutdown, suspend)
    • Can set an interval to wait before moving between groups (in seconds).
    • Can also specify if the interval should wait till VMware tools are ready.
  • vServices
    • Essentially allows you to set a certain service within a VM as a dependency for another VM.

Create/Clone/Export a vApp

Creating a vApp
 
The process of creating a vApp is quite simple, Right-Click and select New vApp.  Set your resources and your done.  There are a few requirements that you need to meet to create the vApp though.
  • vApps can be created on a standalone host selected in the inventory running ESX 3.0 or greater 

OR

  • A cluster enabled with DRS is selected in the inventory.

Cloning a vApp

Cloning a vApp is similar to that of cloning a VM.  To do so, select the vApp and go to Inventory->vApp->Clone.  Follow the wizard providing the following information.

  • Destination – Host or cluster
  • Name and location
  • Datastore
  • Disk format

Exporting a vApp

Exporting a vApp to an ovf Template allows you to capture the state of the VMs into a self contained package.

In order to export the vApp do the following

  • Select vApp then select File->Export->OVF Template
  • The template should read the name from your vApp
  • Select a format
    • OVA – Single File – great for transporting.  All disks are compressed into one file
    • OVF – Folder of Files – contains .ovf, .vmdk, and .mf files.  Great if you plan to publish on a web server or image library.

Add objects to an existing vApp

As stated above, a vApp can contain VMs, Resource Pools, and other vApps.  
 
To add a new object to a vApp, Right-Click on the vApp and select the object to create.
 
You can also add existing VMs and vApps to a vApp by dragging and dropping them in.  The VM/vApp that you are adding must not already belong to another vApp.
 
Edit vApp settings
 
For the most part I explained the settings for a vApp that are configurable already.  The shares, reservations, and limits are also explained during the resource pool sections of this guide.
 
Configure IP pools
 
Again, this was explained in the first section of this page.
 
Suspend/Resume a vApp
 
When suspending a vApp, you essentially pause all running VMs within the vApp.  The VMs are suspended based on their stop order, but regardless of the actions selected, all VMs are suspended.
 
The process of suspending is again quite easy, right click the vApp -> Suspend.
 
Resuming is the opposite of suspending and will continue the activity of the VM in the reversed order that it was suspended.
 
Determine when a tiered application should be deployed as a vApp
 
Certainly the example of an application that requires a Database server, application server and a webserver make sense to store within a vApp.  It would allow you to set dependencies for startup and shutdown, and ensure that one server is up before event attempting to start the next.  It also gives you a nice way to clone or backup that instance to an ovf to distribute elsewhere if needed.

Leave a Reply

Your email address will not be published. Required fields are marked *