VMware Cloud Community
nesehlman
Contributor
Contributor
Jump to solution

"Device eth0 has different MAC address than expected, ignoring"

Hi, RedHat released a bunch of patches recently, including a new kernel for RH4EL. (2.6.9-55.ELsmp). I installed these on a VM running on ESX 3.1, rebooted and got this error: “Device eth0 has different MAC address than expected, ignoring.” So, I had no networking. In the RH network configuration GUI, I unchecked “bind to this MAC” and rebooted, but had the same problem. I rebooted one more time and things were back to normal. A colleague here tells me that he had a similar problem after installing a kernel patch on an Ubuntu VM yesterday, that he solved be reinstalling vmware-tools. Has anyone else had this problem?

0 Kudos
1 Solution

Accepted Solutions
rreynol
Enthusiast
Enthusiast
Jump to solution

We have had similar issues related to losing eth0 when upgrading the kernel. In your case I would recommend editing /etc/sysconfig/network-scripts/ifcfg-eth0 and removing the line that references the MAC address, unless your site somehow requires the MAC address to be in the file. It has been our experience that it is not necessary and only causes problems if you ever remove and add back the NIC.

Under ESX 2.5 we used to have a script we ran at startup of our RH linux guests that would check whether vmxnet had been compiled into the kernel and if not then we would run vmware-config-tools.pl to compile it, but it was our understanding that the new flexible driver in VI3 (the improved vlance driver) did not need to be checked in this way.

View solution in original post

0 Kudos
3 Replies
rreynol
Enthusiast
Enthusiast
Jump to solution

We have had similar issues related to losing eth0 when upgrading the kernel. In your case I would recommend editing /etc/sysconfig/network-scripts/ifcfg-eth0 and removing the line that references the MAC address, unless your site somehow requires the MAC address to be in the file. It has been our experience that it is not necessary and only causes problems if you ever remove and add back the NIC.

Under ESX 2.5 we used to have a script we ran at startup of our RH linux guests that would check whether vmxnet had been compiled into the kernel and if not then we would run vmware-config-tools.pl to compile it, but it was our understanding that the new flexible driver in VI3 (the improved vlance driver) did not need to be checked in this way.

0 Kudos
nesehlman
Contributor
Contributor
Jump to solution

Thanks very much. I should add the correction that my colleague who experienced the same problem was using RedHat as well, not Ubuntu. Also, after I reinstalled vmware-tools I did not reboot right away. Everything seemed OK at first, but then I noticed that sendmail and remote X sessions were dead. I did all I could to fix them with no luck and rebooted and found that all seemed to be back to normal. So, it seems to me that one should always check to see if vmware-tools are OK after a kernel upgrade and if one needs to re-run vmware-config-tool.pl, to reboot after doing so. Doing so automatically in a script is a very good tip.

0 Kudos
rreynol
Enthusiast
Enthusiast
Jump to solution

This is the script we used for vmxnet. If you are searching for vlance (pcnet32) instead of vmxnet then you need to make the change. Put the script in /etc/rc.d/init.d/vmxnet_build then do a chkconfig add for vmxnet_build. The script will run when you boot your linux VM. There was one condition that causes the script to get into a loop but it is very rare, so rare I cannot recall what causes it.

#!/bin/sh

#

\# chkconfig: 3 09 89

\# description: vmware

################################################################################

#

\# Purpose: This script will check for the existence of the vmxnet driver

\# (vmxnet.o) in /lib/modules/`uname -r`/misc. If the driver is not

\# there, the script will build it.

\# Author: Tom Crowe

\# Revisions: 02/21/05 - script was created

\# 02/02/2006 - comment out references to "old: vmware builds

#

################################################################################

#

\# source function library

. /etc/rc.d/init.d/functions

do_check_for_module() {

if \[ -f /lib/modules/`uname -r`/misc/vmxnet.o ] ; then

  1. driver is there

success $"vmxnet module exists:"

else

  1. module is not there, build it

failure $"vmxnet module does NOT exist:"

do_build_module

fi

echo

}

do_build_module() {

echo -n $"Building new vmxnet module:"

\# if \[ -x /usr/local/src/vmware-tools-distrib/bin/vmware-config-tools.pl ] ; then

\# # if the script is executable, run it

\# initlog -c "/usr/local/src/vmware-tools-distrib/bin/vmware-config-tools.pl d"

\# RETVAL=$?

\# elif \[ -x /usr/bin/vmware-config-tools.pl ] ; then

if \[ -x /usr/bin/vmware-config-tools.pl ] ; then

  1. else, if this other script is executable, run it

initlog -c "/usr/bin/vmware-config-tools.pl d"

RETVAL=$?

fi

if \[ $RETVAL = 0 ] ; then

success $"re-build of vmxnet module:"

echo -n $"Re-checking for vmxnet module:"

do_check_for_module

else

failure $"re-build of vmxnet module:"

fi

}

echo -n $"Checking for vmxnet module:"

do_check_for_module

0 Kudos