Tuesday 1 May 2012

how to configure virtual switch using command line interface

Recently i added a DvSwitch and added 3 of my hosts to the dvswitch. But unfortunately i lost network connectivity to the ESX hosts.

Did following steps to revert back the changes

Both the physical nics vmnic0 and vmnic1 are mapped to dvswitch.

Step 1: Removed vmnic0 and vmnic1 from the dvswitch
 Syntax: esxcfg-vswitch -Q vmnic0 -V <port id> <portgroup name>

#esxcfg-vswitch -Q vmnic0 -V 216 "AMB 01"
#esxcfg-vswitch -Q vmnic1 -V 217 "AMB 01"

Vmkernel interface also mapped to dvswitch

Step 2:  Remove vmkernel interface from dvswitch

Syntax: # esxcfg-vmknic -d -s <DVswitchname> -v <virtual_port_ID>

#esxcfg-vmknic -d -s "AMB 01" -v 100

Step 3: Mapped vmnic0 to vswitch0

#esxcfg-vswitch -A vmnic0 vSwitch0
#esxcfg-vswitch -A vmnic1 vSwitch1

Step 4: Added vmkernel port to standard switch 


Syntax:#esxcfg-vmknic -a -i <IP Address> -n <netmask> <Portgrp name>


#esxcfg-vmknic -a -i 10.2.1.211 -n 255.255.255.0 "Management Network"


Step 5: How to remove vmkernel port from portgroup 


#esxcfg-vmknic -d "VM Network"



http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1000266

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008127



No comments:

Post a Comment