5. vCloud vApp Provisioning
   
5. vCloud vApp Provisioning
The Custom Deploy vApp workflow is an example of a custom workflow built from library items and additional scripting. It provides a single call workflow that is capable of instantiating a vApp template from vCloud Director and performing a number of operations on the resulting vApp before actually deploying and powering it on.
These operations include:
1. Check organization for vApp name to see if it already exists in any virtual datacenters. If so, append number until unique.
2. Instantiate, but do not deploy or power on immediately.
3. Add an organization virtual datacenter network, if needed.
4. Apply a custom naming convention to each virtual machine in the vApp.
5. Base the virtual machine name on vApp name.
6. Customize the guest OS customization script.
7. Specify an IP address for virtual machine.
8. Create a computer account in a specific organization unit (OU) of Active Directory.
9. Add a specified domain\user to the local administrators group.
10. Connect the virtual machine to network.
11. Change the system hard disk size.
12. Add an extra disk to virtual machine.
13. Modify the virtual machine CPU count.
14. Modify the virtual machine memory.
15. Deploy vApp.
The Custom Deploy vApp workflow is illustrated in the following figure.
Figure 25. Workflow Schema: Custom Deploy vApp