LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-27-2011, 07:24 PM   #1
rogerd77
LQ Newbie
 
Registered: Aug 2011
Location: Indianapolis
Distribution: CentOS 5.5
Posts: 3

Rep: Reputation: Disabled
Can't get networking to work in guest CentOS 5 host ESX4.1


I am a Linux newbie, but I have successfully loaded a Linux guest before. I can't ping any other systems, not even the default gateway. I set up the guest to use DHCP (for now) and it is getting an address, I checked my (windows) DHCP server, and the guest's IP lease shows with the correct mac address. I made sure that I don't have a duplicate mac address. The Linux firewall is turned off. This has got to be something stupid I am doing, but I can't figure out what. Thanks in advance for your help.
 
Old 08-27-2011, 07:31 PM   #2
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
You don't say if it's CentOS 5 or 6. Take a look at your /etc/sysconfig/network-scripts/ifcfg-eth0 It might have NM_CONTROLLED=yes and you might not have NetworkManager running, or something similar.

Did you create a network during installation?

If you do chkconfig --list |grep -i Network what does it show? Also, does that file have ONBOOT=yes?

Lastly of course, check the VM network in the ESXi settings.
 
Old 08-27-2011, 09:31 PM   #3
rogerd77
LQ Newbie
 
Registered: Aug 2011
Location: Indianapolis
Distribution: CentOS 5.5
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the reply, here are the answers to your questions:

CentOS 5.5 X64
/etc/sysconfig/network-scripts/ifcfg-eth0 contents:
Code:
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:50:56:80:00:12
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
Yes, I created a network during installation.

Code:
chkconfig --list |grep -i Network

NetworkManager  0:off   1:off   2:off  3:off  4:off  5:off  6:off
network         0:off   1:off   2:on   3:on   4:on   5:on   6:off
I then started NetworkManager so 5 is now on

I have looked at the ESXi NIC settings (and compared it to several of my windows VMs), and I believe it is correct.
Thanks
 
Old 08-27-2011, 09:44 PM   #4
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Ok, I actually, in CentOS 5.x, wouldn't use NetworkManager.

You shouldn't have both network and NM running, I believe they get in each other's way.

Turn it back off.

Try

service network restart

See if you see any errors.

If you can't ping 8.8.8.8 or another public DNS server after doing that, try

dhclient eth0

If you get an error that dhclient is already running, then first


pkill dhclient

then try it again.

It may also be a firewall or SELinux, but let's look at the obvious first.

If you _can_ ping 8.8.8.8 but can't do anything by name, that is, can't open a browser or whatever, then it's a DNS issue.

(BTW, though others will probably help, I probably won't answer again tonight.)
 
Old 08-27-2011, 10:05 PM   #5
rogerd77
LQ Newbie
 
Registered: Aug 2011
Location: Indianapolis
Distribution: CentOS 5.5
Posts: 3

Original Poster
Rep: Reputation: Disabled
I stopped NetworkManager.

dhclient returned no errors and reported that it got the address from the DHCP server.
Most of my testing has been by LAN ip addresses. It won't ping the default gateway or the (windows) DHCP server by IP address, but strangely, it is getting an IP address from the DHCP server. 8.8.8.8 won't ping either. I have firewall and SELinux off.

I might try to call VMWare support (we pay enough for it!!), but I am afraid that they will point to the guest OS, or my configuration. This is a new install, and I accepted most of the defaults.

Thanks
 
Old 08-28-2011, 06:05 AM   #6
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
I've set up a bunch of these, but did it a bit differently. (Minimal install, don't set up network during installation.) I haven't had any problems, so I don't think it's something with either VMware or CentOS. However, they've all been static addresses.


Make very sure that NM isn't running. It might even be worth once again doing chkconfig NetworkManager off and rebooting--it can be a real pain to stop.

Try configuring with system-config-network-tui. Make sure there's no NM_CONTROLLED=yes in the ifcfg-eth0 file. Restart the network.

If it still doesn't work, try a static address.

After that, I'm out of ideas. I've never dealt with VMWare support myself--probably depends upon the individual. The only other thing I've run into is that if it's a cloned system, it won't see eth0, because in udev rules eth0 will have the wrong MAC address. However, eth1 will work. If this was from a clone, that might be the issue.

Does ifconfig -a show an extra ethernet card?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtualbox CentOS Guest can not connect to Internet from XP Host sokha Linux - Virtualization and Cloud 2 03-30-2010 11:28 PM
Host to Guest and vice versa networking opaltoad Linux - Virtualization and Cloud 3 10-22-2009 04:11 PM
Networking - bridging - VM-guest/host jonaskellens Linux - Networking 1 06-29-2009 05:20 AM
networking between host and guest divyashree Linux - Networking 3 03-06-2009 09:04 AM
Networking - Host hangs during transfer to Guest linuxfond Linux - Networking 1 03-30-2004 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration