In the VMTN Community Forums for Orchestrator recently one question came up:
“…how to use orchestrator to change the Video Card Setting of a VM to “Auto-detect settings” the next time the VM reboots?” (read the full thread here: http://communities.vmware.com/message/2040860#2040860)
That is a typical task for a workflow developer: Automate something you can easily click in vSphere Client, but it maybe hard to figure out, how to automate it.
ONYX to the rescue!
See this video how to get to the solution in less than 15 minutes :-D… (You can download the resulting workflow below, but that shouldn’t be necessary anymore 😛 !)
It’s a quick shot screencast, so no audio….
If you like the style, drop me a comment, and I will create more videos (with explanations 😎 ) in future!
Do you have any more tutorials centered around onyx? Also, the book you referenced in this video, is it still relevant today? I noticed it was published in 2009. Thanks.
Hi,
see another tutorial here: http://www.vcoteam.info/learn-vco/expand-your-vco-library-with-onyx.html
Onyx is still relevant, however, it does not work with the vSphere Web Client (so you sadly cannot intercept features which are only available via Web Client).
Steve’s book covers the API of vCenter 4.x. The current version is backward compatible, so the book is still relevant, it is just not complete anymore. All the new features introduced in 5.x are not covered.
I usually prefer to use the most current API reference from the VMware homepage.
Cheers,
Joerg
Hi Joerg,
I am looking for the change parameter of VM, I tried to use ONYX, but no luck with it, exactly it is parameter disk.EnableUUID.
ONYX gives me this (it is just part for my parameter):
var spec = new VcVirtualMachineConfigSpec();
spec.extraConfig = System.getModule(“com.vmware.onyx”).array(VcOptionValue, 53);
spec.extraConfig[5] = new VcOptionValue();
spec.extraConfig[5].key = “disk.EnableUUID”;
spec.extraConfig[5].value = false;
managedObject.reconfigVM_Task(spec); // VirtualMachine
Could you please advise, how to solve it. When I run it with changed array values (one item array), I took reply on vSphere “A specified parameter was not correct.” . When I run it as it is I took “java.io.IOException: java.io.IOException: java.io.IOException: Non nillable element ‘key’ is null.”
Thanks 🙂
Hi,
try to change the code you referenced to
spec.extraConfig = System.getModule(“com.vmware.onyx”).array(VcOptionValue, 1);
spec.extraConfig[0] = new VcOptionValue();
spec.extraConfig[0].key = “disk.EnableUUID”;
spec.extraConfig[0].value = false;
That’s because you only want to change a single extra option, not 53 of them.
(The vSphere Client always “copies” the whole configuration and sends it to vCenter when re-configuring a virtual machine, not only the changed attributes. So there usually is some clean-up work necessary for the Onyx output)