Self-Service for vSphere



MIQ newbie here. I’m trying MIQ on top of a vSphere environment (one vCenter with one ESXi attached, so far). I have templates and customisation templates ready, and I can provision a VM from the Infrastructure section. During provisioning I can input the vm name, and in the customisation spec dialog I can define IP and computer name.

Then I created a catalog item using a template, configured the infrastructure (like network portgroup, resource pool, folder) and made it available on the service catalog. This however forced me to configure a lot of defaults, and some items I’d like to be configured by the self-service user. For example, allow the user to select an environment name from a dropdown, and from there programmatically assume the folder and resource pool, and also allow to define the computer/host name and DHCP or Static IP (and the IP in that case).

Is this type of customisation possible? Appreciate pointers.




That customization is largely possible. If you look at the VM provisioning state machine you will a state for placement. You can write your own placement logic in a new method and use that for the state.

Regarding standard configuration things like hostname and IP - yes you can do this. A lot of it will work out of the box if you use CatalogItemInitialization as your catalog item entry point. If you review the code there you will see that if you name things in a specific way you can pass options like vm name, cpu count, memory, or even tags right through without additional code. One of the best ways to figure out what the names of these options is to do a lifecycle provision, add some code to print it out in the provisioning flow and then review the logs.