How To Install VMware On Linux
Installing a hypervisor like VMware can seem intimidating if you’ve never done it before, but the truth is that the process isn’t very different from installing any other application. Similar to program installation, you must first ensure that certain requirements are met, both in terms of specifications and compatibility.
The rest of the process is pretty straightforward, but there are a few minor bugs that users often encounter. Therefore, we have detailed the complete steps for installing VMware on various Linux distributions and fixing common issues you may encounter in the process.
Prerequisites for installing VMware
First of all, VMware support is only limited to the latest versions of certain Linux distributions. If you’re using a recent version of a popular distribution like Ubuntu or Fedora, you don’t need to worry about that. But for niche distributions, you should first confirm that VMware is indeed compatible with them as host operating systems.
Second, you should make sure that virtualization is enabled in the BIOS. Here’s how you can do this:
- Turn on your computer and press the BIOS key displayed on the screen (Fn keys or Delete).
- An alternative method is to enter the GNU GRUB menu first. Press and hold in BIOS change. Press at UEFI Esc a few times at boot. In any case, from the GRUB menu, select the Firmware settings Possibility.
- In the BIOS go to the Progressive or CPU configuration tabs and locate the virtualization option. (AMD-V, SVM, Intel VT-x, VT-d, etc.)
- Enable virtualization and press the button displayed on the screen (usually F10) to save changes and exit.
How to install VMware on Linux
Installing a hypervisor like VMware can seem intimidating if you’ve never done it before, but the truth is, the process is the same as installing any other application. Here are the full steps applicable to different distributions:
- First, download the VMware bundle from the official website.
- Go to the directory where the bundle was downloaded, right-click and select the file Characteristics.
- Copy or write them down Full name.
- Right-click anywhere and select Open in terminal.
- Enter now
sudo sh ./VMware.bundle
. - Replace
by the full name of step 3 and run the command. - After the installation is complete, enter
vmware
orvmplayer
to run Workstation Pro or Player. - Depending on the system, VMware might not open and instead you get a message about missing kernel headers or a similar problem. In such cases, you can check them Troubleshooting section below. However, if you are not getting any such prompts, you can simply proceed with the steps listed directly below.
- Start VMware, accept the terms of the license agreement and click Next.
- Specify that To update and CEIP Settings and press Next.
- Indicate if you are using VMware for ccommercial or non-commercial use and press Finished.
- If you are new to VMware, we encourage you to read our in-depth guide to using VMware at this point. It covers a number of useful topics, including creating your first virtual machine and installing a guest operating system.
If you ever want to uninstall VMware, you can use the following commands for Workstation Player and Pro respectively:sudo vmware-installer -u vmware-player
sudo vmware-installer -u vmware-workstation
In some cases you may need to use the full path for vmware-installer
as such: /usr/bin/vmware-installer
Troubleshooting installation issues
Users often face installation problems due to missing kernel headers, packages or an incompatible kernel version. If prompted to update the kernel headers, cancel the prompt and use the following commands to update them:
- On Debian derivatives:
sudo apt install linux-headers-$(uname -r)
- On Fedora-based distributions:
sudo dnf install kernel-headers kernel-devel
- On Arch-based distributions:
sudo pacman -S linux-headers
Similarly, you may also need to install a build-essential or similar set of packages. Here’s how you can do this:
- On Debian derivatives:
sudo apt install -y build-essential
- On Fedora or RHEL based distributions:
sudo dnf group install "Development Tools"
sudo yum groupinstall "Development tools" - On Arch-based distributions:
sudo pacman -Sy base-devel
Although rare, on rolling distributions like Kali, the setup file may not support the latest kernels, leading to bugs. In such cases, you can check if the developers have provided a patch, or you can try to roll back the kernel. For example, on Ubuntu, you can hold change Select at boot to enter GRUB Advanced options for Ubuntuand select the kernel version to use.
Finally, in addition to those already discussed, there are myriad distribution-specific issues you might encounter. We recommend searching for the VMware section in the distribution wiki in such cases, as you will find the most common issues already resolved and documented.
Install VMware Tools on a Linux guest
Most Linux guests included Open VM Tools by default, which is an open-source implementation of VMware Tools for Linux distributions. That open-vm-tools
package is generally installed by default, but you can also install it manually using one of the following commands:
- On Debian-based distributions:
sudo apt-get install open-vm-tools-desktop
sudo apt-get install open-vm-tools - On RPM-based distributions:
sudo yum install open-vm-tools-desktop
sudo yum install open-vm-tools - Use for Arch and its derivatives
sudo pacman -S open-vm-tools
and start or activatevmtoolsd.service
andvmware-vmblock-fuse.service
.
You can also install VMware Tools manually if you prefer, but note that VMware Tools must be reinstalled every time the Linux kernel is updated. Also, VMware Tools requires some dependencies to be available on the Linux guest before it can be installed. This includes gcc, binutils, make, and kernel sources. See the distribution-specific documentation for more details. But with all that said, here are the necessary steps:
- Power on the VM and make sure the guest OS is running.
- Choose VM > Install VMware Tools or Player > Manage > Install VMware Tools.
- Create a mount point with
sudo mkdir /mnt/cdrom
. - Now mount the CD-ROM using one of the following methods:
sudo mount /dev/cdrom /mnt/cdrom
sudo mount /dev/sr0 /mnt/cdrom - Check the VMware Tools package filename with
ls /mnt/cdrom
. - Depending on the format of the bundle, enter one of the following commands:
tar zxpf /mnt/cdrom/VMwareTools-version.tar.gz -C
tar zxpf /mnt/cdrom/VmwareTools-version.tgz -C - Replace
through the current version of step 6 and run the command. - Use the following commands to go to the VMware Tools distribution and install the VMware Tools:
cd /vmware-tools-distrib/
sudo ./vmware-install.pl - Alternatively, to install with RPM, copy the following command, replace
as before and run the command: rpm -ivh /mnt/cdrom/VMwareTools-version.rpm
- You can push Enter to accept the default configurations or enter your own values as you wish. You can also follow the on-screen instructions to complete the installation or use
sudo reboot
to do the finishing touches automatically. - Also, the configuration file generally runs automatically after installation. But at a later date you can also use those
/usr/bin/vmware-config-tools.pl
Command to configure VMware Tools for your running kernel. - Finally, you can use if necessary
umount /mnt/cdrom
to unmount and select the CD-ROM VM > Guest > Exit VMware Tools To install.