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

vDCA550-Obj-2-1-createandmanageVSSComponents-06

Select the VM Portgroup option -> Click “Next”

vDCA550-Obj-2-1-createandmanageVSSComponents-07

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

vDCA550-Obj-2-1-createandmanageVSSComponents-08

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”

vDCA550-Obj-2-1-createandmanageVSSComponents-09

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

vDCA550-Obj-2-1-createandmanageVSSComponents-10

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

vDCA550-Obj-2-1-createandmanageVSSComponents-11

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

vDCA550-Obj-2-1-createandmanageVSSComponents-12

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-13

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-14

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

vDCA550-Obj-2-1-createandmanageVSSComponents-15

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”

vDCA550-Obj-2-1-createandmanageVSSComponents-16

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

vDCA550-Obj-2-1-createandmanageVSSComponents-17

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

vDCA550-Obj-2-1-createandmanageVSSComponents-18

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-19

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

vDCA550-Obj-2-1-createandmanageVSSComponents-20

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

vDCA550-Obj-2-1-createandmanageVSSComponents-21

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-22

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

vDCA550-Obj-2-1-createandmanageVSSComponents-23

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”

vDCA550-Obj-2-1-createandmanageVSSComponents-24

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

vDCA550-Obj-2-1-createandmanageVSSComponents-25

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-26

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

vDCA550-Obj-2-1-createandmanageVSSComponents-27

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.

vDCA550-Obj-2-1-createandmanageVSSComponents-28

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”

vDCA550-Obj-2-1-createandmanageVSSComponents-29

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

vDCA550-Obj-2-1-createandmanageVSSComponents-30

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
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