VMware Cloud Community
MartandSingh
Contributor
Contributor

Power CLI Command to Edit vDS Network Resource Pool Properties

Hi Guys,

We are attempting to automate our vsphere environment and have created a power-shell script to create a Distributed Switch using "New-VDSwitch" command. Now, the script is running perfectly fine, wherein we are able to create the vDS and the associated port groups. However we want to take it one step further and want to edit some advanced vDS settings, particularly the "System Network Resource Pool" settings. There are 3 inter-related settings namely Host-Limit, Physical Adapter Shares and Shares value that we want to modify using commands but just can't find any.

On doing some thorough research, I was able to find the object UpdateNetworkResourcePool (https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.DistributedVirtualSwi... ) which further contains the data object DVSNetworkResourcePoolConfigSpec and DVSNetworkResourcePoolAllocationInfo which I believe can get us somewhere but the information given on pubs link is not very clear and we are not able to change the limit or share values.

Do you think it can be done through command line because I fear the worse, these are just read only objects and that these settings cannot be changed via command-line?

Here is what I tried:

(Get-VDSwitch -Name $vDSwitch | get-view).UpdateNetworkResourcePool.DVSNetworkResourcePoolConfigSpec.DVSNetworkResourcePoolAllocationInfo.limit(1000)

but it is giving me the error that property "limit" cannot be found on this object.

pastedImage_7.png

Any assistance on this will be much appreciated.

Cheers!!

Reply
0 Kudos
0 Replies