Bug 154106

Summary: dhcp not possible when booting inside vmware
Product: Red Hat Enterprise Linux 3 Reporter: Joerg Hinz <hinz>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: davem, jbaron, petrides, riel, shillman
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-13 15:36:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix dhcp-problems with vmware none

Description Joerg Hinz 2005-04-07 12:09:42 UTC
From Bugzilla Helper:
User-Agent: Opera/8.0 (Windows NT 5.0; U; en)

Description of problem:
When using RHEL3 inside vmware and eth0 is set to dhcp, the check_link_down()-
function inside /etc/sysconfig/network-scripts/network-funktions fails to detect 
the link and always returns "link down" which causes to fail getting the dhcp-
address.

Starting dhclient manually works, so the problem is script-specific.

A quick (but dirty) workaround is making check_link_down-function in /etc/
sysconfig/network-scripts/network-funktions always return 1:

check_link_down ()
{
    return 1
 [...]



Version-Release number of selected component (if applicable):
initscripts-7.31.16.EL

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL inside vmware (bridged networking (pcnet32-driver)
2. Set eth0 to dhcp
3. Boot the System
4. The problem is reproducable every time you call /etc/init.d/networking start

Actual Results:  The init-script always says "failed; no link present. Check cable?" when trying 
to initialize eth0.

Expected Results:  The link should be properly set up.

Additional info:

Comment 1 Joerg Hinz 2005-04-07 13:58:30 UTC
This Patch fixes the problem:

--- /etc/sysconfig/network-scripts/network-functions.RHEL3      2005-04-07 15:
50:44.000000000 +0200
+++ /etc/sysconfig/network-scripts/network-functions    2005-04-07 15:53:15.
000000000 +0200
@@ -251,6 +251,13 @@ check_link_down ()
           ip link set dev $1 up >/dev/null 2>&1
           timeout=0
           while [ $timeout -le 10 ]; do
+               # VMware-Fixes hinz
+               if LC_ALL=C dmesg | grep -iq vmware ; then
+                       return 1
+               fi
+               if LC_ALL=C /sbin/lspci 2>/dev/null| grep -iq vmware ; then
+                       return 1
+               fi
                check_mii_tool $1
                m=$?
                check_ethtool $1


The true problem is, that ethtool reports the vmware-net-device as "link down".
..

Unless ethtool or mii-tool do not recognize vmware-net-devices I suggest this 
patch.

Joerg

Comment 2 Suzanne Hillman 2005-04-07 15:14:11 UTC
Please attatch the patch to this bug report, using the "Create a New Attachment"
link.

Comment 3 Joerg Hinz 2005-04-07 17:01:35 UTC
Created attachment 112820 [details]
Patch to fix dhcp-problems with vmware

Comment 4 Bill Nottingham 2005-04-07 18:58:49 UTC
The driver used by vmware does not correctly report link status. This needs to
be fixed there.

Comment 5 John W. Linville 2005-04-07 20:00:06 UTC
Which RHEL3 release are you using?  This sure sounds like bug 100527, which 
should be fixed in RHEL3 U4 or later. 
 
Please update to RHEL3 U4 (or later) and try to recreate this issue.  If that 
is not possible, please at least try the kernels available here: 
 
   http://people.redhat.com/linville/kernels/rhel3/ 
 
Please report the results here.  Thanks! 

Comment 6 Joerg Hinz 2005-04-13 15:24:37 UTC
Yes, the problem is fixed in RHEL3 U4. Just tested it.

So bug 154106 can be closed.

Thanks for your patience.

Regards
  Joerg

Comment 7 Ernie Petrides 2005-04-13 19:06:41 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-550.html


*** This bug has been marked as a duplicate of 100527 ***