VMware Tools is a suite of utilities that enhances the performance and management of VMware virtual machines. Installing VMware Tools on your guest Linux operating system can improve performance, enable features such as shared folders and clipboard sharing, and simplify virtual machine management.
In this guide, we will show you how to install VMware Tools using yum on CentOS, RHEL, and other Red Hat-based systems.
Step 1: Prepare the Virtual Machine
Before installing VMware Tools, ensure that your virtual machine is running and that you are logged in as a user with sudo privileges.
Step 2: Install Required Packages
Some packages are required for the installation of VMware Tools. Open a terminal and run the following command to install them:
sudo yum install -y perl gcc make kernel-headers kernel-devel
This command installs Perl, GCC, Make, kernel headers, and kernel development packages, which are necessary for building and installing VMware Tools.
Step 3: Attach the VMware Tools ISO to the Virtual Machine
In the VMware Workstation or vSphere Client, perform the following steps:
- Select your virtual machine.
- Click on “VM” in the menu bar (or right-click the virtual machine), then choose “Install VMware Tools” or “Guest > Install/Upgrade VMware Tools.”
This action will mount the VMware Tools ISO file as a virtual CD-ROM drive inside the virtual machine.
Step 4: Mount the VMware Tools ISO
Create a directory to mount the VMware Tools ISO in the Linux guest operating system:
sudo mkdir -p /mnt/cdrom
Next, mount the ISO to the directory you created:
sudo mount /dev/cdrom /mnt/cdrom
Step 5: Extract and Install VMware Tools
Copy the VMware Tools installer to a temporary directory:
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp/
Go to the temporary directory:
cd /tmp
Extract the VMware Tools installer:
tar xzvf VMwareTools-*.tar.gz
Go to the extracted VMware Tools directory:
cd vmware-tools-distrib
Run the installer:
sudo ./vmware-install.pl -d
The -d flag sets the installer to use default settings. You can omit the -d flag if you want to customize the installation options.
Example:
# ./vmware-install.pl Creating a new VMware Tools installer database using the tar4 format. Installing VMware Tools. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc/rc.d] What is the directory that contains the init scripts? [/etc/rc.d/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware-tools] The path "/usr/lib/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the documentation files? [/usr/share/doc/vmware-tools] The path "/usr/share/doc/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Tools 9.4.0 build-1280544 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes] Initializing... Making sure services for VMware Tools are stopped. Stopping vmware-tools (via systemctl): [ OK ] The module vmci has already been installed on this system by another installer or package and will not be modified by this installer. The module vsock has already been installed on this system by another installer or package and will not be modified by this installer. The module vmxnet3 has already been installed on this system by another installer or package and will not be modified by this installer. The module pvscsi has already been installed on this system by another installer or package and will not be modified by this installer. The module vmmemctl has already been installed on this system by another installer or package and will not be modified by this installer. The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [no] The vmxnet driver is no longer supported on kernels 3.3 and greater. Please upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e) The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [no] VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. This feature can be enabled/disabled by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] No X install found. Creating a new initrd boot image for the kernel. Starting vmware-tools (via systemctl): [ OK ] The configuration of VMware Tools 9.4.0 build-1280544 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 "/usr/bin/vmware-toolbox-cmd" from the command line. To enable advanced X features (e.g., guest resolution fit, drag and drop, and file and text copy/paste), you will need to do one (or more) of the following: 1. Manually start /usr/bin/vmware-user 2. Log out and log back into your desktop session; and, 3. Restart your X session. Enjoy, --the VMware team
Step 6: Clean Up and Restart
After the installation is complete, remove the VMware Tools installer files:
cd /tmp rm -rf vmware-tools-distrib VMwareTools-*.tar.gz
Unmount the VMware Tools ISO:
sudo umount /mnt/cdrom
Finally, reboot your virtual machine to complete the installation:
sudo reboot
Alternative Installation
As another option, you can use yum to install the open-source implementation of VMware Tools, called Open VM Tools, on CentOS, RHEL, and other Red Hat-based systems. In fact, Open VM Tools is recommended by VMware for guest operating systems.
Here’s a step-by-step guide to installing Open VM Tools using yum:
Step 1: Update Your System
First, update your system by running the following command:
sudo yum update
Step 2: Install Open VM Tools
Now, install Open VM Tools using the following command:
sudo yum install -y open-vm-tools
This command installs the Open VM Tools package and its dependencies.
Step 3: Enable and Start the Open VM Tools Service
Once the installation is complete, enable and start the vmtoolsd service by running the following commands:
sudo systemctl enable vmtoolsd sudo systemctl start vmtoolsd
These commands enable the Open VM Tools service to start automatically at boot and start the service immediately.
Step 4: Verify the Installation
You can verify that Open VM Tools is running by executing the following command:
systemctl status vmtoolsd
If the service is running correctly, you should see output indicating that the service is active and running.
Conclusion
There you go. You have successfully installed VMware Tools (Open VM Tools) using yum on CentOS, RHEL, and other Red Hat-based systems. With VMware Tools installed, your virtual machine will benefit from better performance, enhanced features, and easier management.
Please feel free to leave comments and suggest improvements to this guide. Your feedback helps us improve our tutorials.
FAQ
-
What is the purpose of VMware Tools?
VMware Tools is a suite of utilities that enhances the performance and management of VMware virtual machines. It enables features such as shared folders and clipboard sharing, and simplifies virtual machine management.
-
What are the prerequisites for installing VMware Tools?
Before installing VMware Tools, ensure that your virtual machine is running and that you are logged in as a user with sudo privileges. Some packages like Perl, GCC, Make, kernel headers, and kernel development packages are also required for the installation.
-
What is the alternative to VMware Tools?
An alternative to VMware Tools is Open VM Tools, which is an open-source implementation of VMware Tools. It is recommended by VMware for guest operating systems and can be installed using yum on CentOS, RHEL, and other Red Hat-based systems.
-
How can I verify the installation of Open VM Tools?
You can verify that Open VM Tools is running by executing the command ‘systemctl status vmtoolsd’. If the service is running correctly, you should see output indicating that the service is active and running.
-
What should I do after installing VMware Tools?
After the installation of VMware Tools, it is recommended to reboot your virtual machine to complete the installation. This ensures that all changes take effect properly.
4 Comments
thanks for this. the vmware guide for this really sucks – so many dependencies missing etc. saved me hours.
This is not recommended by VMWare… You should be using the OS bundled VMWare tools. (open-vm-tools)
yum install open-vm-tools
See http://kb.vmware.com/kb/2073803 and http://partnerweb.vmware.com/GOSIG/CentOS_7.html#Tools
Shaddup! This worked for me!
Thanks for the information. Saved us a ton of time.
The simple yum install Option 1 works perfectly for CentOs 7, you just just need to remember to manually start the service or reboot.