Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 207710

How do I invoke ->CreateResourcePool() ???

$
0
0
  my $resource_config_spec = ResourceConfigSpec->new(
#     changeVersion => '',
             entity => $entity,
      cpuAllocation => $cpu_allocation,
       lastModified => '20120209',
   memoryAllocation => $memory_allocation, );

  # print Dumper $resource_config_spec;

  # my $resource_pool = CreateResourcePool->new(
  my $resource_pool = $vm->ResourcePool->CreateResourcePool(
      name => 'recycle_vm_20120209',
      spec => $resource_config_spec, );

I've tried this a few ways, including those apparent from the code snippet above and from the comments embedded in it.  My Dumper command (commented out) shows what appears to be a well formed spec object.  But the errors I'm getting do not complain about the arguments, but only about the  methods I'm feeding those arguments to.

As presented the error reads:  "Undefined subroutine &VirtualMachine::ResourcePool"

Using the call as its commented out above, I get instead: "Can't load class 'CreateResourcePool' at"

Treating ResourcePool as an object in and of itself, gave me: "Can't use string ("ResourcePool") as a HASH ref while "strict refs" in use at"

At this point, this seems to be the last barrier to my successfully invoking a ->MigrateVM_Task() call.

But I've been stuck on sorting out how to invoke the ->CreateResourcePool() method, on what object specifically it is available, since last Thursday.  I'd certainly appreciate any guidance available from folks who have done this before.

Thanks,

-- Hugh Esco


Viewing all articles
Browse latest Browse all 207710

Trending Articles