Knowledge Base

Search the Knowledge Base: |
Search the Knowledge Base: |
Suspending and Resuming Debian-Based Linux Guests Breaks the Network Connection
Details
Solution
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.
Keywords
Feedback
- KB Article: 1923
- Updated: Aug 14, 2009
- Products:
VMware ACE
VMware ESX
VMware GSX Server
VMware Player
VMware Workstation - Product Versions:
VMware ESX 2.5.x
VMware GSX Server 3.x (Linux)
VMware GSX Server 3.x (Windows)
VMware Player 1.x (Linux)
VMware Player 1.x (Windows)
VMware Workstation 6.x (Linux)
VMware Workstation 6.x (Windows)

