vDCA550-Objective 2.1-1-Create and Manage vSS components -(Part 2)

How to create a Virtual Switch?

From GUI:

Example: create a Virtual Switch “vSwitch1”

To create a new vSwitch from vmware webclient ->Go to the ESXi host-> Select the ESXI host -> Manage-> Networking-> Virtual Switches -> Click on the Global Sign as highlighted


Select the VM Portgroup option -> Click “Next”


Select the “New Standard switch” option -> Click “Next”


Click on the Green “+” sign to assign a physical adapter to this virtual switch. I will assign a physical adapter to this virtual switch later, Do nothing -> Click “Next”


It will give a warning and tell you that you did not assign a physical adapter. Which I already knew. Just click “OK”


Define a Network Label (Port group Name) -> Click “Next” and then press “Finish”


You can see below we have created a brand new virtual switch with port group name “VM Network 2 (PG)”.


Assign a Physical Network Adapter to a Virtual Switch

Select the virtual switch (vSwitch1) and click on the highlighted icon to manage the physical network adapters.


Click on the “+” sign and select the available physical adapter from the list. It is you first adapter you can add it as active one. But if you have multiple adapter than you use them as active/standby or move to unused adapter.


Verify you added physical adapter in now associated to your virtual switch (vSwitch1)


Add another Portgroup into Existing Virtual Switch (vSwitch1)

Click on the Glob + sign and run the new virtual switch wizard. In the second screen on this wizard. This time select the first option and browse your existing virtual switch (vSwitch1) -> Click “Next”


Define a Network Label (PortGroup Name) -> Click “Next” and then press “Finish”


Now you can see below we have a new port group with name “VM Network 3 (PG)” in our existing Virtual Switch (vSwitch1)


From CLI:

Create a new Virtual Switch

#esxcli network vswitch standard add -v vSwitch1

Create a new Portgroup “VM Network2 (PG)” in vSwitch1

#esxcli network vswitch standard portgroup add -p "VM Network2(PG)" -v vSwitch1

Assign an uplink “vmnic3” to Virtual Swtich1

#esxcli network vswitch standard uplink add -u vmnic3 -v vSwitch1

Set the uplink “vmnic3” as active in vSwitch1

#esxcli network vswitch standard policy failover set -a vmnic3 -v vSwitch1

Create a new Portgroup “VM Network3 (PG)” in vSwitch1

#esxcli network vswitch standard portgroup add -p "VM Network 3(PG)" -v vSwitch1


How to Remove a PortGroup from a Virtual Switch

From GUI:

Select the Desired vSwitch. In my case it is “vSwitch1” and Select the desired PortGroup-> Click on the “x” sign to delete the PG.

NOTE: Make sure you don’t have any VM Connected to this Portgroup otherwise he won’t delete and give you an error that PG is already in Use.


It will ask you for confirmation to remove the PG-> Click “Yes”


Select the “vSwitch1” and as you can see below. The desired PortGroup has been deleted.


How to Remove a Physical adapter from a virtual Switch

From GUI:

To remove or manage (add) a Physical Network adapter from Virtual Switch. Select the Virtual Switch (vSwitch1) and click on the Highlighted sign to go to the manage dialog box.


Select the desired Physical adapter. In my case I have only one and press the “x” sign.


It will warn you the remove of active physical adapter from the virtual switch might cause the network connectivity problem. So make sure to keep this in mind if you are in production environment. It’s fine for me -> Click “OK”


Click On the “vSwitch1” and verify as highlighted that Physical adapter has been removed from the virtual switch.


How to remove a Virtual Switch

Select the desired virtual standard switch. In my case it is “vSwitch1” and click on the “x” as highlighted to remove the virtual switch.


It will as ask you for confirmation -> Click “Yes”


When you click yes it will not delete the virtual switch. It is because a VM “xp-01” is connected with the PG (VM Network3 (PG)) and that PG is associated this virtual Switch (vSwtich1). First change the virtual machine Network and make this PG free. Then try again to remove the virtual switch.


TO change the virtual Machine Network.Select the virtual machine and Go to the “Settings” -> In “Virtual Machine” Tab -> Change the Network from “VM Network 3 (PG)” to anything else. If you have any PG available in your Network on this ESXi hosts -> Click “OK”


Now Try again to remove the “vSwitch1” and as you can see below “vSwitch1” is no longer exists in our virtual Switch inventory.


From CLI:

Remove a PortGroup “VM Network2(PG)” from vSwitch1

#esxcli network vswitch standard portgroup remove -p "VM Network2(PG)" -v vSwitch1

Remove uplink “vmnic3” from vSwitch1

#esxcli network vswitch standard uplink remove -u vmnic3 -v vSwitch1

Remove virtual Switch “vSwitch1” from ESXi inventory.

#esxcli network vswitch standard  remove -v vSwitch1

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s