Installing VMware Tools in a Linux virtual machine on Centos 7 and Red Hat 7

To install VMware Tools in a Linux guest operating system using Compiler:

1-Ensure that your Linux virtual machine is powered on.

2- If you are running a GUI interface, open a command shell.

Note: Log in as a root user, or use the sudo command to complete each of these steps.

3-Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tool

4-Click OK.

Note: In some cases, verify that the CDROM device is Connected from within the Edit Settings option of the virtual machine.

5-  To create a mount point, run:

mkdir /mnt/cdrom

6- To mount the CDROM, run:

mount /dev/cdrom /mnt/cdrom

7- To copy the Compiler gzip tar file to a temporary local directory, run:

cp /mnt/cdrom/VMwareTools-version.tar.gz /tmp/

Where version is the VMware Tools package version.

8-  To determine the version of VMware tools, run:

ls /mnt/cdrom

You see output similar to:

# VMwareTools-5.0.0-12124.tar.gz

9- To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:

cd /tmp
tar -zxvf VMwareTools-version.tar.gz

10- To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:

cd vmware-tools-distrib
./vmware-install.pl

Notes:
Complete the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on methods to install these packages.
It is normal for the console screen to go blank for a short time during the installation when the display size changes.
Some warnings or errors are normal, like when a files does not exist.
Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.

11- If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.

12-  To start VMware Tools running in the background during an X Window session, run:

/usr/bin/vmware-toolbox &

13- Depending on your environment, you may need to unmount the CD-ROM. To unmount the CD-ROM, run:

umount /mnt/cdrom

14- Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.

15-To remove VMware Tools installation packages, run:

cd
rm /tmp/VMwareTools-version.tar.gz
rm -rf /tmp/vmware-tools-distrib

That is all

Continue Reading

How to set a static MAC address on VMware ESXi virtual machine

Question: I want to assign a static MAC address to a virtual machine (VM) on VMware ESXi. However, when I attempt to start a VM with a static MAC address, the VM fails to start and throws an error “The MAC Address entered is not in the valid range. Valid values are between “xx:xx:xx:xx:xx:xx” and “xx:xx:xx:xx:xx”.

When you create a VM on VMware ESXi, each network interface of the VM is assigned a dynamically generated MAC address. If you want to change this default behavior and assign a static MAC address to your VM, here is how to do it.

14726591627_338dc582dd_o

As you can see above, VMware’s vSphere GUI client already has a menu for setting a static MAC address for a VM. However, this GUI-based method only allows you to choose a static MAC address from 00:50:56:xx:xx:xx, which is VMware-reserved MAC address range. If you attempt to set any arbitrary MAC address outside this MAC range, you will fail to launch the VM, and get the following error.

3463018452_f3526cffda

Fortunately, there is a workaround to this limitation. The solution is, instead of using vSphere GUI client, editing .vmx file of your VM directly, after logging in to the ESXi host.

First, turn off the VM to which you want to assign a static MAC address.

Enable SSH access to your ESXi host if you haven’t done it already. Then log in to the ESXi host via SSH.

Move to the directory where your VM’s .vmx file is located:

# cd vmfs/volumes/datastore1/[name-of-vm]

Open .vmx file with a text editor, and add the following fields. Replace the MAC address field with your own.

#ethernet0.addressType = "static"
#ethernet0.checkMACAddress = "false"
#ethernet0.address = "00:0c:29:1f:4b:ac"

Now you should be able to launch a VM with the static MAC address you defined in .vmx file.

Continue Reading