Troubleshooting Linux VM connectivity issues
This topics covers troubleshooting steps for resolving network connectivity issues for Linux VMs running in Skytap Cloud.
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.
In the Linux guest OS, check the network interface configuration to see if the network adapter has an IP address.
- If the network adapter does not display an IP address, disable the network adapter in the guest OS.
eth0with the name of the network adapter. The
ifconfigcommand displays the network adapter name.
- Wait a moment and then re-enable the network adapter.
- Check the network interface configuration again to see if the network adapter now has an assigned IP address.
- 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,
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).
- Change the network adapter type (all Linux).
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.
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
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.
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.
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
Set the minimal DHCP settings required for target NIC – eth0. For example, the
/etc/sysconfig/networkfile should contain the following line:
The NETWORKING variable must be set to yes if you want networking to start at boot time.
/etc/sysconfig/network-scripts/ifcfg-eth0file should contain only the following lines:
DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
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
Restart the VM:
shutdown –r now
The VM should boot up correctly on DHCP and get an IP address.
To verify the change, re-run:
service network restart