VMware Cloud Community
Stuarty1874
Contributor
Contributor

Using Vmish to overide vSwitch Settings

Guys, I have a scenario where I'd like to configure a single Port Group to override the settings which are set at the vSwitch level.

Is it possible to use vimsh to do this?

I've searched around and found some vimsh commands that will allow me to amend the vSwitch settings but I'm not sure if is possible to amend the Port Group settings.

I've got the following command but I'm not sure if I'm on the right track.

vimsh -n -e .hostsvc/net/portgroup_unsetpolicy

Any ideas?

Tags (1)
0 Kudos
5 Replies
Stuarty1874
Contributor
Contributor

I've tried the following command to override the vSwitch1 setting for Traffic Shapping on a Port Group PG1.. but it fails

vimsh -n -e "hostsvc/net/vswitch_setpolicy --shapingpolicy-enabled =false vSwitch1 PG1"

I get the following output...

vimsh -n -e "hostsvc/net/vswitch_setpolicy --shapingpolicy-enabled =false vSwitch1 PG1"

Current working directory: /usr/lib/vmware/hostd

Using system libcrypto, version 90709F

Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 120000000

Unsetting unknown path: /vmomi/

I can get vmish to enable the setting, but as I said above I need to disable it.

vimsh -n -e "hostsvc/net/vswitch_setpolicy --shapingpolicy-enabled =true vSwitch1 PG1"

0 Kudos
azn2kew
Champion
Champion

You might want to check some technical guide on this specifically to VIMSH here hope that helps.

YIM: igeeksystems@yahoo.com

Skype: igeeksystems

Hotmail:igeeksystems@hotmail.com

Google: igeeksystems@gmail.com

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
0 Kudos
Stuarty1874
Contributor
Contributor

Hi azn2kew, I've visited this site already but I can't get the info I'm looking for.

0 Kudos
dinny
Expert
Expert

Hiya,

You can definitely use vimsh to make port group level settings.

I'm not sure exactly which ones you want to amend.

These are some portgroup level vimsh commands that I run in my build scripts which may be useful examples?

# set explicit failover

vimsh -n -e "/hostsvc/net/portgroup_set --nicteaming-policy=failover_explicit vSwitch0 vmotion"

vimsh -n -e "/hostsvc/net/portgroup_set --nicteaming-policy=failover_explicit vSwitch0 'Service Console'"

# set rolling failback

vimsh -n -e "/hostsvc/net/portgroup_set --nicteaming-rollingorder=true vSwitch0 vmotion"

vimsh -n -e "/hostsvc/net/portgroup_set --nicteaming-rollingorder=true vSwitch0 'Service Console'"

#set active vmnics

vimsh -n -e "/hostsvc/net/portgroup_set --nicorderpolicy-active vmnic5 vSwitch0 vmotion"

vimsh -n -e "/hostsvc/net/portgroup_set --nicorderpolicy-active vmnic0 vSwitch0 'Service Console'"

#set standby vmnics

vimsh -n -e "/hostsvc/net/portgroup_set --nicorderpolicy-standby vmnic0 vSwitch0 vmotion"

vimsh -n -e "/hostsvc/net/portgroup_set --nicorderpolicy-standby vmnic5 vSwitch0 'Service Console'"

Dinny

0 Kudos
jasonboche
Immortal
Immortal

Has anyone noticed on ESX 3.5 that when you define just one portgroup specific setting using vimsh, in the VIC it checks the all the boxes overriding all virtual switch settings which isn't necessarily what you want to do?

vimsh is a fickle beast






[i]Jason Boche[/i]

[VMware Communities User Moderator|http://communities.vmware.com/docs/DOC-2444][/i]

VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+
0 Kudos