første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / uio / lib / vm / create_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="item7" object-name="Workflow:name=generic" id="b967157c-21a9-478d-8260-f9fa86ac3687" version="1.0.23" api-version="3.1.0" allowed-operations="fve" icon-id="ccc63028-0b79-48ad-bf8d-4078a2d058ce" restartMode="1" resumeFromFailedMode="0">
3     <display-name>create_vm</display-name>
4
5     <description>Creates a simple virtual machine. The network used is a Distributed Virtual Port Group.</description>
6
7     <position x="185.0" y="118.13636363636363"/>
8
9     <input>
10         <param name="vmName" type="string">
11             <description>Virtual machine name</description>
12         </param>
13         <param name="vmGuestOs" type="string">
14             <description>Guest operating system to use with the virtual machine</description>
15         </param>
16         <param name="vmFolder" type="VC:VmFolder">
17             <description>Virtual machine folder</description>
18         </param>
19         <param name="vmResourcePool" type="VC:ResourcePool">
20             <description>Resource pool in which to create the virtual machine</description>
21         </param>
22         <param name="vmHost" type="VC:HostSystem">
23             <description>Host on which to create the virtual machine</description>
24         </param>
25         <param name="vmDiskSize" type="number">
26             <description>Size of virtual disk in GB</description>
27         </param>
28         <param name="vmMemorySize" type="number">
29             <description>Virtual machine's memory size in MB</description>
30         </param>
31         <param name="vmNbOfCpus" type="number">
32             <description>Number of virtual processors</description>
33         </param>
34         <param name="vmNetwork" type="VC:DistributedVirtualPortgroup">
35             <description>The network to connect to</description>
36         </param>
37         <param name="kort_beskrivelse" type="string">
38             <description>Kort beskrivelse av ny VM</description>
39         </param>
40         <param name="epostliste" type="string">
41             <description>Mail alias for ny VM</description>
42         </param>
43     </input>
44
45     <output>
46         <param name="vm" type="VC:VirtualMachine"/>
47     </output>
48
49     <attrib name="task" type="VC:Task" read-only="false">
50         <value encoded="n">__NULL__</value>
51         <description>Task to await</description>
52     </attrib>
53     <attrib name="progress" type="boolean" read-only="false">
54         <value encoded="n">false</value>
55         <description>Log progress while waiting for the task to complete</description>
56     </attrib>
57     <attrib name="pollRate" type="number" read-only="false">
58         <value encoded="n">1.0</value>
59         <description>Polling rate for the task state, in seconds</description>
60     </attrib>
61     <attrib name="newVirtualMachine" type="VC:VirtualMachine" read-only="false">
62         <value encoded="n">dunes://service.dunes.ch/CustomSDKObject?id='vcsa-test01.uio.no/vm-239'&amp;dunesName='VC:VirtualMachine'</value>
63     </attrib>
64     <attrib name="errorCode" type="string" read-only="false">
65         <value encoded="n"/>
66     </attrib>
67     <attrib name="ssh_shell_server" type="string" read-only="false">
68         <value encoded="n"/>
69     </attrib>
70     <attrib name="pollingRate" type="number" read-only="false">
71         <value encoded="n">10.0</value>
72         <description>Time between all request information on the tools [seconds]</description>
73     </attrib>
74     <attrib name="timeout" type="number" read-only="false">
75         <value encoded="n">120.0</value>
76         <description>Timeout before throwing a timeout exception [minutes]</description>
77     </attrib>
78     <attrib name="addNumberToName" type="boolean" read-only="false">
79         <value encoded="n">false</value>
80         <description>Specify if the DNS name has an automatically number added at end (not known at clone time)</description>
81     </attrib>
82     <attrib name="server" type="boolean" read-only="false">
83         <value encoded="n">true</value>
84         <description>
85 Dersom "true" bygg server os.
86 Dersom "false" bygg klient os.
87         </description>
88     </attrib>
89     <workflow-note x="420.0" y="172.18181818181816" w="300.0" h="92.0">
90         <description>Hack for rhel7 &amp; fedora guests, not yet supported in all clusters</description>
91     </workflow-note>
92
93     <workflow-item name="item0" out-name="item1" type="task">
94         <display-name>Create new VM</display-name>
95
96         <script encoded="false">
97 var configSpec = new VcVirtualMachineConfigSpec();
98 configSpec.name = vmName;
99 configSpec.guestId = vmGuestOs;
100 configSpec.memoryMB = vmMemorySize;
101 configSpec.numCPUs = vmNbOfCpus;
102 configSpec.cpuHotAddEnabled = 1;
103 configSpec.cpuHotRemoveEnabled = 1;
104 configSpec.memoryHotAddEnabled = 1;
105
106
107 /*
108         Find the shared datastore with most free space 
109 */
110 var datastores = System.getModule("com.vmware.library.vc.datastore").getValidDatastoreForNetwork(vmNetwork);
111 var bestSize=0;
112 for each (var datastore in datastores) {
113         if (datastore.summary.multipleHostAccess == 0) {
114                 continue;
115         }
116         if (datastore.info.freeSpace &gt; bestSize) {
117                 var vmDatastore=datastore;
118         }
119 }
120
121
122 // Compute vmxFilePath
123 var datastorePath = "[" + vmDatastore.info.name + "]";
124 System.log( "VMX file path : '" + datastorePath + "'" );
125 var files = new VcVirtualMachineFileInfo();
126 files.vmPathName = datastorePath;
127 configSpec.files = files;
128
129 var deviceConfigSpecs = new Array();
130 var deviceConfigSpec = new VcVirtualDeviceConfigSpec();
131 var ii = 0;
132
133 // Add SCSI controller
134 deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualScsiControllerConfigSpec("PARA");
135 deviceConfigSpecs[ii++] = deviceConfigSpec;
136
137 // Add Disk
138 deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualDiskFlatVer2ConfigSpec(
139         vmDiskSize, vmDatastore, 0, 0, VcVirtualDiskMode.persistent, false );
140 deviceConfigSpecs[ii++] = deviceConfigSpec;
141
142 // Add Network
143
144 deviceConfigSpec = System.getModule("no.uio").createVirtualEthernetCardDvNetworkConfigSpec(vmNetwork );
145 deviceConfigSpecs[ii++] = deviceConfigSpec;
146
147 // List of devices
148 configSpec.deviceChange = deviceConfigSpecs;
149
150 // Launch the create VM task
151 task = vmFolder.createVM_Task( configSpec, vmResourcePool, vmHost );
152 //vmFolder
153         </script>
154
155         <in-binding>
156             <bind name="vmResourcePool" type="VC:ResourcePool" export-name="vmResourcePool"/>
157             <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork"/>
158             <bind name="vmNbOfCpus" type="number" export-name="vmNbOfCpus"/>
159             <bind name="vmName" type="string" export-name="vmName"/>
160             <bind name="vmMemorySize" type="number" export-name="vmMemorySize"/>
161             <bind name="vmHost" type="VC:HostSystem" export-name="vmHost"/>
162             <bind name="vmGuestOs" type="string" export-name="vmGuestOs"/>
163             <bind name="vmFolder" type="VC:VmFolder" export-name="vmFolder"/>
164             <bind name="vmDiskSize" type="number" export-name="vmDiskSize"/>
165         </in-binding>
166
167         <out-binding>
168             <bind name="task" type="VC:Task" export-name="task"/>
169         </out-binding>
170
171         <position x="424.5" y="128.13636363636363"/>
172     </workflow-item>
173
174     <workflow-item name="item2" type="end" end-mode="0">
175         <position x="1184.5" y="127.22727272727272"/>
176     </workflow-item>
177
178     <workflow-item name="item1" out-name="item6" catch-name="item12" throw-bind-name="errorCode" type="task" script-module="com.vmware.library.vc.basic/vim3WaitTaskEnd">
179         <display-name>vim3WaitTaskEnd</display-name>
180
181         <script encoded="false">
182 //Auto generated script, cannot be modified !
183 actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
184         </script>
185
186         <in-binding>
187             <bind name="task" type="VC:Task" export-name="task">
188                 <description>Task to Wait for</description>
189             </bind>
190             <bind name="progress" type="boolean" export-name="progress">
191                 <description>Log progess while waiting for the task</description>
192             </bind>
193             <bind name="pollRate" type="number" export-name="pollRate">
194                 <description>Polling rate for the task state [seconds]</description>
195             </bind>
196         </in-binding>
197
198         <out-binding>
199             <bind name="actionResult" type="VC:VirtualMachine" export-name="newVirtualMachine"/>
200         </out-binding>
201
202         <description>
203 Wait a VIM 3 Task to end.
204 When task ended, return the
205         </description>
206
207         <position x="544.5" y="128.13636363636363"/>
208     </workflow-item>
209
210     <workflow-item name="item3" out-name="item4" type="link" linked-workflow-id="2cdac1c6-1c4b-4fd4-aa62-a2736a71f7e7">
211         <display-name>error</display-name>
212
213         <in-binding>
214             <bind name="message" type="string" export-name="errorCode"/>
215         </in-binding>
216
217         <out-binding/>
218
219         <position x="684.5" y="237.22727272727272"/>
220     </workflow-item>
221
222     <workflow-item name="item4" type="end" end-mode="0">
223         <position x="864.5" y="227.22727272727272"/>
224     </workflow-item>
225
226     <workflow-item name="item6" out-name="item5" catch-name="item3" throw-bind-name="errorCode" type="link" linked-workflow-id="7f97fbb6-daf1-41dc-ae0c-a24388a77fa4">
227         <display-name>Add in bofh</display-name>
228
229         <in-binding>
230             <bind name="vm" type="VC:VirtualMachine" export-name="newVirtualMachine">
231                 <description>Virtual Machine</description>
232             </bind>
233             <bind name="kort_beskrivelse" type="string" export-name="kort_beskrivelse">
234                 <description>Kort beskrivelse av ny VM</description>
235             </bind>
236             <bind name="epostliste" type="string" export-name="epostliste">
237                 <description>Mail alias for ny VM</description>
238             </bind>
239         </in-binding>
240
241         <out-binding/>
242
243         <position x="684.5" y="128.13636363636363"/>
244     </workflow-item>
245
246     <workflow-item name="item5" out-name="item11" type="task">
247         <display-name>Check if ready to boot</display-name>
248
249         <script encoded="false">
250 var vm=newVirtualMachine.name;
251
252 dhcp="/site/lib/Ovc/chk_dhcp.pl "+vm;
253
254 var ssh = new SSHSession(ssh_shell_server,'virtprov');
255 ssh.connectWithIdentity('../conf/vco_key','');
256
257 /*
258         Get MacAddress for new VM
259 */
260 var macAddress;
261 var dev=newVirtualMachine.config.hardware.device;
262 for (index = 0; index &lt; dev.length; ++index) {
263         if (dev[index].macAddress) {
264                 macAddress=dev[index].macAddress;
265         }
266 }
267
268
269 var dhcp_out="00:00";
270 while (dhcp_out != macAddress) {
271         ssh.executeCommand(dhcp,true) ;
272         dhcp_out = ssh.getOutput();
273         // System.log("Not Ready to pxe boot "+vm);
274         System.sleep(20);
275 }
276 if (dhcp_out == macAddress) {
277         System.log("Ready to pxe boot "+vm);
278 } else {
279         System.log("Not Ready to pxe boot "+vm);
280 }
281 System.log("Output: '"+output+"'");
282
283 var output = ssh.getOutput();
284 System.log("Output: '"+output+"'");
285
286
287 errorText = ssh.getError();
288 var exitCode = ssh.exitCode;
289
290
291 System.log("Error: '"+errorText+"'");
292 System.log("Exit code: '"+exitCode+"'");
293
294 ssh.disconnect();
295
296 if (exitCode == 1) {
297         trow (errorText);
298 }
299         </script>
300
301         <in-binding>
302             <bind name="newVirtualMachine" type="VC:VirtualMachine" export-name="newVirtualMachine"/>
303             <bind name="ssh_shell_server" type="string" export-name="ssh_shell_server"/>
304             <bind name="vmGuestOs" type="string" export-name="vmGuestOs">
305                 <description>Guest operating system to use with the virtual machine</description>
306             </bind>
307         </in-binding>
308
309         <out-binding>
310             <bind name="newVirtualMachine" type="VC:VirtualMachine" export-name="vm"/>
311         </out-binding>
312
313         <position x="764.5" y="55.40909090909091"/>
314     </workflow-item>
315
316     <workflow-item name="item7" out-name="item0" type="link" linked-workflow-id="1f0fc470-006c-4c15-a3b9-95e2e7540f22">
317         <display-name>global_parameters</display-name>
318
319         <in-binding/>
320
321         <out-binding>
322             <bind name="mailto" type="string">
323                 <description>Default mailto parameter</description>
324             </bind>
325             <bind name="smtp_server" type="string">
326                 <description>Default SMTP server</description>
327             </bind>
328             <bind name="smtp_port" type="string">
329                 <description>Default SMTP port</description>
330             </bind>
331             <bind name="database" type="SQL:Database">
332                 <description>Default database</description>
333             </bind>
334             <bind name="vmPassword" type="SecureString"/>
335             <bind name="ou" type="string"/>
336             <bind name="ad_controll" type="boolean">
337                 <description>if yes, manipulate AD, if no, use uioadd with dynamic password</description>
338             </bind>
339             <bind name="ssh_shell_server" type="string" export-name="ssh_shell_server"/>
340             <bind name="ad_domain_user" type="string">
341                 <description>Ad join user</description>
342             </bind>
343             <bind name="domain_name" type="string"/>
344             <bind name="manage_cpu_ram" type="boolean">
345                 <description>If yes, define CPU when creating new VM, not using templated default</description>
346             </bind>
347         </out-binding>
348
349         <position x="284.5" y="128.13636363636363"/>
350     </workflow-item>
351
352     <workflow-item name="item8" out-name="item10" type="task" script-module="com.vmware.library.vc.vm.tools/vim3WaitDnsNameInTools">
353         <display-name>vim3WaitDnsNameInTools</display-name>
354
355         <script encoded="false">
356 //Auto generated script, cannot be modified !
357 System.getModule("com.vmware.library.vc.vm.tools").vim3WaitDnsNameInTools(vm,pollingRate,dnsNameToWait,timeout,addNumberToName) ;
358         </script>
359
360         <in-binding>
361             <bind name="vm" type="VC:VirtualMachine" export-name="newVirtualMachine">
362                 <description>VM in which the action look to get the new DNS Name</description>
363             </bind>
364             <bind name="pollingRate" type="number" export-name="pollingRate">
365                 <description>Time between all request information on the tools [seconds]</description>
366             </bind>
367             <bind name="dnsNameToWait" type="string" export-name="vmName">
368                 <description>Define a specific DNS name to wait for (either in compute.dunes.ch or compute form)</description>
369             </bind>
370             <bind name="timeout" type="number" export-name="timeout">
371                 <description>Timeout before throwing a timeout exception [minutes]</description>
372             </bind>
373             <bind name="addNumberToName" type="boolean" export-name="addNumberToName">
374                 <description>Specify if the DNS name has an automatically number added at end (not known at clone time)</description>
375             </bind>
376         </in-binding>
377
378         <out-binding/>
379
380         <description>
381 Wait for a given name in the DNS guest informations (VMware tools).
382
383 Exception:
384 - Timeout: When timeout is reached
385         </description>
386
387         <position x="984.5" y="64.5"/>
388     </workflow-item>
389
390     <workflow-item name="item9" out-name="item8" type="task" script-module="com.vmware.library.vc.vm.power/startVM">
391         <display-name>startVM</display-name>
392
393         <script encoded="false">
394 //Auto generated script, cannot be modified !
395 actionResult = System.getModule("com.vmware.library.vc.vm.power").startVM(vm,host) ;
396         </script>
397
398         <in-binding>
399             <bind name="vm" type="VC:VirtualMachine" export-name="newVirtualMachine">
400                 <description>VM to start or resume</description>
401             </bind>
402             <bind name="host" type="VC:HostSystem" export-name="vmHost">
403                 <description>[Optional] The host where the virtual machine is to be powered on. If no host is specified, the current associated host is used. This field must specify a host that is part of the same compute resource that the virtual machine is currently associated with. If this host is not compatible, the current host association is used.</description>
404             </bind>
405         </in-binding>
406
407         <out-binding>
408             <bind name="actionResult" type="VC:Task" export-name="task"/>
409         </out-binding>
410
411         <description>Start / Resume a VM. Return the start task</description>
412
413         <position x="964.5" y="146.3181818181818"/>
414     </workflow-item>
415
416     <workflow-item name="item10" out-name="item2" type="task">
417         <display-name>Delete pxe link</display-name>
418
419         <script encoded="false">
420 var vm=newVirtualMachine.name;
421 var dev=newVirtualMachine.config.hardware.device;
422 for (index = 0; index &lt; dev.length; ++index) {
423         if (dev[index].macAddress) {
424                 macAddress=dev[index].macAddress;
425         }
426 }
427
428 var pxe_link='/tftpboot/pxelinux.cfg/01-'+macAddress.split(":").join("-");
429
430 var ssh = new SSHSession(ssh_shell_server,'virtprov');
431 ssh.connectWithIdentity('../conf/vco_key','');
432
433 ssh.executeCommand("ssh pxe rm -f "+pxe_link,true) ;
434         
435 var output = ssh.getOutput();
436 System.log("Output: '"+output+"'");
437
438
439 errorText = ssh.getError();
440 var exitCode = ssh.exitCode;
441
442
443 System.log("Error: '"+errorText+"'");
444 System.log("Exit code: '"+exitCode+"'");
445
446 ssh.disconnect();
447
448 if (exitCode == 1) {
449         trow (errorText);
450 }
451         </script>
452
453         <in-binding>
454             <bind name="newVirtualMachine" type="VC:VirtualMachine" export-name="newVirtualMachine"/>
455             <bind name="ssh_shell_server" type="string" export-name="ssh_shell_server"/>
456             <bind name="vmGuestOs" type="string" export-name="vmGuestOs">
457                 <description>Guest operating system to use with the virtual machine</description>
458             </bind>
459         </in-binding>
460
461         <out-binding>
462             <bind name="newVirtualMachine" type="VC:VirtualMachine" export-name="vm"/>
463         </out-binding>
464
465         <description>Sletter pxe link</description>
466
467         <position x="1104.5" y="64.5"/>
468     </workflow-item>
469
470     <workflow-item name="item11" out-name="item9" type="link" linked-workflow-id="f9934087-646a-4a21-97ab-032a2663c0eb">
471         <display-name>mk_kickstart</display-name>
472
473         <in-binding>
474             <bind name="siteadmin" type="string" export-name="epostliste"/>
475             <bind name="vm" type="VC:VirtualMachine" export-name="newVirtualMachine"/>
476             <bind name="ssh_shell_server" type="string" export-name="ssh_shell_server"/>
477             <bind name="server" type="boolean" export-name="server">
478                 <description>
479 Dersom "true" bygg server os.
480 Dersom "false" bygg klient os.
481                 </description>
482             </bind>
483             <bind name="guestos" type="string" export-name="vmGuestOs"/>
484         </in-binding>
485
486         <out-binding/>
487
488         <description>Opprett kickstart konfig for VM</description>
489
490         <position x="864.5" y="100.86363636363636"/>
491     </workflow-item>
492
493     <workflow-item name="item12" out-name="item13" type="task">
494         <display-name>Hack for rhel7</display-name>
495
496         <script encoded="false">
497 var configSpec = new VcVirtualMachineConfigSpec();
498 configSpec.name = vmName;
499 configSpec.guestId = 'rhel6_64Guest';
500 configSpec.memoryMB = vmMemorySize;
501 configSpec.numCPUs = vmNbOfCpus;
502 configSpec.cpuHotAddEnabled = 1;
503 configSpec.cpuHotRemoveEnabled = 1;
504 configSpec.memoryHotAddEnabled = 1;
505
506
507 /*
508         Find the shared datastore with most free space 
509 */
510 var datastores = System.getModule("com.vmware.library.vc.datastore").getValidDatastoreForNetwork(vmNetwork);
511 var bestSize=0;
512 for each (var datastore in datastores) {
513         if (datastore.summary.multipleHostAccess == 0) {
514                 continue;
515         }
516         if (datastore.info.freeSpace &gt; bestSize) {
517                 var vmDatastore=datastore;
518         }
519 }
520
521
522 // Compute vmxFilePath
523 var datastorePath = "[" + vmDatastore.info.name + "]";
524 System.log( "VMX file path : '" + datastorePath + "'" );
525 var files = new VcVirtualMachineFileInfo();
526 files.vmPathName = datastorePath;
527 configSpec.files = files;
528
529 var deviceConfigSpecs = new Array();
530 var deviceConfigSpec = new VcVirtualDeviceConfigSpec();
531 var ii = 0;
532
533 // Add SCSI controller
534 deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualScsiControllerConfigSpec("PARA");
535 deviceConfigSpecs[ii++] = deviceConfigSpec;
536
537 // Add Disk
538 deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualDiskFlatVer2ConfigSpec(
539         vmDiskSize, vmDatastore, 0, 0, VcVirtualDiskMode.persistent, false );
540 deviceConfigSpecs[ii++] = deviceConfigSpec;
541
542 // Add Network
543
544 deviceConfigSpec = System.getModule("no.uio").createVirtualEthernetCardDvNetworkConfigSpec(vmNetwork );
545 deviceConfigSpecs[ii++] = deviceConfigSpec;
546
547 // List of devices
548 configSpec.deviceChange = deviceConfigSpecs;
549
550 // Launch the create VM task
551 task = vmFolder.createVM_Task( configSpec, vmResourcePool, vmHost );
552 //vmFolder
553         </script>
554
555         <in-binding>
556             <bind name="vmResourcePool" type="VC:ResourcePool" export-name="vmResourcePool"/>
557             <bind name="vmNetwork" type="VC:DistributedVirtualPortgroup" export-name="vmNetwork"/>
558             <bind name="vmNbOfCpus" type="number" export-name="vmNbOfCpus"/>
559             <bind name="vmName" type="string" export-name="vmName"/>
560             <bind name="vmMemorySize" type="number" export-name="vmMemorySize"/>
561             <bind name="vmHost" type="VC:HostSystem" export-name="vmHost"/>
562             <bind name="vmGuestOs" type="string" export-name="vmGuestOs"/>
563             <bind name="vmFolder" type="VC:VmFolder" export-name="vmFolder"/>
564             <bind name="vmDiskSize" type="number" export-name="vmDiskSize"/>
565         </in-binding>
566
567         <out-binding>
568             <bind name="task" type="VC:Task" export-name="task"/>
569         </out-binding>
570
571         <position x="444.5" y="219.04545454545453"/>
572     </workflow-item>
573
574     <workflow-item name="item13" out-name="item6" catch-name="item3" throw-bind-name="errorCode" type="task" script-module="com.vmware.library.vc.basic/vim3WaitTaskEnd">
575         <display-name>vim3WaitTaskEnd</display-name>
576
577         <script encoded="false">
578 //Auto generated script, cannot be modified !
579 actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
580         </script>
581
582         <in-binding>
583             <bind name="task" type="VC:Task" export-name="task">
584                 <description>Task to Wait for</description>
585             </bind>
586             <bind name="progress" type="boolean" export-name="progress">
587                 <description>Log progess while waiting for the task</description>
588             </bind>
589             <bind name="pollRate" type="number" export-name="pollRate">
590                 <description>Polling rate for the task state [seconds]</description>
591             </bind>
592         </in-binding>
593
594         <out-binding>
595             <bind name="actionResult" type="VC:VirtualMachine" export-name="newVirtualMachine"/>
596         </out-binding>
597
598         <description>
599 Wait a VIM 3 Task to end.
600 When task ended, return the
601         </description>
602
603         <position x="584.5" y="191.77272727272725"/>
604     </workflow-item>
605
606     <presentation>
607         <p-step>
608             <title>VM</title>
609             <p-group>
610                 <title>New VM</title>
611                 <p-param name="vmName">
612                     <desc>Virtual machine name</desc>
613                     <p-qual name="mandatory">true</p-qual>
614                 </p-param>
615                 <p-param name="vmFolder">
616                     <desc>Virtual machine folder</desc>
617                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
618                     <p-qual kind="static" name="show-select-as" type="string">drop-down</p-qual>
619                     <p-qual kind="static" name="defaultValue" type="VC:VmFolder">dunes://service.dunes.ch/CustomSDKObject?id='esx-wc.uio.no/group-v8410'&amp;dunesName='VC:VmFolder'</p-qual>
620                 </p-param>
621                 <p-param name="vmDiskSize">
622                     <desc>Size of virtual disk in GB, minumum value is 0.004)</desc>
623                     <p-qual name="mandatory">true</p-qual>
624                     <p-qual kind="static" name="minNumberValue" type="Number">0.0040</p-qual>
625                     <p-qual kind="static" name="numberFormat" type="String">##</p-qual>
626                     <p-qual kind="static" name="defaultValue" type="number">60.0</p-qual>
627                 </p-param>
628                 <p-param name="vmMemorySize">
629                     <desc>Memory size in MB</desc>
630                     <p-qual name="mandatory">true</p-qual>
631                     <p-qual name="minNumberValue">1.0</p-qual>
632                     <p-qual kind="static" name="numberFormat" type="String">##</p-qual>
633                     <p-qual kind="static" name="defaultValue" type="number">2048.0</p-qual>
634                 </p-param>
635                 <p-param name="vmNbOfCpus">
636                     <desc>Number of virtual CPUs</desc>
637                     <p-qual kind="static" name="genericEnumeration" type="Array/number">#{#number#1.0#;#number#2.0#;#number#3.0#;#number#4.0#;#number#5.0#;#number#6.0#;#number#7.0#;#number#8.0#}#</p-qual>
638                     <p-qual kind="static" name="maxNumberValue" type="Number">8</p-qual>
639                     <p-qual kind="static" name="minNumberValue" type="Number">1</p-qual>
640                 </p-param>
641                 <p-param name="vmGuestOs">
642                     <desc>Virtual machine guest OS</desc>
643                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
644                     <p-qual kind="static" name="defaultValue" type="string">dunes://service.dunes.ch/CustomSDKObject?id='rhel6_64Guest'&amp;dunesName='VC:VirtualMachineGuestOsIdentifier'</p-qual>
645                 </p-param>
646             </p-group>
647             <p-group>
648                 <title>Infrastructure</title>
649                 <p-param name="vmHost">
650                     <desc>Host on which to create the virtual machine</desc>
651                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
652                     <p-qual kind="static" name="show-select-as" type="string">list</p-qual>
653                     <p-qual kind="static" name="defaultValue" type="VC:HostSystem">dunes://service.dunes.ch/CustomSDKObject?id='esx-wc.uio.no/host-418'&amp;dunesName='VC:HostSystem'</p-qual>
654                 </p-param>
655             </p-group>
656         </p-step>
657         <p-step>
658             <title>Infrastructure</title>
659             <p-group>
660                 <title>Infrastructure</title>
661                 <p-param name="vmResourcePool">
662                     <desc>Resource pool</desc>
663                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
664                     <p-qual kind="static" name="defaultValue" type="VC:ResourcePool">dunes://service.dunes.ch/CustomSDKObject?id='esx-wc.uio.no/resgroup-1201'&amp;dunesName='VC:ResourcePool'</p-qual>
665                 </p-param>
666                 <p-param name="vmNetwork">
667                     <desc>The network to connect to</desc>
668                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
669                     <p-qual kind="static" name="show-select-as" type="string">drop-down</p-qual>
670                     <p-qual kind="static" name="defaultValue" type="VC:DistributedVirtualPortgroup">dunes://service.dunes.ch/CustomSDKObject?id='esx-wc.uio.no/dvportgroup-2007'&amp;dunesName='VC:DistributedVirtualPortgroup'</p-qual>
671                 </p-param>
672             </p-group>
673             <p-group>
674                 <title>Houdini</title>
675                 <p-param name="epostliste">
676                     <desc>Mail alias for ny VM</desc>
677                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
678                     <p-qual kind="static" name="defaultValue" type="string">ragnar.hongset@usit.uio.no</p-qual>
679                 </p-param>
680                 <p-param name="kort_beskrivelse">
681                     <desc>Kort beskrivelse av ny VM</desc>
682                     <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
683                     <p-qual kind="static" name="defaultValue" type="string">Test maskin som kan og skal slettes</p-qual>
684                 </p-param>
685             </p-group>
686         </p-step>
687     </presentation>
688 </workflow>