vDCA550-Objective 2.3-7-Use command line tools to troubleshoot and identify configuration items from an existing vDS

Although a vDS cannot be modified via vCLI commands because its control plane resides on a vCenter Server and mostly the configuration is done via GUI using vCenter however there are limited sets of commands available for vDS such as list/Add/Remove port group operations using “esxcfg-vswtich” command .

NOTE: “esxcfg-vswtich” command is limited to specific host. You can run these command by using SSH into the hosts.

Following are the tasks which you can perform from “esxcfg-vswtich” command.

List the Switches on the host.

#esxcfg-vswitch –l

Output

vDCA550-Obj-2-3-cmdlinetotroubleshootvds-01

Remove the “vmnic1” from an uplink. Must specific the “DVPort ID” in the command where the vmnic1 is connected.

#esxcfg-vswitch -Q vmnic1 -V 46 DSwitch

Where –Q (deleted an Uplink), –v (Specify the DVPort ID)

Then list the vSwitch to verify that “vmnic1” has been removed from vDS.

#esxcfg-vswitch –l

Output

vDCA550-Obj-2-3-cmdlinetotroubleshootvds-02

Add the “vmnic1” to an uplink. Must specific the “unused DVPort ID” in the command.

#esxcfg-vswitch -P vmnic1 -V 46 DSwitch

Where –P (add an Uplink), –v (Specify the DVPort ID)

Then list the vDS to verify that “vmnic1” has been added to vDS.

#esxcfg-vswitch –l

Output

vDCA550-Obj-2-3-cmdlinetotroubleshootvds-03

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s