Alfred von Campe
2009-Jun-16 17:50 UTC
[CentOS] Slow CentOS VM when running off the network
I have a CentOS 5.3 VM running under VMware on a WIndows XP laptop. Everything works fine when connected to the network. However, removed from the network, most everything in the CentOS VM takes minutes to complete. For instance, starting a new Terminal window takes over 3 minutes. I did an strace, and there are a couple of long waits when trying to open a socket (/tmp/.ICE-unix/XXXXX for instance). The host and the VM can ping each other fine, but any access to the VM (either external or from within) eventually succeeds, but it takes a long time. First, I thought I'd reduce the default socket timeout (which I believe is set to around 90 seconds), but I can't find where to do that on a system wide level. But I really need to figure out what is causing the problem in the first place. I'm assuming the network is somehow misconfigured, but I don't know how. Alfred
Alfred von Campe wrote:> I have a CentOS 5.3 VM running under VMware on a WIndows XP laptop. > Everything works fine when connected to the network. However, > removed from the network, most everything in the CentOS VM takes > minutes to complete. For instance, starting a new Terminal window > takes over 3 minutes. I did an strace, and there are a couple of > long waits when trying to open a socket (/tmp/.ICE-unix/XXXXX for > instance). > > The host and the VM can ping each other fine, but any access to the > VM (either external or from within) eventually succeeds, but it takes > a long time. First, I thought I'd reduce the default socket timeout > (which I believe is set to around 90 seconds), but I can't find where > to do that on a system wide level. But I really need to figure out > what is causing the problem in the first place. I'm assuming the > network is somehow misconfigured, but I don't know how.You could do "service network stop" on the CentOS VM when not on the network, or if you need networking between the VM and the hosts, configure for hostonly networking. Phil
On Tue, 2009-06-16 at 13:50 -0400, Alfred von Campe wrote:> I have a CentOS 5.3 VM running under VMware on a WIndows XP laptop. > Everything works fine when connected to the network. However, > removed from the network, most everything in the CentOS VM takes > minutes to complete. For instance, starting a new Terminal window > takes over 3 minutes. I did an strace, and there are a couple of > long waits when trying to open a socket (/tmp/.ICE-unix/XXXXX for > instance).--- cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. ::1 localhost.localdomain localhost john
Are you running VMWare Workstation or Server? I am running VMWare Workstation under MS Vista with a bunch of Centos guest VMs. I noticed that when my Vista host network connection changes state (becomes unavailable or becomes available for any reason) that the VMWare software switch has real trouble. I often lose my ability to DHCP, for example. Or perhaps DNS is impacted. It is my feeling that their networking code is just not very robust. Would using shared folders be a viable alternative? -geoff --------------------------------- Geoff Galitz Blankenheim NRW, Germany http://www.galitz.org/ http://german-way.com/blog/
On Tue, 2009-06-16 at 13:50 -0400, Alfred von Campe wrote:> For instance, starting a new Terminal window > takes over 3 minutes.--- Open a terminal window and type cat /etc/hosts and post it.
On Tue, Jun 16, 2009 at 1:50 PM, Alfred von Campe<alfred at von-campe.com> wrote:> I have a CentOS 5.3 VM running under VMware on a WIndows XP laptop. > Everything works fine when connected to the network. ?However, > removed from the network, most everything in the CentOS VM takes > minutes to complete. ?For instance, starting a new Terminal window > takes over 3 minutes. ?I did an strace, and there are a couple of > long waits when trying to open a socket (/tmp/.ICE-unix/XXXXX for > instance). > > The host and the VM can ping each other fine, but any access to the > VM (either external or from within) eventually succeeds, but it takes > a long time. ?First, I thought I'd reduce the default socket timeout > (which I believe is set to around 90 seconds), but I can't find where > to do that on a system wide level. ?But I really need to figure out > what is causing the problem in the first place. ?I'm assuming the > network is somehow misconfigured, but I don't know how. > > AlfredThis is a classic sign of DNS query timeouts. When you are connected to the network the system is making DNS queries which respond quickly. When you are not connected, the host makes DNS queries and waits for a response. The timeout is a minute or so, so you will see a long delay in any program that tries to resolve DNS. Many programs use DNS even if it's not entirely obvious why. You didn't say which virtual network this machine is connected to, but you probably want to use the NAT network and allow the VM to receive the DNS server configuration via DHCP.