Posts Tagged ‘esx’

restore lost management interface in esx

Thursday, October 15th, 2015

moving from vss to vds?
got lost along the way?

you can restore management connectivity to your hypervisor like so:


# show interfaces
esxcli network ip interface list

# list current vswitch configuration
esxcli network vswitch standard list

#delete non functional interfaces
esxcli network ip interface remove --interface-name=vmkX

#list vds, get the dvPort for the vmnic
esxcli network vswitch dvs vmware list
# delete the nics from vds
esxcfg-vswitch -Q vmnic -V dvPort_ID_of_vmnic dvSwitch

#remove nic from vss
esxcli network vswitch standard uplink remove --uplink-name=vmnic --vswitch-name=vSwitch

#create vswitch
esxcli network vswitch standard add --vswitch-name=vSwitchX
#add vmnic to switch
esxcli network vswitch standard uplink ad --uplink-name=vmnicX --vswitch-name=vSwitchX
#create portgroup
esxcli network vswitch standard portgroup add --portgroup-name=MYportgroup --vswitch-name=vSwitchX
#create vmk and add to portgroup
esxcli network ip interface add --interface-name=vmkX --portgroup-name=MYportgroup
esxcli network ip interface ipv4 set --interface-name=vmkX --ipv4=ipaddress --netmask=netmask --type=static
#set vlan id
esxcli network vswitch standard portgroup set -p MYportgroup --vlan-id VLAN#

once that’s done you can reattach to vCentre Server.