5. vCloud Resource Design : 5.4 Organization Virtual Datacenters : 5.4.4 vApp Placement
   
5.4.4 vApp Placement
During vApp deployments, the vCloud Director virtual machine storage placement algorithm works as follows:
1. For fast provisioning-enabled virtual datacenters, identify a datastore containing a base disk. If a base disk for the virtual machine exists, place a virtual machine on that datastore. The following conditions apply if the target datastore is reaching yellow or red disk thresholds.
*If a base disk exists but the target datastore exceeds red threshold, look for a normal or yellow-threshold datastore. If no suitable datastores are available, the operation fails.
*If a base disk exists but the target datastore exceeds yellow threshold, look for a datastore that has not reached its yellow threshold. If none exists, deploy on the target datastore if capacity is sufficient.
2. If no base disk exists, place the virtual machine on the datastore with the most available capacity that does not exceed yellow threshold.
The following figure charts the vApp placement algorithm used by the vCloud Director Placement Engine.
Figure 13. vCloud Director Placement Engine vApp Placement Algorithm
 
vApp creation fails if the vApp contains multiple virtual machines that cannot fit on a single datastore in the target virtual datacenter. Consider the following scenario:
*Virtual datacenter1:
*Datastore1 – 20GB free space.
*Datastore2 – 30GB free space.
*vApp1:
*VM1 – 30GB.
*VM2 – 30GB.
Because the total size required for vApp1 exceeds the maximum available capacity of all datastores, the vApp deployment task fails. To mitigate this risk, follow VMware design guidelines for datastore utilization through proactive monitoring and storage maintenance.
When vCenter 5.1 is used in combination with vCloud Director 5.1, the vCenter 5.1 vSphere Storage DRS datastore placement engine is used in lieu of the vCloud Director placement engine when datastore clusters are available as a deployment target.
Figure 14. vCloud Director Storage Placement