One of the cooler things that you can do with vCloud Director from VMware is create a fenced vApp. This allows someone to deploy a vApp with the exact same configuration multiple times with the VMs containing the same MAC addresses and IP addresses and not cause any conflicts. This is especially helpful in many application-related functions such as training, development, and QA.
In a previous blog post “How to Create a Multi VM vApp,” I explained how to build the vApp that we will be fencing. This will serve as our foundation. The vApp contains a pair of VMs with static IP addresses.
Now, I’ve browsed to the vApp list and selected the one created I created earlier. As you can see in the image below, the vApp contains two VMs, and I’ve highlighted the IP addresses. We will then click on the networking tab of the VM.
After we have configured the vApp for fencing we can adjust the VM startup order if needed. To do this, edit the properties of the vApp show in step three below.
We are now looking at the catalog to which we added the vApp. We can see that our Fenced named vApp is now presented as a catalog item.
Now when a user deploys the new vApp that we created from the catalog they will get an identical copy of the vApp that was configured earlier. It will be deployed in a fenced model that will have our preconfigured static IP addresses. This will allow anyone to run multiple copies of this vApp that will not conflict with each other.
Since we enabled NAT as part of our configuration, each VM within the vApp will receive a NAT’d IP address so it is available outside of the fence. If we did not want this behavior we could have left NAT out of our setup.