Search the VMware Knowledge Base (KB)
View by Article ID

Suspending and Resuming Debian-Based Linux Guests Breaks the Network Connection (1923)

  • 10 Ratings


When I suspend and resume a guest running Ubuntu Linux, the guest loses its network connection. Why does this happen and what should I do?


To work around this problem, add the following line to /etc/network/interfaces:
   auto eth0

A logical place for this line is just above the line iface eth0 inet dhcp.

Note: During bootup, you might see a message indicating that eth0 is already configured. You can safely ignore the message. The remainder of this article provides more detailed information on why this message appears.

In Debian-based Linux distributions such as Ubuntu, all the information for network interfaces is stored in /etc/network/interfaces. Typically this file contains the following entry for a standard Ethernet adapter:

   auto eth0
   iface eth0 inet dhcp

The second line defines eth0 as a possible adapter, indicating that it uses DHCP to obtain its IP address. The first line specifies that the eth0 adapter is brought up automatically (that is, automatically by the networking scripts).

To bring up and bring down networking interfaces, these distributions use two programs, ifup and ifdown, called from /etc/init.d/networking. (In some Linux distributions, this file is /etc/init.d/network.) Both ifup and ifdown can be used on a specific adapter (ifup eth0) or on all adapters (ifdown -a). Note that ifdown -a brings down all configured networking interfaces (every interface defined via iface ... lines in /etc/network/interfaces), while ifup -a brings up only those interfaces specified as auto (auto eth0).

When you click the Suspend or Resume button in the Workstation user interface, VMware Tools in the guest operating system runs the suspend or resume scripts in /etc/vmware-tools. The suspend script issues the command /etc/init.d/networking stop and the resume script issues /etc/init.d/networking restart. The networking script itself, on a stop, issues ifdown -a, and on a restart, issues ifdown -a;ifup -a. The problem occurs because ifdown -a brings down all of the interfaces, while ifup -a does not bring back eth0 because it is not set to auto.

In Ubuntu (and potentially in other new Debian releases), there is no auto line for eth0 in /etc/network/interfaces. Instead, the file includes these lines:

   mapping hotplug
   script grep
   map eth0

This means that when you perform an action that issues ifup hotplug, the ifup eth0 command is also issued. The hotplug subsystem, while bringing up various devices at system startup, issues ifup hotplug. When you remove devices from your system, hotplug calls ifup hotplug or ifdown hotplug intelligently and takes down networking on your behalf.

Since ifup -a is required to bring up eth0, you need to add the line auto eth0 to /etc/network/interfaces, as explained at the beginning of this article. Note that this can cause the boot process to print a message about eth0 being already configured, as both hotplug and the networking script attempt to bring up eth0. To avoid this, you can remove the mapping section:

   mapping hotplug
   script grep
   map eth0

Now hotplug no longer brings up eth0 at all.


naccessing-network  cannot-use-internet  connection-fails-network  connect-network  lose-network-connectivity  network-connection  network-connection-drop  network-connection-fails  network-connectivity-issues  network-failure  network-issues  network-loss  network-problem  no-network-connectivity  no-network  virtual-network  virtual-network-not-available  virtual-network-not-connected  settings-incorrect-after-vmware-tools-install  linux-guest-networking

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 10 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 10 Ratings