If you’re looking to learn how to install vmware tool in linux, you’ve come to the right place. Integrating guest tools into your Linux virtual machine improves display resolution and clipboard sharing. This guide walks you through the entire process step by step, ensuring a smooth setup.
VMware Tools are essential drivers and utilities that enhance the performance of your virtual machine. They enable features like seamless mouse movement, drag-and-drop, and better graphics. Without them, your Linux VM feels sluggish and limited.
In this article, we cover everything from prerequisites to troubleshooting. Whether you’re a beginner or an experienced user, you’ll find clear instructions. Let’s get started with the basics first.
Prerequisites For Installing VMware Tools On Linux
Before you begin, make sure your system meets a few requirements. You need a working Linux virtual machine inside VMware Workstation, Player, or ESXi. Also, ensure you have sudo or root access to install packages.
- A Linux distribution installed (Ubuntu, CentOS, Debian, Fedora, etc.)
- VMware software (Workstation, Player, or vSphere) running on the host
- Internet connection for downloading updates
- Basic familiarity with the terminal
It’s also wise to update your package manager first. This avoids conflicts during installation. For example, on Ubuntu, run sudo apt update && sudo apt upgrade.
If you’re using a minimal installation, you might need to install build tools like gcc, make, and kernel headers. We’ll cover that in the steps below.
How To Install Vmware Tool In Linux
Now we dive into the core process. Follow these steps carefully to install VMware Tools on your Linux VM. The method is similar across most distributions, but we’ll note specific commands for Debian-based and Red Hat-based systems.
Step 1: Mount The VMware Tools ISO
First, you need to mount the VMware Tools installation ISO. In your VM window, go to the VMware menu. Select “VM” then “Install VMware Tools…” (or “Reinstall VMware Tools” if already installed).
This attaches a virtual CD-ROM containing the tools. If you’re using ESXi, the option is under “Actions” > “Guest OS” > “Install VMware Tools”.
After clicking, you’ll see a pop-up confirming the mount. On Linux, the ISO usually appears as a CD-ROM device, often at /dev/cdrom or /dev/sr0.
Step 2: Create A Mount Point And Mount The ISO
Open a terminal in your Linux VM. Create a directory to mount the ISO:
sudo mkdir /mnt/cdrom
Then mount the ISO:
sudo mount /dev/cdrom /mnt/cdrom
If your system uses a different device name, check with lsblk or dmesg | grep -i cdrom. On some systems, you might need to use /dev/sr0.
Once mounted, verify the contents:
ls /mnt/cdrom
You should see a file named VMwareTools-*.tar.gz (the asterisk represents the version number).
Step 3: Extract The Tarball
Copy the tarball to a temporary directory, such as /tmp:
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp/
Navigate to /tmp and extract it:
cd /tmp
tar -xzf VMwareTools-*.tar.gz
This creates a folder named vmware-tools-distrib. Change into that directory:
cd vmware-tools-distrib
Step 4: Install Required Dependencies
VMware Tools needs certain packages to compile kernel modules. Without them, the installer will fail. Install the following based on your distribution.
For Debian/Ubuntu:
sudo apt install build-essential linux-headers-$(uname -r)
For CentOS/RHEL/Fedora:
sudo yum install gcc make kernel-devel
Or for newer versions using dnf:
sudo dnf install gcc make kernel-devel
If you’re using a different distro, install the equivalent packages. The key is to have the kernel headers matching your running kernel version.
Step 5: Run The VMware Tools Installer
Now execute the installation script. Use sudo for root privileges:
sudo ./vmware-install.pl
The installer will ask several questions. In most cases, you can accept the default answers by pressing Enter. It will compile modules and copy files to the system.
If you see prompts about “What is the location of the directory of C header files”, just press Enter to accept the default. The script handles most configurations automatically.
After completion, you’ll see a message like “The installation of VMware Tools 12.x.x build-xxxxx for Linux completed successfully.”
Step 6: Reboot The Virtual Machine
To load the new kernel modules, reboot your VM:
sudo reboot
After restarting, log in and check if VMware Tools is running:
vmware-toolbox-cmd -v
This should display the version number. You can also verify with:
systemctl status vmware-tools
If everything is working, you’ll see “active (running)”.
Post-Installation Verification And Configuration
After installing, test the features. Try resizing the VM window—the display should adjust automatically. Copy text from the host and paste it into the guest. If these work, the installation was successful.
You can also run the VMware Tools control panel:
vmware-toolbox
This opens a GUI where you can adjust settings like time sync and clipboard sharing. For headless servers, use the command-line version:
vmware-toolbox-cmd
Common commands include vmware-toolbox-cmd timesync enable to sync time with the host.
Common Issues And Fixes
Sometimes the installation doesn’t go smoothly. Here are typical problems and solutions.
Issue: “Kernel headers not found”
This means the headers don’t match your kernel. Reinstall them with:
sudo apt install linux-headers-$(uname -r)
If that fails, try updating your kernel first.
Issue: “Unable to find the compiler”
Install GCC and make as shown earlier. On minimal systems, these might be missing.
Issue: “Module compilation failed”
This can happen due to a kernel update. Re-run the installer with:
sudo ./vmware-install.pl
It will rebuild the modules.
Alternative Method: Using Open VM Tools
Many modern Linux distributions include open-vm-tools in their repositories. This is an open-source version of VMware Tools. It’s easier to install and often works better with newer kernels.
To install open-vm-tools:
On Debian/Ubuntu:
sudo apt install open-vm-tools
On CentOS/RHEL:
sudo yum install open-vm-tools
After installation, enable and start the service:
sudo systemctl enable --now open-vm-tools
This method avoids manual compilation. It’s recommended for most users, especially on modern distributions. However, if you need the full VMware Tools suite (like the toolbox GUI), stick with the official installer.
When To Use Official VMware Tools Vs Open VM Tools
Use official VMware Tools if you need advanced features like shared folders or drag-and-drop. Open VM Tools covers basic functionality like time sync and mouse integration. For most desktop use, open-vm-tools is sufficient.
If you’re running a server, open-vm-tools is often the better choice because it’s easier to maintain. Check your VMware version compatibility—some older versions require the official tools.
Uninstalling VMware Tools
If you need to remove VMware Tools, you can do so easily. For the official installer, run the uninstall script:
sudo /usr/bin/vmware-uninstall-tools.pl
For open-vm-tools, use your package manager:
sudo apt remove open-vm-tools
Or for yum:
sudo yum remove open-vm-tools
After uninstalling, reboot to clean up any remaining modules.
Frequently Asked Questions
Q1: What is the difference between VMware Tools and open-vm-tools?
VMware Tools is the official package from VMware. Open-vm-tools is an open-source alternative included in Linux distros. Both provide similar features, but open-vm-tools is easier to install and update.
Q2: Do I need to install VMware Tools on every Linux VM?
Yes, for optimal performance. Without it, you lose features like dynamic screen resizing, clipboard sharing, and better mouse integration. It also improves network and storage performance.
Q3: Can I install VMware Tools without internet access?
Yes, if you have the ISO mounted from the VMware software. However, you may need to install dependencies from offline repositories or pre-downloaded packages.
Q4: Why does my VMware Tools installation fail on Ubuntu?
Common reasons include missing kernel headers or build tools. Ensure you have build-essential and linux-headers-$(uname -r) installed. Also, check that your kernel is up to date.
Q5: How do I check if VMware Tools is running?
Run vmware-toolbox-cmd -v to see the version. Or use systemctl status vmware-tools (or open-vm-tools) to check the service status.
Final Tips For A Smooth Installation
Always update your system before installing. This reduces the chance of dependency conflicts. If you’re using a GUI, you can also install VMware Tools from the VMware menu by clicking “Install VMware Tools” and following the on-screen prompts.
For headless servers, consider using open-vm-tools for simplicity. It integrates well with systemd and requires less manual intervention.
If you encounter errors, check the log files in /var/log/vmware-install.log for details. This helps identify missing packages or compilation issues.
Remember to reboot after installation. Some modules only load after a restart. After that, enjoy the improved performance and seamless integration.
That covers everything you need to know about how to install vmware tool in linux. Follow these steps, and your virtual machine will run smoothly with all features enabled. If you run into trouble, revisit the troubleshooting section or try the open-vm-tools alternative.