Looks like i should use CreateVirtualDisk_Task of the VimService.
http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.VirtualDiskManager.html#createVirtualDisk
CreateVirtualDisk_Task
Create a virtual disk.
Experimental. Subject to change
- Required Privileges
- None
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string | The name of the disk, either a datastore path or a URL referring to the virtual disk to be created. |
datacenter* P | ManagedObjectReference to a Datacenter | If name is a datastore path, the datacenter for that datastore path. If not specified, name must be a URL. |
spec | VirtualDiskSpec | The specification of the virtual disk to be created. |
*Need not be set P Required privilege: Datastore.FileManagement
Return Value
Type | Description |
---|---|
ManagedObjectReference to a Task | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs creating the virtual disk. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Thank you,
Regards,
Naresh