Quantcast
Viewing all articles
Browse latest Browse all 293210

Re: Code Sample to create a new vmdk?

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

NameTypeDescription
_thisManagedObjectReferenceA reference to the VirtualDiskManager used to make the method call.
namexsd:string

 

The name of the disk, either a datastore path or a URL referring to the virtual disk to be created.
datacenter* PManagedObjectReference
to a Datacenter

 

If name is a datastore path, the datacenter for that datastore path. If not specified, name must be a URL.
specVirtualDiskSpec

 

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
FileFaultThrown 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


Viewing all articles
Browse latest Browse all 293210

Trending Articles