Hi all,
I created a workflow to deploy a virtual machine for one of my customer. The workflow deploy a VM from a template, connect the nic to a DVportgroup, run sysprep if needed, add disk if needed, change ram if needed, change CPU if needed and install a bunch of software for the VM to be compliant in the customer environment.
During the deployment, if the user want to add a disk to his VMs, he needs to answer a simple question and enter the size of his disk. The format (thick or thin) is automatically selected as per as their standard.
My workflow is running and work well but they want to add an option for a number of disk. Let's say a user want to add three disks! I add this fields : How many disks you want to add? And put the answer in a Number variable. I added a counter after the add disk workflow as you can see in the picture below.
When the counter reach the number of disk the user wants, it will go to the next steps.
This work but always create the disk with the same variable of size, so all disk have the same size! That's not very handy!
I want to know what is the best way to have a size variable for each drive to be created? The number will never be the same. Let's say i want to add 3 disks, one of 250Gb, 300Gb and 350Gb. I want to let my user enter 3 sizes variable.
I guess i will have to ask my user to enter the different size separated by a ; or , and in the code read those numbers. This will be stored in one variable. But, is there other way?
Thanks for taking time to read and helping!