VMware {code} Community
rickyelqasem
Enthusiast
Enthusiast

probelm with reconfigure resource pool

Having trouble reconfiguring a resource pool. Here's my code:

ManagedObjectReference mor = new ManagedObjectReference();

mor.type = "ResourcePool";

mor.Value = moref;

ResourceConfigSpec rsc = new ResourceConfigSpec();

rsc.cpuAllocation.shares = (string)"1000";

// service.ReconfigureComputeResourceTask(mor, rsc, true);

service.ReconfigureComputeResourceTask(mor, ResourceConfigSpec, true);

return null;

Problem I have is not sure that ReconfigureComputeResource_Task is that correct option to use and how to define cpuAllocation.shares as I have the value as a string.

Thanks for any help.

Ricky El-Qasem

VCI/VCP - MCSE - RHCT

Ricky El-Qasem VCI/VCP - MCSE - RHCT
Reply
0 Kudos
2 Replies
rickyelqasem
Enthusiast
Enthusiast

OK so I fixed the allocation of the Shares but still having a problem performing the task.

with:

service.ReconfigureComputeResourceTask(mor, ResourceConfigSpec, true);

Ricky El-Qasem

VCI/VCP - MCSE - RHCT

Ricky El-Qasem VCI/VCP - MCSE - RHCT
Reply
0 Kudos
rickyelqasem
Enthusiast
Enthusiast

OK I worked thats its _service.UpdateConfi I need but now my shares ResourceConfigSpec does work.

Ricky El-Qasem

VCI/VCP - MCSE - RHCT

Ricky El-Qasem VCI/VCP - MCSE - RHCT
Reply
0 Kudos