Troubleshooting Linux VM connectivity issues

This topics covers troubleshooting steps for resolving network connectivity issues for Linux VMs running in Skytap Cloud.

Contents

Resolving connection issues caused by a missing IP address

Some Linux guest operating systems attempt to establish a network connection before the Skytap Cloud DHCP server has assigned the VM a valid IP address. The VM must have a valid IP address to have network connectivity.

Use the following steps to identify and resolve this issue. The exact commands vary, depending on the OS.

  1. In the Linux guest OS, check the network interface configuration to see if the network adapter has an IP address.

     ifconfig
    
  2. If the network adapter does not display an IP address, disable the network adapter in the guest OS.
     ifdown eth0
    

    Replace eth0 with the name of the network adapter. The ifconfig command displays the network adapter name.

  3. Wait a moment and then re-enable the network adapter.
     ifup eth0
    
  4. Check the network interface configuration again to see if the network adapter now has an assigned IP address.
     ifconfig
    
  5. If the network adapter now has an IP address, retry the network connection. If it does not have an IP address, you may be experiencing a different issue.

If the above fix worked, resolve this issue more permanently by adding the following lines to the network adapter configuration file (For example, /etc/sysconfig/network-scripts/ifcfg-eth0).

DHCLIENTARGS="-nw"
PERSISTENT_DHCLIENT=yes

Resolving connection issues that occur after the VM is suspended

Some Linux VMs may have issues connecting to the network once the VM is suspended and then resumed.

If your VM isn’t connecting to the network, try the following troubleshooting steps:

Install the netplug package (Ubuntu Server, CentOS, Fedora, RHEL)

In some cases, the VM does not recognize the network adapter after the VM has been suspended. Installing and running netplug can resolve this issue.

Ubuntu Server

To install netplug on Ubuntu Server, use the following command:

sudo apt-get install netplug

Ubuntu automatically enables and starts netplug upon installation.

CentOS, Fedora, and RHEL

To install and start netplug on CentOS, Fedora, and RHEL, use the following commands:

sudo yum install netplug
chkconfig netplugd on
service netplugd start

Change the network adapter type (all Linux)

Linux VMs that use the e1000 network adapter type may not be able to connect to the network after Linux enters standby mode and is suspended. If a VM uses the e1000 network adapter type, remove the e1000 network adapter, and then add a vmxnet3 network adapter. For instructions, see Attaching VMs to networks.

You may need to install or upgrade VMware Tools to use the vmxnet3 network adapter type. For instructions, see Installing and upgrading VMware Tools on Linux VMs.

CentOS 6

The vmxnet adapter isn’t supported in CentOS 6. If network performance is poor for a CentOS 6 VM, check the network adapter type. If a vmxnet adapter is installed, remove it and add a different network adapter, such as vmxnet3.

Resolving connection issues that occur after a VM is added to an environment

If you add a VM to an environment and it uses the same hostname, IP, or MAC address as another VM in the same environment, Skytap Cloud change the network settings to provide unique values for the new VM. Though Skytap Cloud automatically changes the network settings for you, on Red Hat and Oracle VMs, the old network settings persist in the Linux kernel. You must manually clear the old settings for the network to function properly.

To clear out the old settings in the VM operating system
  1. Set the minimal DHCP settings required for target NIC – eth0. For example, the /etc/sysconfig/network file should contain the following line:

     NETWORKING=yes
    

    The NETWORKING variable must be set to yes if you want networking to start at boot time.

  2. The /etc/sysconfig/network-scripts/ifcfg-eth0 file should contain only the following lines:

     DEVICE=eth0
     BOOTPROTO=dhcp
     ONBOOT=yes
    
  3. Remove the networking interface rules file from the kernel so that it can be regenerated:

     rm -f /etc/udev/rules.d/70-persistent-net.rules
    
  4. Restart the VM:

     shutdown –r now
    

    The VM should boot up correctly on DHCP and get an IP address.

  5. To verify the change, re-run:

     service network restart