Table of Contents#
- Prerequisites
- Method 1: Install Open VM Tools (Recommended)
- 2.1 Update System Packages
- 2.2 Install Open VM Tools
- 2.3 Verify Installation
- Method 2: Install from VMware Tools ISO (Legacy)
- 3.1 Mount the VMware Tools ISO
- 3.2 Extract and Install the Tools
- 3.3 Verify Installation
- Post-Installation Steps
- Troubleshooting Common Issues
- Conclusion
- References
Prerequisites#
Before starting, ensure:
- A Ubuntu 22.04 VM running on a VMware hypervisor (Workstation, Fusion, ESXi, etc.).
- The VM is powered on and you have sudo privileges (administrative access).
- Internet connectivity (to download packages for Method 1).
Method 1: Install Open VM Tools (Recommended)#
Open VM Tools (open-vm-tools) is the official open-source replacement for VMware Tools. It is pre-packaged in Ubuntu’s repositories, making installation quick and straightforward.
2.1 Update System Packages#
First, update your Ubuntu package list to ensure you install the latest version of Open VM Tools:
sudo apt update2.2 Install Open VM Tools#
Install the appropriate package based on your Ubuntu 22.04 setup:
For Desktop Environments (GNOME, KDE, etc.):#
If you’re using a GUI-based Ubuntu 22.04 (e.g., the default GNOME desktop), install open-vm-tools-desktop to enable advanced features like shared folders, clipboard sharing, and drag-and-drop:
sudo apt install open-vm-tools-desktop -yFor Server (Headless) Environments:#
If you’re running Ubuntu 22.04 as a server (no GUI), install the base open-vm-tools package:
sudo apt install open-vm-tools -y2.3 Verify Installation#
To confirm Open VM Tools is installed and running, check the status of the vmtoolsd service:
sudo systemctl status vmtoolsdYou should see output similar to:
● vmtoolsd.service - Service for virtual machine monitor to communicate with the host
Loaded: loaded (/lib/systemd/system/vmtoolsd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-05-20 10:30:00 UTC; 5min ago
Main PID: 1234 (vmtoolsd)
Tasks: 1 (limit: 4567)
Memory: 2.3M
CPU: 1.2s
CGroup: /system.slice/vmtoolsd.service
└─1234 /usr/bin/vmtoolsd
Note: If the service is not running, start it with:
sudo systemctl start vmtoolsdMethod 2: Install from VMware Tools ISO (Legacy)#
If you need to use the official VMware Tools ISO (e.g., for compatibility with older hypervisors), follow these steps. This method is less common today but still valid for specific scenarios.
3.1 Mount the VMware Tools ISO#
-
Power on your Ubuntu 22.04 VM.
-
In the VMware hypervisor menu:
- VMware Workstation/Fusion: Go to
VM > Install VMware Tools(orUpdate VMware Toolsif already installed). - ESXi/vSphere: Right-click the VM >
Guest OS > Install VMware Tools.
This mounts the VMware Tools ISO (
linux.iso) to your VM’s CD/DVD drive. - VMware Workstation/Fusion: Go to
3.2 Extract and Install the Tools#
-
Create a temporary directory to mount the ISO:
mkdir -p /mnt/cdrom -
Mount the ISO:
sudo mount /dev/cdrom /mnt/cdrom -
List the contents of the mounted ISO to find the VMware Tools tarball (filename format:
VMwareTools-<version>-<build>.tar.gz):ls /mnt/cdrom -
Extract the tarball to
/tmp:tar -zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ -
Navigate to the extracted directory (replace
<version>with the actual version from the tarball name):cd /tmp/vmware-tools-distrib/ -
Run the installer script with sudo:
sudo ./vmware-install.pl -
Follow the on-screen prompts. Press
Enterto accept default values for most options (e.g., installation path, component selection).
3.3 Verify Installation#
After installation, check if the vmtoolsd service is running:
sudo systemctl status vmtoolsdYou should see active (running) in the output.
Post-Installation Steps#
For optimal functionality, restart your Ubuntu VM after installing VMware Tools:
sudo rebootAfter rebooting, test key features like:
- Shared Folders: Access host directories from the VM (configured via VMware settings).
- Clipboard Sharing: Copy/paste text between host and VM.
- Display Resolution: The VM should automatically adjust to the window size (for GUI desktops).
Troubleshooting Common Issues#
Issue 1: vmtoolsd Service Not Starting#
If the service fails to start, check for errors in the logs:
journalctl -u vmtoolsdCommon fixes:
- Reinstall Open VM Tools:
sudo apt reinstall open-vm-tools open-vm-tools-desktop - Ensure the VM is not running in "Safe Mode" or has restricted resources.
Issue 2: Shared Folders Not Working#
- Verify shared folders are enabled in VMware VM settings (
VM > Settings > Options > Shared Folders). - Ensure the
open-vm-tools-desktoppackage is installed (for GUI) oropen-vm-tools(for server). - Check if the shared folder is mounted:
mount | grep vmhgfs-fuse
Issue 3: Display Resolution Not Adjusting (GUI Desktops)#
- Ensure
open-vm-tools-desktopis installed:sudo apt install open-vm-tools-desktop -y - Restart the display manager (e.g., for GNOME):
sudo systemctl restart gdm3
Conclusion#
Installing VMware Tools on Ubuntu 22.04 is straightforward, with Open VM Tools being the recommended method for most users. It provides all essential features and is maintained via Ubuntu’s package manager, ensuring easy updates. For legacy scenarios, the VMware Tools ISO method remains a viable alternative.
With VMware Tools installed, your Ubuntu VM will run more efficiently and integrate seamlessly with your VMware hypervisor.