(I did find a reference to a similar post about this from 2013 but no answers AFAICT and no code https://code.vmware.com/forums/2416/vsphere-management-sdk#463881|2319617)
I am using the C# (targetting 4.5 .NET) bindings for the VIM25 API and I am trying to set the boot order.
The code snippet is:
cfgSpec.bootOptions = new VirtualMachineBootOptions();
cfgSpec.bootOptions.bootOrder = new VirtualMachineBootOptionsBootableDevice[1];
cfgSpec.bootOptions.bootOrder[0] = new VirtualMachineBootOptionsBootableCdromDevice();
tmor = Service.ReconfigVM_Task(vmRef, cfgSpec);
The ReconfigVM_Tasl fails with an error about incorrect paramter.
The VM in question does have a CD/DVD device attached on IDE 1:0 and the ISO image has been attached via another API call.
Looking for any ideas why this would be the case?
Thanks