Commandline migration of vmk0 from NVDS to vSS in an NSX-T environment
search cancel

Commandline migration of vmk0 from NVDS to vSS in an NSX-T environment

book

Article ID: 314010

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

This article provides step to migrate the VMkernel interface that is used for management traffic from NVDS to vSS in an NSX-T environment.
This procedure is intended for a scenario where the ESXi host has lost management network connectivity and commandline recovery to vSS is required.

Note: In VSAN environments extra care should be taken to ensure that there is no additional disruption to the VSAN vmkernel network. If in doubt please open a Support Request with VMware GSS to get assistance with this activity.

Resolution

NSX-T Data Center environments earlier than 2.4.2

Sample output has been edited to show only output of relevance to the procedure

Gather information on the NICs attached to the NVDS

# nsxdp-cli vswitch instance list
Client                         PortID          DVPortID                             MAC                  Uplink
vmnic0                         67108866        uplink-1                             00:00:00:00:00:00
vmnic1                         67108872        uplink-2                             00:00:00:00:00:00


# net-stats -l
PortNum          Type SubType SwitchName       MACAddress         ClientName
67108866            4       0 DvsPortset-0     b4:96:91:##:##:##  vmnic0
67108873            4       0 DvsPortset-0     a4:bf:01:##:##:##  vmnic1



Remove NIC(s) from NVDS
# esxcfg-vswitch -Q vmnic0 -V uplink-1 DvsPortset-0
# esxcfg-vswitch -Q vmnic1 -V uplink-2 DvsPortset-0


Create a vSS
# esxcfg-vswitch -a vSwitch0

Add the NIC(s)
# esxcfg-vswitch -L vmnic0 vSwitch0
# esxcfg-vswitch -L vmnic1 vSwitch0


Create a portgroup
# esxcfg-vswitch -A mgmt vSwitch0

Delete vmk0 from the NVDS
# esxcli network ip interface remove –-interface-name=vmk0

Add vmk0 to vSS
# esxcfg-vmknic -a -i <IP address> -n <netmask> -p mgmt
# esxcfg-vswitch -v <mgmt VLAN ID> -p mgmt vSwitch0


Add the default GW
# esxcfg-route -a default <GW IP address>


At this point the ESXi host should have management connectivity restored and should reconnect back to vCenter.
Further configuration changes can then be made via the vSphere Client.


NSX-T Datacenter environments 2.4.2/2.5.0 and above

NSX-T Data Center 2.4.2 and 2.5.0 introduced a script to simplify the recovery procedure

Create a vSS
# esxcfg-vswitch -a vSwitch0

Create a Management portgroup
# esxcfg-vswitch -A "Management Network" vSwitch0

Migrate vmkernel and vmnic from NVDS to vSS
#/usr/lib64/vmware/nsx-opsagent/bin/nsxcfg-vswitch -m -p "Management Network" -I vmk0 -P vmnic0

At this point the ESXi host should have management connectivity restored and should reconnect back to vCenter.
Further configuration changes can then be made via the vSphere Client.