How To Use Django Templates to Dynamically Set VMware VM Folder Path


This article will provide an example of using Django Templates in a VMware Resource Handler’s VM Folder Path to dynamically set the location of provisioned VMs. The path is set on your VMware Resource Handler → Overview Tab → Select Edit Settings → Place your new path at the Virtual Folder Path


If your Django Template in your path could be creating new folders, your account that is connecting CloudBolt and VMware needs to have the proper permissions.


The example below will check for a specific Group, “Group A”, and handle all other Groups the same way. This

{% if == "Group A" %} CloudBoltVMs/groupa/test_folder {% else %} CloudBoltVMs/{{ group }} {% endif %}

You can use the above example as a guide for setting the VM Path to match your specific needs.

Have more questions? Submit a request


Please sign in to leave a comment.