Wednesday 4 March 2009

Network messup in Ubuntu Jaunty when using VMware

While I was testing a brand new Ubuntu Jaunty (9.10 alpha) installation on my Fujitsu-Siemens laptop to checkout whether it better reacts to the suspend issue, I stumbled over another problem: after installing VMware Workstation the network setup would get messed up at every boot requiring manual tweaking.

It turns out that the NetworkManager service, in its great wisdom, was trying to automatically initialize the vmnet1/vmnet8 virtual interfaces created by VMware (it's using them as network injection points for the VM machines and they are managed by the vmware startup script). That means running the DHCP client over them and acquiring some garbage IP settings (these settings are supposed to be acquired by the contained VMware virtual machines, not by the physical box!). Subsequently this was installing a phoney VMware default route and DNS server entries, overriding the expected wireless settings, which in turn renders networking useless.

It seems this new behavior may have been triggered by a change in the [un]managed mode of the NetworkManager service in Ubuntu Jaunty. However, trying to change the managed=true/false statement in /etc/NetworkManager/nm-system-settings.conf yielded no results.

Luckily you can easily fix this by adding specific configuration files in /etc/NetworkManager/system-connections/ to prevent NetworkManager from touching the VMware network interfaces. You can use the following commands (assuming you kept the default interface numbering):



cat > /etc/NetworkManager/system-connections/vmnet1 << EOF
[connection]
id=vmnet1
autoconnect=false
EOF

cat > /etc/NetworkManager/system-connections/vmnet8 << EOF
[connection]
id=vmnet8
autoconnect=false
EOF

1 comment:

  1. Gnome network manager has been worthless for years now. VM-ware or not, this piece of schitt just doesn't work. Look at the web, thousands of postings asking for help on this 'krap network manager.

    Ubuntu just doesn't get it.

    New motto; "Mark Shuttleworth the inventor of the nevernet.

    ReplyDelete