Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Adding new disk to VM from vRA ASD using vRO workflow

$
0
0

Hi guys,

 

I currently have a workflow that adds a new vdisk to an existing virtual machine. This is presented via vRA ASD forms, however we currently have to enter the next sequential disk index in order for the workflow to execute. I would like this to be filled in automatically. Is there an easy way to do this?

 

current code is the out the box

 

var configSpec = new VcVirtualMachineConfigSpec();

var deviceConfigSpecs = new Array();

var deviceConfigSpec;

 

 

// Add/Create the disk

deviceConfigSpec = System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualDiskFlatVer2ConfigSpec(

    diskSize, datastore, scsiControllerKey, diskIndex, VcVirtualDiskMode.fromString(diskMode.name), thinProvisioned );

deviceConfigSpecs[0] = deviceConfigSpec;

 

 

// List of devices

configSpec.deviceChange = deviceConfigSpecs;

 

 

// Launch the reconfigVM task

task = vm.reconfigVM_Task( configSpec );

 

thanks,


Viewing all articles
Browse latest Browse all 6251

Trending Articles