Close Menu
DPC Virtual Tips
    Read More

    How to Investigate TCP Retransmissions on Linux

    August 11, 2026

    Slurm Node Is DRAINED: How to Find the Exact Reason

    August 10, 2026

    Why Is My Slurm Job Pending? How to Decode Every Common Reason

    August 9, 2026
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Tuesday, August 11
    DPC Virtual Tips
    • Home
    • Operating Systems
    • PowerFlex
    • HPC
    • Virtualization
    • About the Author
    • About Us
    • Contact
    DPC Virtual Tips
    Home » Recover ESXi Host Network
    Virtualization

    Recover ESXi Host Network

    DaniloBy DaniloMarch 15, 2025Updated:July 31, 2026No Comments5 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    ESXi management network
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Recover ESXi Host Network shows all the necessary steps to recover an ESXi management network when connected to a vSphere Distributed Switch (VDS).

    First things first: Describing the Scenario

    So, in this example, we have a four-node vSAN cluster, and the first ESXi host, for some reason (wrong configuration such as VLAN tagging, etc), is with “not responding” status, as we can see:

    All nodes are using a vSphere Distributed Switch (VDS), and all VMkernels adapters communicate through Port Groups attached to this VDS:

    Each ESXi host has four physical adapters:

    Each Port group uses two physical adapters: one Active and another Standby:

    To check out what physical interface is using the “Uplink 1” – In this example, the “Uplink 1” is mapped to “vmnic0”:

    We can access a working node by SSH, executing the “esxtop” command, and typing the “n” to see network details. As we can see, the VMkernel “vmk0” is using the physical network adapter “vmnic0”:

    To wrap this up, when we use a vSphere Distributed Switch (VDS), the management plan is performed by the vCenter Server. All configurations are made on the vCenter Server, and a copy is sent to registered ESXi hosts. So, based on it, all VDS configurations are performed on a vCenter Server, and afterward, they are sent to each ESXi host. It’s essential to understand it before continuing!

    Accessing the Console of the Unavailable Host

    As I said before, the first ESXi host was not responding from the vCenter Server perspective for some reason, and we need to fix it ASAP (from the network perspective, the ESXi host is unavailable as well):

    So, in this example, we can access the unavailable ESXi host through its physical console:

    Hit “F2” to enable the ESXi Shell:

    Go to “Troubleshooting Options”:

    Look that ESXi Shell is not enable. Hit “Enter” under it to enable:

    Afterward, hit “Alt” + “F1” to access the ESXi Shell:

    Steps to Recover the Host Management Network

    1. Get the “DVPort ID” used by the management VMkernel:

    esxcfg-vswitch -l

    As we can see, the vmk0 uses the “DVPort ID” 1 – This number can differ in your environment:

    2. Get the Teaming Policy configuration applied for this VMkernel:

    net-dvs -l | grep -A20 -B1 -i "port 1:"

    Change the “port 1” with your “DVPort ID” value!
    In this example, this DVPort ID has “Uplink 1” as Active and “Uplink 2” as Standby:

    We have seen that “Uplink 1” is mapped to “vmnic 0”. However, you can access a working node by SSH and execute the following command to map each uplink to its vmnic:

    esxcfg-vswitch -l | grep -i vmnic[0-9] | sed 1d | awk -F' ' '{print $1"-"$3}' | while read line; do net-dvs -l | grep -A1 -i "port ${line%%-*}" | \
    awk -v line="$line" 'BEGIN{split(line,a,"-")} /alias/{print a[1], a[2], $3$4}'; done

    3. Before creating a vSphere Standard Switch (VSS), we must remove the physical interface vmnic0 from the vSphere Distributed Switch (DVS). To get the vmnic0 DVPort ID:

    esxcfg-vswitch -l

    In this example, the vmnic0 has the DVPort ID 32:

    Removing the vmnic0 from VDS:

    esxcfg-vswitch -Q vmnic0 -V 32 VDS-VSAN-OSA

    Explaining the command:

    -Q vmnic0 = physical interface to be removed from VDS
    -V 32 = DVPort ID for vmnic0
    VDS-VSAN-OSA = VDS name

    4. Create a vSphere Standard Switch (VSS):

    esxcli network vswitch standard add --vswitch-name=Temp-VSS

    5. Create a Port Group into the previously created vSphere Standard Switch (VSS):

    esxcli network vswitch standard portgroup add --portgroup-name=Temp-MGMT --vswitch-name=Temp-VSS

    6. Add a physical network interface (vmnic0) to the previously created vSphere Standard Switch (VSS):

    esxcli network vswitch standard uplink add --uplink-name=vmnic0 --vswitch-name=Temp-VSS

    7. Remove the vmk0 that was using into VDS and create a new one using the new standard switch:

    esxcli network ip interface remove --interface-name=vmk0

    8. Create a new VMkernel interface and associate it with the previously created Port Group:

    esxcli network ip interface add --interface-name=vmk0 --portgroup-name="Temp-MGMT"

    At this point, we have a vSphere Standard Switch (Temp-VSS) with one uplink (vmnic0), and with one Port Group (Temp-MGMT):

    The vmk0 interface was created, but it does not have any IP address:

    9. Set up a static IP address on the vmk0:

    esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=192.168.255.11 --netmask=255.255.255.0 --type=static

    10. Set up a default route through vmk0:

    esxcli network ip route ipv4 add --gateway=192.168.255.1 --network=default

    Note: If you need to specify a VLAN ID under the new Port Group, you can use the following – In this example, the Port Group name is “Temp-MGMT” and the VLAN ID is 10:

    esxcli network vswitch standard portgroup set -p "Temp-MGMT" -v 10

    After executing all these steps, the first ESXi host went back to the vCenter Server, and we can manage it through vCenter usually:

    Migrating the Management VMkernel from VSS to VDS

    We can migrate the management VMkernel from VSS to VDS following the steps below:

    Select the ESXi host –> Configure –> Networking –> Virtual Switches –> Expand the VDS –> Click on the three dots –> Migrate Networking:

    Under the “Manage VMkernel adapters” page, we can see the vmk0 using the VSS “Temp-VSS” and the Port Group “Temp-MGMT”:

    Click on “ASSIGN PORT GROUP”:

    Under the “Assign port group” tab, we can see all VDS Port Groups. In our example, the “DPG-MGMT” is a VDS Port Group used for management traffic. Click “ASSIGN” and then click “NEXT”:

    Keep all other values unchanged. Next, finish:

    The next step is to remove the physical network adapter (vmnic0) to the VSS “Temp-VSS”. Under this switch, click “MANAGE PHYSICAL ADAPTERS”:

    Select the vmnic0 and move it down to the “Unused adapters”:

    Now, we can go ahead and remove the VSS:

    Under the VDS, click on “MANAGE PHYSICAL ADAPTERS”:

    Look at the vmnic0, which is not assigned to any uplink:

    Assign the vmnic0 to the uplink 1 to complete all the steps:

    That’s it 🙂

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleChanging the Hostname on a Production vCenter Server
    Next Article How can I use NAT on NSX-T?
    Danilo

    Infrastructure Engineer with experience in Virtualization, Linux, Windows Server and learning automation using Python. DPC Virtual Tips was created to share practical tutorials, lab experiences and troubleshooting guides focused on enterprise infrastructure technologies.

    Related Posts

    VM Replication with vSphere Replication and Site Recovery Manager

    June 16, 2025

    Changing DNS Settings on ESXi Hosts

    May 20, 2025

    Changing NTP Settings on ESXi Hosts

    May 19, 2025

    Comments are closed.

    Search
    Categories
    • HPC (10)
    • Operating Systems (83)
    • PowerFlex (22)
    • Virtualization (129)
    Read More
    Operating Systems

    How to Investigate TCP Retransmissions on Linux

    By DaniloAugust 11, 20260
    HPC

    Slurm Node Is DRAINED: How to Find the Exact Reason

    By DaniloAugust 10, 20260
    HPC

    Why Is My Slurm Job Pending? How to Decode Every Common Reason

    By DaniloAugust 9, 20260
    Operating Systems

    Linux Process Resource Usage: How to Find Heavy Processes

    By DaniloAugust 6, 20260
    HPC

    Lustre Filesystem Commands: A Practical Admin Guide

    By DaniloAugust 5, 20260
    Latest Posts

    How to Investigate TCP Retransmissions on Linux

    August 11, 2026

    Slurm Node Is DRAINED: How to Find the Exact Reason

    August 10, 2026

    Why Is My Slurm Job Pending? How to Decode Every Common Reason

    August 9, 2026
    Images from Gallery
    hpc main commands
    linux commands
    install rock linux
    lustre fs
    shell scripting
    vSAN Trace Files
    Categories
    • HPC
    • Operating Systems
    • PowerFlex
    • Virtualization
    • Home
    • About Us
    • Contact
    • Cookie Policy
    • Comment Policy
    • Privacy Policy
    • Terms of Use
    • Disclaimer
    Copyright © 2026, DPC Virtual Tips. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.

    We use cookies to ensure your best experience on our website. If you continue using our website, we'll assume you agree to our cookie policy