Host loses network connectivity following change from legacy BIOS to UEFI
search cancel

Host loses network connectivity following change from legacy BIOS to UEFI

book

Article ID: 402064

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When switching your host from Legacy BIOS to UEFI, it reboots and does not connect to the network properly.

This issue may also present as other PCI devices being assigned incorrect configuration following the BIOS change

Environment

VMware ESXi 8.0.x

Cause

When your host is switched from the legacy BIOS configuration to UEFI, there is a possibility that the PCI device addresses that are presented to ESXi by the host will change. This issue stems from the physical host presenting its PCI devices to ESXi incorrectly.

Because the VMware PCI device alias name and associated configuration are assigned to vmnics based on their PCI address, when this change occurs, the existing configuration associated with one vmnic will now be associated with another, causing network adapters to stop working properly.

Resolution

If the issue is already occurring

If your host has already lost network connectivity after the BIOS change, proceed directly to Changing the names assigned by the ESXi host below.

Preventing the issue before changing BIOS settings

If you have not yet changed your BIOS settings from Legacy to UEFI, follow these steps to document your current configuration:

  1. SSH into the ESXi host before making any BIOS changes
  2. Run the following command to list all network adapters:
   esxcli network nic list
  1. Document the output, which will look similar to this:
   Name    PCI Device    Driver    Admin Status  Link Status  Speed  Duplex  MAC Address         MTU  Description
   ------  ------------  --------  ------------  -----------  -----  ------  -----------------  ----  -----------
   vmnic0  0000:0b:00.0  nvmxnet3  Up            Up           10000  Full    ##:##:##:##:##:##  9000  VMware Inc. vmxnet3 Virtual Ethernet Controller
   vmnic1  0000:13:00.0  nvmxnet3  Up            Up           10000  Full    ##:##:##:##:##:##  9000  VMware Inc. vmxnet3 Virtual Ethernet Controller
  1. Note the following information for any adapters showing "Up" in Link Status:
    • vmnic number (e.g., vmnic0)
    • MAC address
    • PCI Device address
  2. After changing BIOS to UEFI, if the host comes up and everything works as expected, you're good to go.
  3. If network connectivity is lost, access the DCUI via iLO, iDRAC, or other out-of-band management available to you
  4. Navigate to the shell within DCUI and rerun the command:
   esxcli network nic list
  1. Compare the MAC addresses from the pre-change list with the post-change list. If the MAC addresses have moved to different vmnic numbers, proceed to reassign them.

Alternative: If the issue is already occurring, you can also check what the previous configuration was by looking at the physical adapters in vCenter to see which MAC addresses were associated with which physical adapter prior to making this change.

Changing the names assigned by the ESXi host

NOTE: Ensure you have console access before executing the steps below.

  1. From the ESXi shell, run this command to see the current assignment of aliases to device locations:
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list

Output example:

   Bus type  Bus address          Alias
   ------------------------------------
   pci       s00000007.00         vmnic2
   pci       s00000008.00         vmnic4
   pci       s00000008.01         vmnic5
   pci       s00000008.03         vmnic7
   pci       s00000008.02         vmnic6
   pci       s00000002.01         vmnic1
   pci       s00000002.00         vmnic0
   pci       s00000007.01         vmnic3
   logical   pci#s00000008.02#0   vmnic6
   logical   pci#s00000008.00#0   vmnic4
   logical   pci#s00000008.01#0   vmnic5
   logical   pci#s00000008.03#0   vmnic7
  1. Understanding the alias types: When a NIC is controlled by a native driver, there are actually two aliases associated with the device:
    • A pci alias for the PCI device
    • A logical alias for the uplink logical device
    For example, we see two aliases for vmnic7:
   localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias list | grep vmnic7
   pci       s00000008.03        vmnic7
   logical   pci#s00000008.03#0  vmnic7
  1. For each alias that you want to reassign, use the command:
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias vmnicN --bus-address B
  1. When the logical alias is present, both the PCI alias and logical alias need to be renamed:
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias vmnicN --bus-address B

Where vmnicN and B are the new assignment that you want to make.

  1. Example: To swap vmnic0 and vmnic7 using the output above, run:
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias vmnic0 --bus-address s00000008.03
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias vmnic7 --bus-address s00000002.00
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias vmnic0 --bus-address "pci#s00000008.03#0"
   localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias vmnic7 --bus-address "pci#s00000002.00#0"
  1. After giving all necessary alias store commands, perform a clean shutdown and reboot the system.

Additional Information