Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232631

Re: Creating a VM using the built-in "Create custom virtual machine" workflow with eager zero disk

$
0
0

OK, you need to modify the scripting code of action createVirtualDiskFlatVer2ConfigSpec. As the action is sealed/non-editable, you need to duplicate it. Just launch vRO client, find this action in action tree view, right-click on it and select Duplicate action menu. Give it some name, eg. createVirtualDiskFlatVer2ConfigSpecEager and click Submit button.

 

After that, open the duplicated action for edit, and add the following line after the line diskBackingInfo.thinProvisioned = thinProvisioned;

diskBackingInfo.eagerlyScrub = true;

 

and the click Save and close button.

 

Next, you have to modify the workflow Create custom virtual machine to use the new action instead of the original one. It is also sealed, so you need to duplicate it, open the duplicated copy for edit, and replace the call to createVirtualDiskFlatVer2ConfigSpec with call to createVirtualDiskFlatVer2ConfigSpecEager. Click Save and close button, and launch the modified workflow.

 

That's it, the modified workflow will now create eager zeroed disk. If you want, you can improve the above steps a bit, eg. instead of hard-coding the value of eagerlyScrub you can make it an input boolean parameter to the modified scripting action (much like the existing thinProvisioned parameter) and expose it in the workflow presentation so the user will be able to choose either eager zeroed or lazy zeroed disks.


Viewing all articles
Browse latest Browse all 232631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>