I have added disk to Virtual Machine using "Add Disk" workflow. but i couldn't find workflow to remove the added disk. Can anyone help me to figure out?
Thanks in advance.
Thanks for the response.
I want to remove one disk out of 3 disk attached to VM. Can you share script if you have? or share API?
I tried looking into API guide but i could not find any method to remove particular virtual disk attached to Virtual Machine.
Take a look at action 'com.vmware.library.vc.vm.spec.config.device.createVirtualDiskFlatVer2ConfigSpec()', used in 'Add Disk' workflow.
Within it, we prepare an instance of 'VcVirtualDeviceConfigSpec' class. In 'Add Disk' workflow, operation and fileOperation properties are initialized to add/create. According to the API docs listed below, there are also values for remove/destroy operations.
Should be a good starting point for experiments.
Thanks IIian, i already tried that. I'm able to remove virtual Hard disk from VM, but i'm not able to delete .vmdk file, which resides in datastore. I tried with VcVirtualDeviceConfigSpecFileOperation object but no luck.