How to configure the network on VMware ESX from the Ubuntu command line


Recently, I needed help with Unix to solve a problem with a network card that was identified as “undetectable” by ESX 3.5 of an Ubuntu virtual machine. Actually, the problem was that I could not configure the network because it was not detected by the system.

First, I thought that I needed to install the VMware tools on this system but I had no clue how to do this. I assumed that it was the same method as any other virtual machine (in the toolbar, Inventory -> Virtual Machine -> Install / Upgrade VMware Tools). But, after connecting to the VMware console, I saw that VMware was started but never finished.

In the virtual machine options, I realized that an ISO was configured as part of the CD.

I connected to the console of the Ubuntu virtual machine:

As a logged-in user, I executed the order sudo su to enter as a root user.

I set up the CD-rom drive: mount /media/cdrom0.

I found a compressed file, VmWaretools-3.5.0-82663.tar.gz, that I copied and decompressed into a temporary folder:

cd /media/cdrom0

cp VmWaretools-3.5.0-82663.tar.gz /tmp/

tar -xvf VmWaretools-3.5.0-82663.tar.gz

cd vmware-tools-distrib

Then, I launched the installation: ./vmware-install.pl

For all the questions that popped up, I clicked Enter to leave all the defaults.

After that, I checked one more time that the interfaces file was properly configured: cd /etc/network/

I edited the file with vi interfaces

auto eth0

iface eth0

INET static address 192.168.1.150

netmask 255.255.0.0

Gateway 192.168.1.1

I checked that all the information was correct. (then I turned off the virtual machine and then restarted it): halt.

As I continued, the network still was not working. This is when it occurred to me to change eth0 by eth1, since the server has several network cards. After performing a /etc/init.d/networking restart to restart the network configuration, I began to respond to ping. J

The content of this article was inspired by XaviXaus.


Leave a Reply

Your email address will not be published. Required fields are marked *