It seems that using particular combinations of VMWare Server and Linux Kernel version(s) while installing VMWare Tools under Linux guest machines, may render the virtual machine’s networking down.
This page provides a “hacky” workaround to solve this situation. There might be other deeper and more proper solutions out there but I came up with this one because it is very simple to put in place and not harmful at all.
So, let’s imagine this scenario:
- VMWare Server 1.0.2 (other versions might apply as well, not tested thought)
- Debian Linux 4.0 Etch guest, running 2.6.18-6-686 kernel (other versions might apply as well, not tested thought)
- VMWare Tools 1.0.2-39867 (other versions might apply as well, not tested thought)
Then, after the VMWare Tools get installed, the screen shows something like this:
The configuration of VMware Tools 1.0.2 build-39867 for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X session.
To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/networking start
Enjoy,
--the VMware team
Right now the networking does not work. If you try to see what is going on, you should see something like this:
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1556 (1.5 KiB) TX bytes:1556 (1.5 KiB)
That’s it. No network interfaces. If you go for VMWare Tools’ installer suggested steps, the networking should work again:
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/networking start
E.g.:
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:23:95:ED
inet addr:10.123.16.83 Bcast:10.123.16.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe23:95ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4425 errors:0 dropped:0 overruns:0 frame:0
TX packets:7426 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:316655 (309.2 KiB) TX bytes:494628 (483.0 KiB)
Interrupt:169 Base address:0x1424
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1556 (1.5 KiB) TX bytes:1556 (1.5 KiB)
The issue here is that this settings will be lost upon restart. I guess it is a matter of having the proper modules loaded properly but I have not been able to find the proper configuration files combination to get this reliably enough.
Proposed solution/workaround
Basically, create a simple script that does what VMWare Tools’ intaller suggests and have it invoked upon system restart.
The script should contain the following:
#! /bin/bash
#
# vmxnet driver loader - loads the vmware network driver.
#
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/networking start
This file should be created under /etc/init.d folder, with 755 permissions (i.e. chmod 755 filename). The, to have it invoken upon restart you could do this:
update-rc.d vmxnet-loader defaults 10
Adding system startup for /etc/init.d/vmxnet-loader ...
/etc/rc0.d/K10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc1.d/K10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc6.d/K10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc2.d/S10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc3.d/S10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc4.d/S10vmxnet-loader -> ../init.d/vmxnet-loader
/etc/rc5.d/S10vmxnet-loader -> ../init.d/vmxnet-loader
I suggest having the initscript invoked with a lower sequence code (i.e. 10) so the networking gets activated before other services which may use and/or need it.
That’s it. Now your virtual machine’s networking should be fine upon restarts.
See Also