The following can be used to remove a CDROM drive from a powered on Virtual Machine using vRO, vRealize Orchestrator.
Paste the following into a Scriptable task and create an input Parameter of type VC:VirtualMachine called workflowVM
var configSpec = new VcVirtualMachineConfigSpec(); var deviceConfigSpecs = new Array(); var deviceConfigSpec = new VcVirtualDeviceConfigSpec(); var devices = workflowVM.config.hardware.device; for ( var ii in devices) { var device = devices[ii]; if ( device instanceof VcVirtualCdrom) { deviceConfigSpec.device = device; deviceConfigSpec.operation = VcVirtualDeviceConfigSpecOperation.remove; deviceConfigSpecs.push (deviceConfigSpec); configSpec.deviceChange = deviceConfigSpecs } } workflowVM.reconfigVM_Task(configSpec);
Hi Daniel,
Just wondering how much details you have looked into device configuration via vRO. I interested in seeing if I can use something like GEFMachineCustomizationStorage as I want to assign driveletter and label to a disk when it is created via vRO. Do you know how best to accomplish this , any suggestions would be greatly appreciated.
LikeLike