VMware Cloud Community
mmarzotto
Contributor
Contributor
Jump to solution

orchestrator workflow to change startup to bios

New to orchestrator and having some issues.

Been trying to get a workflow that will change a VM's setting to boot to BIOS on the next reboot.

Tried using the following script and putting it into a action and then place it in the workflow but it doesnt do anything:

var myVcVirtualMachineBootOptions = new VcVirtualMachineBootOptions();
enterBIOSSetup = true;

any help would be greatly appreciated.

thanks

0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

I have tested the script posted by Kyle. It works fine.

In your workflow add an input of type vc:virtual machine

Add this as input in your scriptable box.

Paste this code:

var spec = new VcVirtualMachineConfigSpec();

spec.bootOptions = new VcVirtualMachineBootOptions();

spec.bootOptions.enterBIOSSetup = true;

vm.reconfigVM_Task(spec);

"vm" should be highlighted since you have vm as input.

Validate the workflow.

Run it.

If you have never done workflows previously I recommend going through the tutorials on vcoteam.info. You will find all the basics about input parameters, linking inputs and so on.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

0 Kudos
8 Replies
AureusStone
Expert
Expert
Jump to solution

I haven't used Orchestrator recently and I don't have it installed atm, but hopefully this will work for you.

~~~~~~~~~~~~~~~~~~~

var spec = new VcVirtualMachineConfigSpec();
spec.bootOptions = new VcVirtualMachineBootOptions();
spec.bootOptions.enterBIOSSetup = true;

<your virtual machine object>.reconfigVM_Task(spec);

~~~~~~~~~~~~~~~~~~~

mmarzotto
Contributor
Contributor
Jump to solution

that didnt work out.

it stated that the managed object was not defined. and when i defined the object in a line before the last one, it states that it cannot find function reconfigVM_task(spec)

0 Kudos
AureusStone
Expert
Expert
Jump to solution

Could you just get create a new virtualmachine object, called something like myVM, then select a random VM.  Then select this object to be input for your script.  That way you know you have a valid virtualmachine object.

Then you can just do something like this at the end.

myVM.reconfigVM_Task(spec);

0 Kudos
mmarzotto
Contributor
Contributor
Jump to solution

honestly, i do not know how to create a new object within orchestrator to define the object.

i did define the managed object anyways but it errored off saying the reconfigVM_Task(spec); cannot be found

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

please check out my blog article: http://mighty-virtualization.blogspot.com/2011/08/vco-whats-up-with-vcoptionvalue.html

This article describes how to use the "VMX" parameters to change BIOS options.

here are the .vmx parameters: http://sanbarrow.com/vmx/vmx-advanced.html#bios

best regards

Christian

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

I have tested the script posted by Kyle. It works fine.

In your workflow add an input of type vc:virtual machine

Add this as input in your scriptable box.

Paste this code:

var spec = new VcVirtualMachineConfigSpec();

spec.bootOptions = new VcVirtualMachineBootOptions();

spec.bootOptions.enterBIOSSetup = true;

vm.reconfigVM_Task(spec);

"vm" should be highlighted since you have vm as input.

Validate the workflow.

Run it.

If you have never done workflows previously I recommend going through the tutorials on vcoteam.info. You will find all the basics about input parameters, linking inputs and so on.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
mmarzotto
Contributor
Contributor
Jump to solution

that worked! than you!

one other question....how would i make it possible to change multiple vms at once? Just add more inputs?

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

I wrote a tutorial about this: http://www.vcoteam.info/learn-vco/creating-workflow-loops.html

At the bottom is attached the workflow created in the tutorial.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos