VMware {code} Community
Manoj_Shingare
Contributor
Contributor
Jump to solution

Managed Object Browser showing value of virtualDiskManager as Unset .

Hi,

I need ManagedObjectReference for the object virtualDiskManager for Extending the size of VirtualDisk.

I tried it as fallows :

service.ExtendVirtualDiskTask( _sic.virtualDiskManager , --- , - ,);

But at runtime value of _sic.virtualDiskManager is showing null .

Managed Object Browser showing value of virtualDiskManager as Unset .

virtualDiskManager ManagedObjectReference:VirtualDiskManager Unset

Could you tell the reason ? Am i missing some setting of Virtual Center Server ?

Thanks in advance for help.

0 Kudos
1 Solution

Accepted Solutions
njain
Expert
Expert
Jump to solution

Hi Manoj,

If you want to add a new disk in a VM through VC, you can also use the "ReconfigVM_Task" method to achieve this. Similar to the create VM process, this method takes in the "VirtualMachineConfigSpec" parameter. You can set the "deviceChange" property to add the new virtual disk.

Hope the above information is helpful.

Regards,

Neha

View solution in original post

0 Kudos
7 Replies
njain
Expert
Expert
Jump to solution

The VirtualDiskManager object is a new feature introduced in VI API 2.5 and is presently available for ESX 3.5 versions. Also, this object is an experimental feature and is subject to change in future releases.

You can refer to the VI SDK 2.5 release notes for further details on new features:

Manoj_Shingare
Contributor
Contributor
Jump to solution

Hi Neha,

Thanks for the reply.

How to add new virtual disk to Virtual Machine .

I am trying out to add virtual disk with the following method,

service.CreateVirtualDiskTask( );

Even this method also requires reference of VirtualDiskManager .

Is there any other way to do the same.

Thanks.

Manoj

0 Kudos
njain
Expert
Expert
Jump to solution

Hi Manoj,

If you want to add a new disk in a VM through VC, you can also use the "ReconfigVM_Task" method to achieve this. Similar to the create VM process, this method takes in the "VirtualMachineConfigSpec" parameter. You can set the "deviceChange" property to add the new virtual disk.

Hope the above information is helpful.

Regards,

Neha

0 Kudos
Manoj_Shingare
Contributor
Contributor
Jump to solution

Hi Neha.

Thanks for the reply.

Your solution is working fine. Using ReconfigVM_Task method , adding new virtual disk and additional disk space to existing disk tasks are achieved.

Thanks

Manoj

0 Kudos
junaidsaiyed
Contributor
Contributor
Jump to solution

Does anybody know why the VirtualDiskManager is unset?

-JS

0 Kudos
njain
Expert
Expert
Jump to solution

As mentioned above, the VirtualDiskManager object is presently available for ESX 3.5 versions only. If you are looking for value of VirtualDiskManager on a VirtualCenter, it will be unset.

0 Kudos
junaidsaiyed
Contributor
Contributor
Jump to solution

Thanks.

0 Kudos