Hi,
it's ease to create a workflow with orchestrator to clone a vm one time.
But I need a workflow to clone a vm multiple times e.g. 20
I think I must build a loop with user choise for the number of vms to build.
And there must be a script to modifiy the new vm name for each loop:
first clone: vm name = vm01
second clone: vm name = vm02
..
Any idea for an example?
(my knowledge in self scripting is not so good)
Have a nice day
Best Regards
Tom
--
Here is an example on creating a workflow loop. It can be adapted to clone VMs and change name on each loop.
http://www.vcoteam.info/learn-vco/creating-workflow-loops.html
Christophe.
thanks, I've seen this tutorial before and I have build a workflow with a simple loop.
The loop is still working, I have build a "dialog" to ask how much clones should be created first. The part "decrease counter", "VMs left" and "Clone VM" is working, but I have problems to build the part with the script that generate the new vm names for each loop. Is there an example specially for this?
Best Regards
Tom
--
Not specifically but this should be as simple as a scriptable box with
index++;
vmname = name + index;
With :
index, a number in the in and out parameters of the scriptable box
vmname, a string in the out parameters of the scriptable box
name, a string in the in parameters of the scriptable box
Christophe.
There are 2 fixes needed:
1 - Set new VM must be before the cloneVM workflow
2- cloneVM name input need to be linked on the vmName (you spelled it vmname) attribute.
Als I am not sure why you set the number of VMs in a user interaction instead of having an input in the main workflow presentation.
Christophe.
Great, it works, thanks!
You see, I'm a orchestrator beginner.
I set the numer of VMs in a userinteraction because this workflow could be one possibility to build a "classroom scenario" in futurehttp://dict.leo.org/ende?lp=ende&p=DOKJAA&search=possibility&trestr=0x8001. One day I need the vm ten times, another day 50 times. The template, datastore and ressource pool would be the same all times, so I could set these parameters fixed in the final workflow. And the workflow must clone the vm including sysprep.
The first major hurdle is passed - Thanks again for your help!
Best Regards
Tom
--
Glad it worked.
If all parameters are defaulted except the number of VMs then you could move your input parameters as workflows attributes and set them once and move the user interaction one as an input parameter.
Christophe.