første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / uio / lib / vm / clone_vm.workflow.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow xmlns="http://vmware.com/vco/workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://vmware.com/vco/workflow http://vmware.com/vco/workflow/Workflow-v4.xsd" root-name="item8" object-name="Workflow:name=generic" id="e15f70a1-d461-45ab-ad7c-5218bf750fbd" version="1.0.2" api-version="3.1.0" allowed-operations="fve" icon-id="ccc63028-0b79-48ad-bf8d-4078a2d058ce" restartMode="1" resumeFromFailedMode="0">
3     <display-name>clone_vm</display-name>
4
5     <description>
6 Clones a Windows virtual machine, performing guest operating system customization. Configures one network card and a local administrator user account.
7         
8 Sysprep tools must be available on vCenter Server system.
9     </description>
10
11     <position x="40.0" y="30.0"/>
12
13     <input>
14         <param name="folder" type="VC:VmFolder">
15             <description>Virtual machine folder</description>
16         </param>
17         <param name="name" type="string">
18             <description>New virtual machine name</description>
19         </param>
20         <param name="vm" type="VC:VirtualMachine">
21             <description>Virtual machine to clone</description>
22         </param>
23         <param name="datastore" type="VC:Datastore">
24             <description>Datastore in which to store the virtual machine. If not specified, the current datastore is used</description>
25         </param>
26         <param name="host" type="VC:HostSystem">
27             <description>(Optional) Host on which to create the virtual machine</description>
28         </param>
29         <param name="pool" type="VC:ResourcePool">
30             <description>(Optional) Resource pool in which to create the virtual machine</description>
31         </param>
32         <param name="clientName" type="string">
33             <description>Name or prefix name of the Windows client</description>
34         </param>
35         <param name="network" type="VC:DistributedVirtualPortgroup">
36             <description>Network on which to attach the virtual network interface</description>
37         </param>
38         <param name="dnsServerList" type="Array/string">
39             <description>(Optional) List of DNS servers for a virtual network adapter with a static IP address</description>
40         </param>
41         <param name="dnsDomain" type="string">
42             <description>(Optional) DNS domain suffix such as vmware.com</description>
43         </param>
44         <param name="gateway" type="Array/string">
45             <description>(Optional) List of gateways, in order of preference</description>
46         </param>
47         <param name="ipAddress" type="string">
48             <description>Fixed valid IP address</description>
49         </param>
50         <param name="subnetMask" type="string">
51             <description>(Optional) Subnet mask for this virtual network adapter</description>
52         </param>
53         <param name="fullName" type="string">
54             <description>User's full name</description>
55         </param>
56         <param name="orgName" type="string">
57             <description>Organization name</description>
58         </param>
59         <param name="vmpasswd" type="SecureString"/>
60     </input>
61
62     <output>
63         <param name="newVM" type="VC:VirtualMachine">
64             <description>The newly created virtual machine</description>
65         </param>
66     </output>
67
68     <attrib name="task" type="VC:Task" read-only="false">
69         <value encoded="n">__NULL__</value>
70         <description>Task to await</description>
71     </attrib>
72     <attrib name="progress" type="boolean" read-only="false">
73         <value encoded="n">true</value>
74         <description>Log progress while waiting for the task to complete</description>
75     </attrib>
76     <attrib name="pollRate" type="number" read-only="false">
77         <value encoded="n">15.0</value>
78         <description>Polling rate for the task state, in seconds</description>
79     </attrib>
80     <attrib name="spec" type="Any" read-only="false">
81         <value encoded="n">__NULL__</value>
82         <description>Specifies how to clone the virtual machine (VimVirtualMachineCloneSpec)</description>
83     </attrib>
84     <attrib name="location" type="Any" read-only="false">
85         <value encoded="n">__NULL__</value>
86         <description>Specifies the location of resources the cloned virtual machine will be using (VirtualMachineRelocateSpec)</description>
87     </attrib>
88     <attrib name="customization" type="Any" read-only="false">
89         <value encoded="n">__NULL__</value>
90         <description>Optional guest operating system customization specification (CustomizationSpec)</description>
91     </attrib>
92     <attrib name="globalIPSettings" type="Any" read-only="false">
93         <value encoded="n">__NULL__</value>
94         <description>Global IP settings constitute the IP settings that are not specific to a particular virtual network adapter (VimCustomizationGlobalIPSettings)</description>
95     </attrib>
96     <attrib name="identity" type="Any" read-only="false">
97         <value encoded="n">__NULL__</value>
98         <description>Network identity and settings, similar to Microsoft's Sysprep tool. This is a Sysprep, LinuxPrep, or SysprepText object (VimCustomizationIdentitySettings)</description>
99     </attrib>
100     <attrib name="nicSettingMaps" type="Array/Any" read-only="false">
101         <value encoded="n">__NULL__</value>
102         <description>(Optional) IP settings that are specific to a particular virtual network adapter (an array of VimCustomizationAdapterMapping)</description>
103     </attrib>
104     <attrib name="options" type="Any" read-only="false">
105         <value encoded="n">__NULL__</value>
106         <description>Optional operations (VimCustomizationOptions: LinuxOptions or WinOptions)</description>
107     </attrib>
108     <attrib name="autoLogon" type="boolean" read-only="false">
109         <value encoded="n">false</value>
110         <description>Flag to determine whether or not the machine automatically logs on as Administrator</description>
111     </attrib>
112     <attrib name="timeZone" type="number" read-only="false">
113         <value encoded="n">110.0</value>
114         <description>The time zone for the new virtual machine. Numbers correspond to time zones listed in sysprep documentation</description>
115     </attrib>
116     <attrib name="adapterMapping" type="Any" read-only="false">
117         <value encoded="n">__NULL__</value>
118         <description>Data object type to associate a virtual network adapter with its IP settings</description>
119     </attrib>
120     <attrib name="startVm" type="boolean" read-only="false">
121         <value encoded="n">true</value>
122         <description>Specifies whether to start the cloned virtual machine. Depends on the values set for 'template', 'doSysprep' and 'powerOn' attributes</description>
123     </attrib>
124     <attrib name="tempNewVm" type="VC:VirtualMachine" read-only="false">
125         <value encoded="n">__NULL__</value>
126         <description>The newly created virtual machine</description>
127     </attrib>
128     <attrib name="pollingRate" type="number" read-only="false">
129         <value encoded="n">15.0</value>
130         <description>Polling rate for the task state, in seconds</description>
131     </attrib>
132     <attrib name="timeout" type="number" read-only="false">
133         <value encoded="n">60.0</value>
134         <description>Timeout period to elapse before throwing a timeout exception, in minutes</description>
135     </attrib>
136     <attrib name="sourceVirtualEthernetCard" type="Any" read-only="false">
137         <value encoded="n">__NULL__</value>
138         <description>The VirtualEthernetCard the template defines</description>
139     </attrib>
140     <attrib name="virtualEthernetCard" type="Any" read-only="false">
141         <value encoded="n">__NULL__</value>
142         <description>The VirtualEthernetCard instance the virtual machine uses</description>
143     </attrib>
144     <attrib name="config" type="Any" read-only="false">
145         <value encoded="n">__NULL__</value>
146         <description>(Optional) Specification of changes to the virtual hardware (VirtualMachineConfigSpec)</description>
147     </attrib>
148     <attrib name="deviceChange" type="Array/Any" read-only="false">
149         <value encoded="n">__NULL__</value>
150         <description>(Optional) Set of virtual devices being modified by the configuration operation (an array of VirtualDeviceConfigSpec)</description>
151     </attrib>
152     <attrib name="addNumberToName" type="boolean" read-only="true">
153         <value encoded="n">false</value>
154         <description>Append a number to the client name to ensure the name is unique</description>
155     </attrib>
156     <attrib name="nicPosition" type="number" read-only="false">
157         <value encoded="n">1.0</value>
158         <description>Specifies which network card to use. If no valid value, the first network card is used</description>
159     </attrib>
160     <attrib name="targetDatastore" type="VC:Datastore" read-only="false">
161         <value encoded="n">__NULL__</value>
162         <description>Datastore in which to store the virtual machine</description>
163     </attrib>
164     <attrib name="templateAttr" type="boolean" read-only="false">
165         <value encoded="n">false</value>
166         <description>Specifies whether or not to mark the new virtual machine as a template</description>
167     </attrib>
168     <attrib name="powerOn" type="boolean" read-only="false">
169         <value encoded="n">true</value>
170         <description>Specifies whether or not to power on the new virtual machine</description>
171     </attrib>
172     <attrib name="template" type="boolean" read-only="false">
173         <value encoded="n">false</value>
174         <description>Specifies whether or not to mark the new virtual machine as a template</description>
175     </attrib>
176     <attrib name="doSysprep" type="boolean" read-only="false">
177         <value encoded="n">true</value>
178         <description>Run the Sysprep operations and wait for the task to complete. Not used if the virtual machine is marked as template</description>
179     </attrib>
180     <attrib name="joinDomain" type="string" read-only="false">
181         <value encoded="n"/>
182         <description>(Optional) The domain that the virtual machine should join. If this value is supplied, then domainAdmin and domainAdminPassword must also be supplied, and the workgroup name must be empty</description>
183     </attrib>
184     <attrib name="joinWorkgroup" type="string" read-only="false">
185         <value encoded="n">uio.no</value>
186         <description>(Optional) The workgroup that the virtual machine should join. If this value is supplied, then the domain name and authentication fields must be empty</description>
187     </attrib>
188     <attrib name="domainAdmin" type="Credential" read-only="false">
189         <value encoded="n">__NULL__</value>
190         <description>(Optional) This is the domain user account used for authentication if the virtual machine is joining a domain. The user does not need to be a domain administrator, but the account must have the privileges required to add computers to the domain</description>
191     </attrib>
192     <attrib name="licenseMode" type="VC:CustomizationLicenseDataMode" read-only="false">
193         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='perSeat'&amp;dunesName='VC:CustomizationLicenseDataMode'</value>
194         <description>Server licensing mode</description>
195     </attrib>
196     <attrib name="licenseUsers" type="number" read-only="false">
197         <value encoded="n">__NULL__</value>
198         <description>This key is valid only if AutoMode = PerServer</description>
199     </attrib>
200     <attrib name="inTimezone" type="Enums:MSTimeZone" read-only="false">
201         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='110'&amp;dunesName='Enums:MSTimeZone'</value>
202         <description>Timezone for the newly created virtual machine</description>
203     </attrib>
204     <attrib name="dhcp" type="boolean" read-only="false">
205         <value encoded="n">false</value>
206         <description>Use a DHCP server to configure the virtual network adapter</description>
207     </attrib>
208     <attrib name="macAddress" type="string" read-only="false">
209         <value encoded="n"/>
210         <description>(Optional) The MAC address of a network adapter being customized. If it is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order</description>
211     </attrib>
212     <attrib name="netBIOS" type="VC:CustomizationNetBIOSMode" read-only="false">
213         <value encoded="n">__NULL__</value>
214         <description>(Optional) NetBIOS setting for Windows</description>
215     </attrib>
216     <attrib name="primaryWINS" type="string" read-only="false">
217         <value encoded="n"/>
218         <description>(Optional) The IP address of the primary WINS server. This property is ignored for Linux guest operating systems</description>
219     </attrib>
220     <attrib name="secondaryWINS" type="string" read-only="false">
221         <value encoded="n"/>
222         <description>(Optional) The IP address of the secondary WINS server. This property is ignored for Linux guest operating systems</description>
223     </attrib>
224     <attrib name="productId" type="string" read-only="false">
225         <value encoded="n"/>
226         <description>Microsoft Sysprep requires that a valid serial number be included in the answer file when mini-setup runs. This serial number is ignored if the original guest operating system was installed using a volume-licensed CD</description>
227     </attrib>
228     <attrib name="newAdminPassword" type="string" read-only="false">
229         <value encoded="n"/>
230         <description>The password string. It is encrypted if the associated plainText flag is false</description>
231     </attrib>
232     <workflow-note x="1018.0" y="397.99999999999994" w="214.0" h="134.0" color="d7a1d7ff">
233         <description>Clone VM and wait</description>
234     </workflow-note>
235     <workflow-note x="218.0" y="479.81818181818176" w="214.0" h="54.0">
236         <description>Relocate Spec</description>
237     </workflow-note>
238     <workflow-note x="218.0" y="188.90909090909088" w="214.0" h="244.0">
239         <description>Customization Spec</description>
240     </workflow-note>
241     <workflow-note x="738.0" y="479.81818181818176" w="194.0" h="54.0" color="bfdfffff">
242         <description>Compile specs to Clone Spec</description>
243     </workflow-note>
244     <workflow-note x="798.0" y="197.99999999999997" w="244.0" h="54.0" color="bfffbfff">
245         <description>Wait for the sysprep operation to be terminated</description>
246     </workflow-note>
247     <workflow-note x="458.0" y="207.09090909090907" w="244.0" h="324.0">
248         <description>Config Spec</description>
249     </workflow-note>
250
251     <workflow-item name="item0" out-name="item1" business-status="Preparing Clone" type="task" script-module="com.vmware.library.vc.vm.spec/checkVMwareInput">
252         <display-name>checkVMwareInput</display-name>
253
254         <script encoded="false">
255 //Auto generated script, cannot be modified !
256 System.getModule("com.vmware.library.vc.vm.spec").checkVMwareInput(vm,folder,datastore,host,pool) ;
257         </script>
258
259         <in-binding>
260             <bind name="datastore" type="VC:Datastore" export-name="targetDatastore">
261                 <description>Target datastore</description>
262             </bind>
263             <bind name="folder" type="VC:VmFolder" export-name="folder">
264                 <description>Target folder</description>
265             </bind>
266             <bind name="host" type="VC:HostSystem" export-name="host">
267                 <description>Target host</description>
268             </bind>
269             <bind name="pool" type="VC:ResourcePool" export-name="pool">
270                 <description>Target pool</description>
271             </bind>
272             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
273                 <description>VM to clone</description>
274             </bind>
275         </in-binding>
276
277         <out-binding/>
278
279         <position x="284.5" y="82.68181818181817"/>
280     </workflow-item>
281
282     <workflow-item name="item2" out-name="item13" business-status="Cloning" type="task" script-module="com.vmware.library.vc.basic/vim3WaitTaskEnd">
283         <display-name>vim3WaitTaskEnd</display-name>
284
285         <script encoded="false">
286 //Auto generated script, cannot be modified !
287 actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
288         </script>
289
290         <in-binding>
291             <bind name="pollRate" type="number" export-name="pollRate">
292                 <description>Polling rate for the task state [seconds]</description>
293             </bind>
294             <bind name="progress" type="boolean" export-name="progress">
295                 <description>Log progess while waiting for the task</description>
296             </bind>
297             <bind name="task" type="VC:Task" export-name="task">
298                 <description>Task to Wait for</description>
299             </bind>
300         </in-binding>
301
302         <out-binding>
303             <bind name="actionResult" type="VC:VirtualMachine" export-name="tempNewVm"/>
304         </out-binding>
305
306         <description>
307 Wait a VIM 3 Task to end.
308 When task ended, return the
309         </description>
310
311         <position x="1084.5" y="437.2272727272727"/>
312     </workflow-item>
313
314     <workflow-item name="item3" out-name="item2" business-status="Cloning" type="task" script-module="com.vmware.library.vc.vm/cloneVM">
315         <display-name>cloneVM</display-name>
316
317         <script encoded="false">
318 //Auto generated script, cannot be modified !
319 actionResult = System.getModule("com.vmware.library.vc.vm").cloneVM(vm,folder,name,spec) ;
320         </script>
321
322         <in-binding>
323             <bind name="folder" type="VC:VmFolder" export-name="folder">
324                 <description>The location of the new virtual machine.</description>
325             </bind>
326             <bind name="name" type="string" export-name="name">
327                 <description>The name of the new virtual machine.</description>
328             </bind>
329             <bind name="spec" type="Any" export-name="spec">
330                 <description>VimVirtualMachineCloneSpec: Specifies how to clone the virtual machine.</description>
331             </bind>
332             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
333                 <description>VM to clone</description>
334             </bind>
335         </in-binding>
336
337         <out-binding>
338             <bind name="actionResult" type="VC:Task" export-name="task"/>
339         </out-binding>
340
341         <position x="1084.5" y="500.8636363636363"/>
342     </workflow-item>
343
344     <workflow-item name="item4" out-name="item3" type="task" script-module="com.vmware.library.vc.vm.spec/getCloneSpec">
345         <display-name>getCloneSpec</display-name>
346
347         <script encoded="false">
348 //Auto generated script, cannot be modified !
349 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCloneSpec(config,customization,location,powerOn,template) ;
350         </script>
351
352         <in-binding>
353             <bind name="config" type="Any" export-name="config">
354                 <description>[optional] VirtualMachineConfigSpec: An optional specification of changes to the virtual hardware.</description>
355             </bind>
356             <bind name="customization" type="Any" export-name="customization">
357                 <description>[optional] CustomizationSpec: An optional guest operating system customization specification.</description>
358             </bind>
359             <bind name="location" type="Any" export-name="location">
360                 <description>VirtualMachineRelocateSpec: A type of RelocateSpec that specifies the location of resources the newly cloned virtual machine will use</description>
361             </bind>
362             <bind name="powerOn" type="boolean" export-name="startVm">
363                 <description>Specifies whether or not the new VirtualMachine should be powered on after creation</description>
364             </bind>
365             <bind name="template" type="boolean" export-name="templateAttr">
366                 <description>Specifies whether or not the new virtual machine should be marked as a template.</description>
367             </bind>
368         </in-binding>
369
370         <out-binding>
371             <bind name="actionResult" type="Any" export-name="spec"/>
372         </out-binding>
373
374         <position x="784.5" y="500.8636363636363"/>
375     </workflow-item>
376
377     <workflow-item name="item5" out-name="item9" type="link" linked-workflow-id="BD808080808080808080808080808080FEC180800122528313869552e41805bb1">
378         <display-name>Get Windows Customization (Sysprep)</display-name>
379
380         <in-binding>
381             <bind name="autoLogon" type="boolean" export-name="autoLogon">
382                 <description>Flag to determine whether or not the machine automatically logs on as Administrator</description>
383             </bind>
384             <bind name="autoLogonCount" type="number" explicitly-not-bound="true">
385                 <description>If the AutoLogon flag is set, then the AutoLogonCount property specifies the number of times the machine should automatically log on as Administrator</description>
386             </bind>
387             <bind name="commandList" type="Array/string" explicitly-not-bound="true">
388                 <description>A list of commands to run at first user logon, after guest customization.</description>
389             </bind>
390             <bind name="domainAdmin" type="Credential" export-name="domainAdmin">
391                 <description>[Optional] This is the domain user account used for authentication if the virtual machine is joining a domain. The user does not need to be a domain administrator, but the account must have the privileges required to add computers to the domain.</description>
392             </bind>
393             <bind name="fullName" type="string" export-name="fullName">
394                 <description>User's full name.</description>
395             </bind>
396             <bind name="joinDomain" type="string" export-name="joinDomain">
397                 <description>[Optional] The domain that the virtual machine should join. If this value is supplied, then domainAdmin and domainAdminPassword must also be supplied, and the workgroup name must be empty.</description>
398             </bind>
399             <bind name="joinWorkgroup" type="string" export-name="joinWorkgroup">
400                 <description>[Optional] The workgroup that the virtual machine should join. If this value is supplied, then the domain name and authentication fields must be empty.</description>
401             </bind>
402             <bind name="licenseMode" type="VC:CustomizationLicenseDataMode" export-name="licenseMode">
403                 <description>Server licensing mode</description>
404             </bind>
405             <bind name="licenseUsers" type="number" export-name="licenseUsers">
406                 <description>This key is valid only if AutoMode = PerServer.</description>
407             </bind>
408             <bind name="newAdminPassword" type="string" export-name="newAdminPassword">
409                 <description>The password string. It is encrypted if the associated plainText flag is false.</description>
410             </bind>
411             <bind name="orgName" type="string" export-name="orgName">
412                 <description>User's organization.</description>
413             </bind>
414             <bind name="productId" type="string" export-name="productId">
415                 <description>Microsoft Sysprep requires that a valid serial number be included in the answer file when mini-setup runs. This serial number is ignored if the original guest operating system was installed using a volume-licensed CD.</description>
416             </bind>
417             <bind name="timeZone" type="number" export-name="timeZone">
418                 <description>The time zone for the new virtual machine. Numbers correspond to time zones listed in sysprep documentation</description>
419             </bind>
420             <bind name="clientName" type="string" export-name="clientName"/>
421             <bind name="addNumberToName" type="boolean" export-name="addNumberToName"/>
422         </in-binding>
423
424         <out-binding>
425             <bind name="sysprep" type="Any" export-name="identity">
426                 <description>An object representation of a Windows sysprep.inf answer file.</description>
427             </bind>
428         </out-binding>
429
430         <position x="284.5" y="255.40909090909088"/>
431     </workflow-item>
432
433     <workflow-item name="item6" out-name="item23" type="task" script-module="com.vmware.library.vc.vm.spec/getRelocateSpec">
434         <display-name>getRelocateSpec</display-name>
435
436         <script encoded="false">
437 //Auto generated script, cannot be modified !
438 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getRelocateSpec(datastore,disk,host,pool,transform) ;
439         </script>
440
441         <in-binding>
442             <bind name="datastore" type="VC:Datastore" export-name="targetDatastore">
443                 <description>[optional] The datastore where the virtual machine should be located. If not specified, the current datastore is used</description>
444             </bind>
445             <bind name="disk" type="Array/Any" explicitly-not-bound="true">
446                 <description>[optional] Array of VirtualMachineRelocateSpecDiskLocator: An optional list that allows specifying the datastore location for each virtual disk.</description>
447             </bind>
448             <bind name="host" type="VC:HostSystem" export-name="host">
449                 <description>[optional] The target host for the virtual machine.</description>
450             </bind>
451             <bind name="pool" type="VC:ResourcePool" export-name="pool">
452                 <description>[optional] The resource pool to which this virtual machine should be attached.</description>
453             </bind>
454             <bind name="transform" type="VC:VirtualMachineRelocateTransformation" explicitly-not-bound="true">
455                 <description>[optional] Transformation to perform on the disks.</description>
456             </bind>
457         </in-binding>
458
459         <out-binding>
460             <bind name="actionResult" type="Any" export-name="location"/>
461         </out-binding>
462
463         <position x="284.5" y="500.8636363636363"/>
464     </workflow-item>
465
466     <workflow-item name="item7" out-name="item6" type="task" script-module="com.vmware.library.vc.vm.spec/getCustomizationSpec">
467         <display-name>getCustomizationSpec</display-name>
468
469         <script encoded="false">
470 //Auto generated script, cannot be modified !
471 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCustomizationSpec(globalIPSettings,identity,nicSettingMap,options) ;
472         </script>
473
474         <in-binding>
475             <bind name="globalIPSettings" type="Any" export-name="globalIPSettings">
476                 <description>VimCustomizationGlobalIPSettings: Global IP settings constitute the IP settings that are not specific to a particular virtual network adapter.</description>
477             </bind>
478             <bind name="identity" type="Any" export-name="identity">
479                 <description>VimCustomizationIdentitySettings: Network identity and settings, similar to Microsoft's Sysprep tool. This is a Sysprep, LinuxPrep, or SysprepText object.</description>
480             </bind>
481             <bind name="nicSettingMap" type="Array/Any" export-name="nicSettingMaps">
482                 <description>[Optional] Array of VimCustomizationAdapterMapping: IP settings that are specific to a particular virtual network adapter.</description>
483             </bind>
484             <bind name="options" type="Any" export-name="options">
485                 <description>[Optional] VimCustomizationOptions: Optional operations (either LinuxOptions or WinOptions).</description>
486             </bind>
487         </in-binding>
488
489         <out-binding>
490             <bind name="actionResult" type="Any" export-name="customization"/>
491         </out-binding>
492
493         <position x="284.5" y="400.8636363636363"/>
494     </workflow-item>
495
496     <workflow-item name="item9" out-name="item10" type="link" linked-workflow-id="BD80808080808080808080808080808094C280800122528313869552e41805bb1">
497         <display-name>Get 1 Nic Setting Map</display-name>
498
499         <in-binding>
500             <bind name="dhcp" type="boolean" export-name="dhcp">
501                 <description>Use a DHCP server to configure the virtual network adapter.</description>
502             </bind>
503             <bind name="dnsDomain" type="string" export-name="dnsDomain">
504                 <description>[Optional] A DNS domain suffix such as dunes.ch.</description>
505             </bind>
506             <bind name="dnsServerList" type="Array/string" export-name="dnsServerList">
507                 <description>[Optional] A list of server IP addresses to use for DNS lookup in a Windows guest operating system.</description>
508             </bind>
509             <bind name="gateway" type="Array/string" export-name="gateway">
510                 <description>[Optional] List of gateways, in order of preference.</description>
511             </bind>
512             <bind name="ipAddress" type="string" export-name="ipAddress">
513                 <description>A Fixed valid IP Address</description>
514             </bind>
515             <bind name="macAddress" type="string" export-name="macAddress">
516                 <description>[Optional] The MAC address of a network adapter being customized. If it is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order.</description>
517             </bind>
518             <bind name="netBIOS" type="VC:CustomizationNetBIOSMode" export-name="netBIOS">
519                 <description>[Optional] NetBIOS setting for Windows.</description>
520             </bind>
521             <bind name="primaryWINS" type="string" export-name="primaryWINS">
522                 <description>[Optional] The IP address of the primary WINS server. This property is ignored for Linux guest operating systems.</description>
523             </bind>
524             <bind name="secondaryWINS" type="string" export-name="secondaryWINS">
525                 <description>[Optional] The IP address of the secondary WINS server. This property is ignored for Linux guest operating systems.</description>
526             </bind>
527             <bind name="subnetMask" type="string" export-name="subnetMask">
528                 <description>[Optional] Subnet mask for this virtual network adapter.</description>
529             </bind>
530         </in-binding>
531
532         <out-binding>
533             <bind name="adapterMapping" type="Any" export-name="adapterMapping">
534                 <description>Data object type to associate a virtual network adapter with its IP settings.</description>
535             </bind>
536         </out-binding>
537
538         <position x="284.5" y="319.0454545454545"/>
539     </workflow-item>
540
541     <workflow-item name="item10" out-name="item7" type="task">
542         <display-name>Nic -&gt; Nic[]</display-name>
543
544         <script encoded="false">
545 nicSettingMaps = new Array(adapterMapping);
546         </script>
547
548         <in-binding>
549             <bind name="adapterMapping" type="Any" export-name="adapterMapping"/>
550         </in-binding>
551
552         <out-binding>
553             <bind name="nicSettingMaps" type="Array/Any" export-name="nicSettingMaps"/>
554         </out-binding>
555
556         <position x="284.5" y="355.4090909090909"/>
557     </workflow-item>
558
559     <workflow-item name="item11" out-name="item29" type="task">
560         <display-name>Get Timezone in Number</display-name>
561
562         <script encoded="false">
563 timeZone = inTimezone.id;
564         </script>
565
566         <in-binding>
567             <bind name="inTimezone" type="Enums:MSTimeZone" export-name="inTimezone"/>
568         </in-binding>
569
570         <out-binding>
571             <bind name="timeZone" type="number" export-name="timeZone"/>
572         </out-binding>
573
574         <position x="284.5" y="155.4090909090909"/>
575     </workflow-item>
576
577     <workflow-item name="item1" out-name="item11" type="task">
578         <display-name>Set start vm?</display-name>
579
580         <script encoded="false">
581 if (template) {
582         startVm = false;
583 }
584 else if (doSysprep) {
585         startVm = true;
586 }
587 else {
588         startVm = powerOn;
589 }
590         </script>
591
592         <in-binding>
593             <bind name="template" type="boolean" export-name="template"/>
594             <bind name="powerOn" type="boolean" export-name="powerOn"/>
595             <bind name="doSysprep" type="boolean" export-name="doSysprep"/>
596         </in-binding>
597
598         <out-binding>
599             <bind name="startVm" type="boolean" export-name="startVm"/>
600         </out-binding>
601
602         <position x="284.5" y="119.04545454545453"/>
603     </workflow-item>
604
605     <workflow-item name="item12" out-name="item31" type="condition" alt-out-name="item15" comparator="0">
606         <display-name>Template?</display-name>
607
608         <script encoded="false">
609 //Generated by the system, cannot be edited
610 return (template == true) ;
611         </script>
612
613         <in-binding>
614             <bind name="template" type="boolean" export-name="template"/>
615         </in-binding>
616         <condition name="template" type="boolean" comparator="0" label="null">false</condition>
617
618         <position x="1084.5" y="290.8636363636363"/>
619     </workflow-item>
620
621     <workflow-item name="item13" out-name="item12" business-status="Waiting on customization" type="task">
622         <display-name>Set ouput vm</display-name>
623
624         <script encoded="false">
625 newVM = tempNewVm;
626         </script>
627
628         <in-binding>
629             <bind name="tempNewVm" type="VC:VirtualMachine" export-name="tempNewVm"/>
630         </in-binding>
631
632         <out-binding>
633             <bind name="newVM" type="VC:VirtualMachine" export-name="newVM"/>
634         </out-binding>
635
636         <position x="1084.5" y="355.4090909090909"/>
637     </workflow-item>
638
639     <workflow-item name="item14" type="end" end-mode="0">
640         <position x="1364.5" y="290.8636363636363"/>
641     </workflow-item>
642
643     <workflow-item name="item15" out-name="item17" type="condition" alt-out-name="item16" comparator="0">
644         <display-name>Do sysprep?</display-name>
645
646         <script encoded="false">
647 //Generated by the system, cannot be edited
648 return (doSysprep == true) ;
649         </script>
650
651         <in-binding>
652             <bind name="doSysprep" type="boolean" export-name="doSysprep"/>
653         </in-binding>
654         <condition name="doSysprep" type="boolean" comparator="0" label="null">false</condition>
655
656         <position x="1084.5" y="209.04545454545453"/>
657     </workflow-item>
658
659     <workflow-item name="item16" type="end" end-mode="0">
660         <position x="1264.5" y="209.04545454545453"/>
661     </workflow-item>
662
663     <workflow-item name="item18" out-name="item19" type="condition" alt-out-name="item20" comparator="0">
664         <display-name>Power on?</display-name>
665
666         <script encoded="false">
667 //Generated by the system, cannot be edited
668 return (powerOn == true) ;
669         </script>
670
671         <in-binding>
672             <bind name="powerOn" type="boolean" export-name="powerOn"/>
673         </in-binding>
674         <condition name="powerOn" type="boolean" comparator="0" label="null">false</condition>
675
676         <position x="904.5" y="145.4090909090909"/>
677     </workflow-item>
678
679     <workflow-item name="item19" type="end" end-mode="0">
680         <position x="1104.5" y="145.4090909090909"/>
681     </workflow-item>
682
683     <workflow-item name="item21" type="end" end-mode="0">
684         <position x="1104.5" y="72.68181818181817"/>
685     </workflow-item>
686
687     <workflow-item name="item22" out-name="item25" type="link" linked-workflow-id="BD8080808080808080808080808080808AC280800122528313869552e41805bb1">
688         <display-name>Get a VirtualEthernetCard to change the network</display-name>
689
690         <in-binding>
691             <bind name="sourceVirtualEthernetCard" type="Any" export-name="sourceVirtualEthernetCard"/>
692             <bind name="network" type="VC:DistributedVirtualPortgroup" export-name="network"/>
693         </in-binding>
694
695         <out-binding>
696             <bind name="virtualEthernetCard" type="Any" export-name="virtualEthernetCard"/>
697         </out-binding>
698
699         <position x="484.5" y="400.8636363636363"/>
700     </workflow-item>
701
702     <workflow-item name="item24" out-name="item28" type="condition" alt-out-name="item4" comparator="0">
703         <display-name>Nic found?</display-name>
704
705         <script encoded="false">
706 //Generated by the system, cannot be edited
707 return (sourceVirtualEthernetCard  != null ) ;
708         </script>
709
710         <in-binding>
711             <bind name="sourceVirtualEthernetCard" type="Any" export-name="sourceVirtualEthernetCard"/>
712         </in-binding>
713         <condition name="sourceVirtualEthernetCard" type="Any" comparator="0" label="null">Any#__NULL__</condition>
714
715         <position x="484.5" y="290.8636363636363"/>
716     </workflow-item>
717
718     <workflow-item name="item25" out-name="item26" type="task">
719         <display-name>Get Device[]</display-name>
720
721         <script encoded="false">
722 var deviceChange = new Array();
723 var change = new VcVirtualDeviceConfigSpec();
724 change.device = virtualEthernetCard;
725 change.operation = VcVirtualDeviceConfigSpecOperation.edit;
726 deviceChange.push(change);
727         </script>
728
729         <in-binding>
730             <bind name="virtualEthernetCard" type="Any" export-name="virtualEthernetCard"/>
731         </in-binding>
732
733         <out-binding>
734             <bind name="deviceChange" type="Array/Any" export-name="deviceChange"/>
735         </out-binding>
736
737         <position x="484.5" y="437.2272727272727"/>
738     </workflow-item>
739
740     <workflow-item name="item26" out-name="item4" type="task" script-module="com.vmware.library.vc.vm.spec/getConfigSpecSimple">
741         <display-name>getConfigSpecSimple</display-name>
742
743         <script encoded="false">
744 //Auto generated script, cannot be modified !
745 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getConfigSpecSimple(deviceChange,files,flags,memoryMB,name,numCPUs) ;
746         </script>
747
748         <in-binding>
749             <bind name="deviceChange" type="Array/Any" export-name="deviceChange">
750                 <description>[optional] Array of VirtualDeviceConfigSpec: Set of virtual devices being modified by the configuration operation.</description>
751             </bind>
752             <bind name="files" type="Any" explicitly-not-bound="true" export-name="NULL">
753                 <description>[optional] VirtualMachineFileInfo: Information about virtual machine files</description>
754             </bind>
755             <bind name="flags" type="Any" explicitly-not-bound="true" export-name="NULL">
756                 <description>[optional] VirtualMachineFlagInfo: Additional flags for a virtual machine.</description>
757             </bind>
758             <bind name="memoryMB" type="number" explicitly-not-bound="true" export-name="NULL">
759                 <description>[optional] Size of a virtual machine's memory, in MB.</description>
760             </bind>
761             <bind name="name" type="string" explicitly-not-bound="true" export-name="NULL">
762                 <description>[optional] Display name of the virtual machine.</description>
763             </bind>
764             <bind name="numCPUs" type="number" explicitly-not-bound="true" export-name="NULL">
765                 <description>[optional] Number of virtual processors in a virtual machine.</description>
766             </bind>
767         </in-binding>
768
769         <out-binding>
770             <bind name="actionResult" type="Any" export-name="config"/>
771         </out-binding>
772
773         <description>
774 The ConfigSpec data object type encapsulates configuration settings when creating or reconfiguring a virtual machine. To support incremental changes, these properties are all optional. 
775 Basic Version
776         </description>
777
778         <position x="484.5" y="500.8636363636363"/>
779     </workflow-item>
780
781     <workflow-item name="item17" out-name="item18" business-status="Customizing" type="task" script-module="com.vmware.library.vc.vm.tools/vim3WaitDnsNameInTools">
782         <display-name>vim3WaitDnsNameInTools</display-name>
783
784         <script encoded="false">
785 //Auto generated script, cannot be modified !
786 System.getModule("com.vmware.library.vc.vm.tools").vim3WaitDnsNameInTools(vm,pollingRate,dnsNameToWait,timeout,addNumberToName) ;
787         </script>
788
789         <in-binding>
790             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm">
791                 <description>VM in which the action look to get the new DNS Name</description>
792             </bind>
793             <bind name="pollingRate" type="number" export-name="pollingRate">
794                 <description>Time between all request information on the tools [seconds]</description>
795             </bind>
796             <bind name="dnsNameToWait" type="string" export-name="clientName">
797                 <description>Define a specific DNS name to wait for (either in compute.dunes.ch or compute form)</description>
798             </bind>
799             <bind name="timeout" type="number" export-name="timeout">
800                 <description>Timeout before throwing a timeout exception [minutes]</description>
801             </bind>
802             <bind name="addNumberToName" type="boolean" export-name="addNumberToName">
803                 <description>Specify if the DNS name has an automatically number added at end (not known at clone time)</description>
804             </bind>
805         </in-binding>
806
807         <out-binding/>
808
809         <description>
810 Wait for a given name in the DNS guest informations (VMware tools).
811
812 Exception:
813 - Timeout: When timeout is reached
814         </description>
815
816         <position x="904.5" y="219.04545454545453"/>
817     </workflow-item>
818
819     <workflow-item name="item23" out-name="item24" type="task" script-module="com.vmware.library.vc.vm.network/getNicByNumber">
820         <display-name>getNicByNumber</display-name>
821
822         <script encoded="false">
823 //Auto generated script, cannot be modified !
824 actionResult = System.getModule("com.vmware.library.vc.vm.network").getNicByNumber(vm,nicPosition) ;
825         </script>
826
827         <in-binding>
828             <bind name="vm" type="VC:VirtualMachine" export-name="vm">
829                 <description>VM from which to get the network card</description>
830             </bind>
831             <bind name="nicPosition" type="number" export-name="nicPosition">
832                 <description>Let you choose if you want to get the 1st, 2nd... 5th network card. If no valid value, 1st if used.</description>
833             </bind>
834         </in-binding>
835
836         <out-binding>
837             <bind name="actionResult" type="Any" export-name="sourceVirtualEthernetCard"/>
838         </out-binding>
839
840         <description>Return a Network card device (VimVirtualE1000, VimVirtualVmxnet, VimVirtualPCNet32). The network position let you choose if you want to get the 1st, 2nd... 5th network card.</description>
841
842         <position x="484.5" y="237.22727272727272"/>
843     </workflow-item>
844
845     <workflow-item name="item20" out-name="item21" type="link" linked-workflow-id="BD80808080808080808080808080808075C280800122528313869552e41805bb1">
846         <display-name>Shutdown guest OS and wait</display-name>
847
848         <in-binding>
849             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm"/>
850         </in-binding>
851
852         <out-binding/>
853
854         <description>Shutdown guest OS and wait.</description>
855
856         <position x="904.5" y="82.68181818181817"/>
857     </workflow-item>
858
859     <workflow-item name="item28" out-name="item22" type="condition" alt-out-name="item4" comparator="0">
860         <display-name>Network defined</display-name>
861
862         <script encoded="false">
863 //Generated by the system, cannot be edited
864 return (network  != null ) ;
865         </script>
866
867         <in-binding>
868             <bind name="network" type="VC:Network" export-name="network"/>
869         </in-binding>
870         <condition name="network" type="VC:Network" comparator="0" label="null"/>
871
872         <position x="484.5" y="345.4090909090909"/>
873     </workflow-item>
874
875     <workflow-item name="item29" out-name="item5" type="task" script-module="com.vmware.library.vc.vm.spec/getCustomizationGlobalIPSettingsWithDomainAsString">
876         <display-name>getCustomizationGlobalIPSettingsWithDomainAsString</display-name>
877
878         <script encoded="false">
879 //Auto generated script, cannot be modified !
880 actionResult = System.getModule("com.vmware.library.vc.vm.spec").getCustomizationGlobalIPSettingsWithDomainAsString(dnsServerList,dnsDomain) ;
881         </script>
882
883         <in-binding>
884             <bind name="dnsServerList" type="Array/string" export-name="dnsServerList">
885                 <description>[Optional] List of DNS servers, for a virtual network adapter with a static IP address</description>
886             </bind>
887             <bind name="dnsDomain" type="string" export-name="dnsDomain">
888                 <description>[Optional] List of name resolution suffixes for the virtual network adapter</description>
889             </bind>
890         </in-binding>
891
892         <out-binding>
893             <bind name="actionResult" type="Any" export-name="globalIPSettings"/>
894         </out-binding>
895
896         <description>A collection of global IP settings for a virtual network adapter. In Linux, DNS server settings are global. The settings can either be statically set or supplied by a DHCP server.</description>
897
898         <position x="284.5" y="219.04545454545453"/>
899     </workflow-item>
900
901     <workflow-item name="item30" out-name="item0" type="task">
902         <display-name>Set datastore if null</display-name>
903
904         <script encoded="false">
905 if (datastore != null) {
906         targetDatastore = datastore;
907 }
908 else {
909         targetDatastore = vm.datastore[0];
910 }
911         </script>
912
913         <in-binding>
914             <bind name="vm" type="VC:VirtualMachine" export-name="vm"/>
915             <bind name="datastore" type="VC:Datastore" export-name="datastore"/>
916         </in-binding>
917
918         <out-binding>
919             <bind name="targetDatastore" type="VC:Datastore" export-name="targetDatastore"/>
920         </out-binding>
921
922         <position x="284.5" y="37.22727272727273"/>
923     </workflow-item>
924
925     <workflow-item name="item31" out-name="item14" type="link" linked-workflow-id="BD80808080808080808080808080808093C380800122528313869552e41805bb1">
926         <display-name>Mark as Template</display-name>
927
928         <in-binding>
929             <bind name="vm" type="VC:VirtualMachine" export-name="tempNewVm">
930                 <description>The VM to mark as template</description>
931             </bind>
932         </in-binding>
933
934         <out-binding/>
935
936         <description>Mark an existing VM as a template, preventing it to start</description>
937
938         <position x="1224.5" y="300.8636363636363"/>
939     </workflow-item>
940
941     <workflow-item name="item8" out-name="item30" type="task">
942         <display-name>Convert password</display-name>
943
944         <script encoded="false">
945 newAdminPassword=vmpasswd;
946         </script>
947
948         <in-binding>
949             <bind name="vmpasswd" type="SecureString" export-name="vmpasswd"/>
950         </in-binding>
951
952         <out-binding>
953             <bind name="newAdminPassword" type="string" export-name="newAdminPassword">
954                 <description>The password string. It is encrypted if the associated plainText flag is false</description>
955             </bind>
956         </out-binding>
957
958         <position x="144.5" y="37.22727272727273"/>
959     </workflow-item>
960
961     <presentation>
962         <p-step>
963             <title>VMware Information</title>
964             <p-group>
965                 <title>Basic VM Information</title>
966                 <p-param name="vm">
967                     <desc>Virtual machine to clone</desc>
968                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
969                     <p-qual kind="static" name="show-select-as" type="string">live-search</p-qual>
970                 </p-param>
971                 <p-param name="name">
972                     <desc>Name of the new virtual machine</desc>
973                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
974                 </p-param>
975             </p-group>
976             <p-group>
977                 <title>Running informations</title>
978                 <p-qual kind="ognl" name="notVisible" type="boolean">#template</p-qual>
979                 <p-param name="pool">
980                     <desc>Resource pool</desc>
981                     <p-qual kind="static" name="show-select-as" type="string">tree</p-qual>
982                     <p-qual kind="ognl" name="sdkRootObject" type="any">GetAction("com.vmware.library.vc.basic","getVimHostForVimObject").call( #vm )</p-qual>
983                 </p-param>
984                 <p-param name="host">
985                     <desc>Host</desc>
986                     <p-qual kind="static" name="show-select-as" type="string">live-search</p-qual>
987                     <p-qual kind="ognl" name="linkedEnumeration" type="Array/VC:HostSystem">GetAction("com.vmware.library.vc.datastore","getAllAvaiblableHostForVM").call( #vm )</p-qual>
988                 </p-param>
989             </p-group>
990             <p-group>
991                 <title>Location informations</title>
992                 <p-param name="folder">
993                     <desc>Virtual machine folder</desc>
994                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
995                     <p-qual kind="static" name="show-select-as" type="string">tree</p-qual>
996                     <p-qual kind="ognl" name="sdkRootObject" type="any">GetAction("com.vmware.library.vc.basic","getVimHostForVimObject").call( #vm )</p-qual>
997                 </p-param>
998                 <p-param name="datastore">
999                     <desc>Datastore in which to store the virtual machine. If not specified, the current datastore is used</desc>
1000                     <p-qual kind="static" name="mandatory" type="boolean">false</p-qual>
1001                     <p-qual kind="static" name="show-select-as" type="string">list</p-qual>
1002                     <p-qual kind="ognl" name="linkedEnumeration" type="Array/VC:Datastore">GetAction("com.vmware.library.vc.datastore","getDatastoreForHostAndResourcePool").call( #host , #pool, #vm )</p-qual>
1003                 </p-param>
1004             </p-group>
1005         </p-step>
1006         <p-step>
1007             <title>Microsoft Customization Information</title>
1008             <p-group>
1009                 <title>User information</title>
1010                 <p-param name="fullName">
1011                     <desc>User's full name</desc>
1012                 </p-param>
1013                 <p-param name="orgName">
1014                     <desc>Organization name</desc>
1015                 </p-param>
1016             </p-group>
1017             <p-group>
1018                 <title>Basic information</title>
1019                 <desc>Sysprep information is put in the virtual hard disk, even if you choose to not execute sysprep operations. Activating this options will only change the this workflow is responsible of the sysprep operations.</desc>
1020                 <p-param name="clientName">
1021                     <desc>Name or prefix name of the Windows client</desc>
1022                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
1023                 </p-param>
1024             </p-group>
1025             <p-group>
1026                 <title>License information</title>
1027             </p-group>
1028             <p-group>
1029                 <title>Domain or Workgroup</title>
1030                 <desc>Only Domain OR Workgroup name can be set at same time. If none is defined, the Workgroup is set to "WORKGROUP".</desc>
1031             </p-group>
1032             <p-group>
1033                 <title>Domain Login information</title>
1034                 <p-qual kind="ognl" name="visible" type="boolean">#joinDomain != null</p-qual>
1035             </p-group>
1036         </p-step>
1037         <p-step>
1038             <title>Network information</title>
1039             <p-group>
1040                 <title>Network interface</title>
1041                 <desc>If the mac address is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order.</desc>
1042                 <p-param name="network">
1043                     <desc>Network on which to attach the virtual network interface</desc>
1044                 </p-param>
1045             </p-group>
1046             <p-group>
1047                 <title>Use DHCP</title>
1048             </p-group>
1049             <p-group>
1050                 <title>Fixed IP</title>
1051                 <p-qual kind="ognl" name="notVisible" type="boolean">#dhcp</p-qual>
1052                 <p-param name="ipAddress">
1053                     <desc>Fixed valid IP address</desc>
1054                     <p-qual kind="static" name="regexp" type="Regexp">\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b</p-qual>
1055                 </p-param>
1056                 <p-param name="subnetMask">
1057                     <desc>Subnet mask for this virtual network adapter</desc>
1058                     <p-qual kind="static" name="regexp" type="Regexp">\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b</p-qual>
1059                 </p-param>
1060                 <p-param name="gateway">
1061                     <desc>List of gateways, in order of preference</desc>
1062                 </p-param>
1063             </p-group>
1064             <p-group>
1065                 <title>Information Settable with or without DHCP</title>
1066                 <p-param name="dnsDomain">
1067                     <desc>DNS domain suffix such as vmware.com</desc>
1068                 </p-param>
1069                 <p-param name="dnsServerList">
1070                     <desc>List of DNS servers for a virtual network adapter with a static IP address</desc>
1071                 </p-param>
1072             </p-group>
1073         </p-step>
1074         <p-param name="vmpasswd">
1075             <desc>vmpasswd</desc>
1076         </p-param>
1077     </presentation>
1078 </workflow>