Install VMware Tools for Ubuntu guest on ESXi host

1) Connect to the server with your vSphere Client.
2) Ensure you have CDROM hardware connected to your VM.
Select your VM, then click on Edit Settings|Hardware tab|CD/DVD Drive 1 and ensure it is set to connect at power-on:

3) Start your Ubuntu VM.
4) Ensure you have the proper prerequisite packages:
Ubuntu installs in a very stripped-down configuration. You will need to install kernel headers and the GCC compiler to be able to build VMware tools.  Login to Ubuntu and issue the following commands:
# sudo apt-get install gcc
# sudo apt-get install build-essential binutils linux-headers-$(uname -r)
5) Connect VMware Tools
Once these packages are installed, select your Ubuntu VM in the vSphere Client and right-click on your VM. Select Guest – Install/Upgrade VMware Tools

This will transparently connect the VMware Tools CD into your virtual machine.
6) Mount the CDROM
# sudo mount /dev/scd0 /media/cdrom
7)  Copy the VMwareTools-8.3.2-257589.tar.gz on the CDROM to the /tmp directory
cp /media/cdrom/VMwareTools-8.3.2-257589.tar.gz /tmp
8)  Untar the VMware Tools package
# tar -zxvf VMwareTools-8.3.2-257589.tar.gz
9)  Change to the VMware tools directory.
# cd /tmp/vmware-tools-distrib
10) Run the installer
# sudo ./

Follow the instructions presented in the install script.

UPDATE:  Or just type in “sudo apt-get install open-vm-tools” or “sudo apt-get install --no-install-recommends open-vm-tools"

Fixing the "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" error when setting up VMware ESXi NFS data store

If you try to add a remote NFS data store forVMware Esxi, you may encounter this error:
Call “HostDatastoreSystem.CreateNasDatastore” for object “ha-datastoresystem” on ESX “{ESX server}” failed:

This is often a firewall issue, and the very first place you should look. Browse to Configuration/Software/Security Profile and verify that the  “NFS Client” is listed under “Outgoing Connections:”

If you do not see the NFS Client entry, click “Properties” and enable it:

Now retry the connection to the NFS data store. If you still cannot connect, open a command prompt on the ESXi console and issue a “vmkping <hosthame>” command where the hostname is your NFS server.  If you receive a successful ping, your VMKernel is setup correctly.  If it returns this, you have a VMKernel problem:

# vmkping
*** vmkernel stack not configured ***

You now need to examine your Virtual Switch settings to verify the presence of a VMKernel Port.  Browse to Configuration/Hardware/Networking and examine your settings.  You should see an entry for VMKernel Port; if you do not, your configuration will look like something like this:

To fix this, click the “Properties” link in the upper right corner to examine the properties of your vSwitch0.  You will notice that there is no VMKernel listed:

Click the “Add” button and select the VMKernel connection type:

You will be taken to the first screen of a multi-step wizard.  Keep the default properties you see on the first screen of the wizard:

The second screen is IP Connection Settings. Here, select “Use the following IP settings” and enter a unique IP address and your network’s subnet mask:

Next, click the “Edit” button and enter your network’s default gateway:

You are now done with the wizard, and should see your new VMkernel. Click the “Finish” button:

You should now see VMkernal in the vSwitch0 properties:

You should also now see it in your main vSwitch0 properties:

Now retry adding your NFS store, and you should now be able to do so successfully.

A vmkping should also work now:
# vmkping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.121 ms
64 bytes from icmp_seq=1 ttl=64 time=0.153 ms
64 bytes from icmp_seq=2 ttl=64 time=0.137 ms