VMware Cloud Community
go-gate07
Contributor
Contributor

vCenter 7.0

is there any way where I can configure share values for system traffic under Network IO Control for a specific dVSwitch using powercli in vCenter 7.0?

Reply
0 Kudos
8 Replies
LucD
Leadership
Leadership

No, you'll have to use the API method.

The following example sets the share for the management traffic to high.

$vdsName = 'vdSw1'
$type = 'management'

$vds = Get-VDSwitch -Name $vdsName

$spec = New-Object VMware.Vim.VMwareDVSConfigSpec
$spec.ConfigVersion = $vds.ExtensionData.Config.ConfigVersion
$infra = New-Object VMware.Vim.DvsHostInfrastructureTrafficResource
$infra.Key = $type
$alloc = New-Object VMware.Vim.DvsHostInfrastructureTrafficResourceAllocation
$share = New-Object VMware.Vim.SharesInfo
$share.Level = [VMware.Vim.SharesLevel]::high
$alloc.Shares = $share
$infra.AllocationInfo = $alloc
$spec.InfrastructureTrafficResourceConfig += $infra

$vds.ExtensionData.ReconfigureDvs($spec)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
dgogate07
Contributor
Contributor

Are those API settings related to the same shares that we set in GUI in vCenter?

Reply
0 Kudos
LucD
Leadership
Leadership

Yes


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
dgogate07
Contributor
Contributor

Hello,

Thank you, I ran in in my test environment and it works fine, what if I need to configure custom share and need to specify a share value?

Reply
0 Kudos
dgogate07
Contributor
Contributor

Thank you !
I got it.
I added below lines and it worked for me with custom shares

$share.Level = [VMware.Vim.SharesLevel]::custom
$share.Shares = <Share_Value>

 

Thank you once again for your help !

Reply
0 Kudos
LucD
Leadership
Leadership

You could mark the thread as Answered, that makes it easier for others to find threads that have a valid answer.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
dgogate07
Contributor
Contributor

Hi,

I am new here, I dont see any option to mark it as answered., I can see option to mark it as new but not answered.

 

Thanks and Regards,

Devendra Gogate.

Reply
0 Kudos
LucD
Leadership
Leadership

There is normally a Correct Answer button, on the right below an answer

correct.png


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos