Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Red Hat 5.5 virtual machine NICs bind to different configurations


View products that this article applies to.

Symptoms

Red Hat 5.5 virtual machine NICs bind to different configurations after reboot.
This may affect CentOS systems as well. Linux Integrated Components version 2.1 is installed as well.

Consider the following scenario with a VM with 4 virtual NICs:

Hyper-V vNIC        VM Device   Configuration
Integrated NIC#1    NIC #1      ifcfg-seth0
Integrated NIC#2    NIC #2      ifcfg-seth1
Integrated NIC#3    NIC #3      ifcfg-seth2
Integrated NIC#4    NIC #4      ifcfg-seth3

You then reboot the virtual machine. After reboot, the NIC configuration shows up as the following:

Integrated NIC#1    NIC #1      ifcfg-seth3
Integrated NIC#2    NIC #2      ifcfg-seth2
Integrated NIC#3    NIC #3      ifcfg-seth1
Integrated NIC#4    NIC #4      ifcfg-seth0
  • From the internal NIC configuration in /etc/sysconfig/ifcfg-sethn, no changes have been made.
  • Using synthetic NICs with no other NICs bound to the system.
  • MAC address is setup as dynamic or static.

↑ Back to the top


Cause

The VMBus driver on the Windows host cannot guarantee what order the devices will be enumerated on boot. Even with a static MAC address assigned to each adapter, if device B comes up before device A, then device B will receive the seth0 name. Linux vendors have developed udev rules to work around this. Udev will look at the devices as they come up and see if there are rules for that particular device. For example, the rules can determine if a NIC has been seen and if it needs to be assigned a specific device name. For networking, this is all tracked in /etc/udev/rules.d/70-persistent-net.rules.

↑ Back to the top


Resolution

  1. Set static MAC addresses to your NICs for the VMs.
  2.  In the /etc/udev/rules.d/70-persistent-net.rules file, add the following entries:

    # net device ()
    SUBSYSTEM=="net", ACTION=="add", DRIVER=="?*", SYSFS{address}=="00:11:2a:3b:4c:5d ", SYSFS{type}=="1", KERNEL=="seth*", NAME="seth0"

    Please note the case sensitivity of all the parameters you enter. This tells the network subsystem to add a device named seth0 if there is a NIC present with MAC address 00:11:2a:3b:4c:5d.
  3. Do this for all your NICs and make sure the MAC address is static and will bind to the correct device.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2665504
Revision : 1
Created on : 1/7/2017
Published on : 1/16/2012
Exists online : False
Views : 123