Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229504

Add VMDK to VM using SDRS recommendation

$
0
0

Hi guys,

 

I am trying to add a disk to a VM following SDRS recommendation based on William Lam work.

 

Here is my code:

 

my $storagePod = Vim::find_entity_view(view_type => 'StoragePod', filter => {'name' => 'DCL_DC1_NOPROD_01'}, properties => ['name']);

my $storageMgr = Vim::get_view(mo_ref => Vim::get_service_content()->storageResourceManager);

my $podSpec = StorageDrsPodSelectionSpec->new(storagePod => $storagePod);

my $vmSpec = VirtualMachineConfigSpec->new(files => $vm->config->files);

my $storageSpec = StoragePlacementSpec->new(type => 'reconfigure', vm => $vm, podSelectionSpec => $podSpec, configSpec => $vmSpec);

my $result = $storageMgr->RecommendDatastores(storageSpec => $storageSpec);

 

 

Bit I get this error:

 

 

SOAP Fault:

-----------

Fault string: A specified parameter was not correct.

StoragePlacementSpec.podSelectionSpec.storagePod

 

 

Any idea?

 

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 229504

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>