A virtual machine allows you to run a second, fully functional system within your existing environment. Your computer becomes what is known as a host system. Then, any virtual machine you set up will be a guest system.

One of the best software solutions for creating virtual machines on Linux is VMware. It is free for non-commercial use and surprisingly easy to install and set up. Following is a quick walkthrough that will show you how to install VMware Player on your Linux workstation and create your first virtual machine.

Download VMware Workstation Player

The free version of VMware’s virtualization software is VMware Workstation Player. You can download the installer by simply clicking the Download for Free button on the VMware Workstation Player product page.

Download: VMware Workstation Player

VMWare Linux download page

Out of the available options, you should choose the latest version unless you have some specific reason for using an older version.

Click Go To Downloads on the right side of the page and, finally, you will be taken to a page where you can download the latest version for both Windows and Linux. Click the Download Now button next to the Linux version and be sure to note where you are saving the file.

Installing VMware Workstation Player on Linux

Unlike other Linux packages, VMware does not make separate packages for different distributions. Once you’ve downloaded the installation bundle, the process is the same on all Linux distributions.

To install VMware, open a terminal and switch to the directory where you saved the installer using the cd command. Then, enter the following command, replacing the package name with the actual file name that you downloaded:

        sudo sh ./VMware-Player-Full-*.bundle
    

On most systems, it will take a minute or two for the installation process to complete. When finished, the VMware Player should show up in the Applications menu.

Running VMware Player for the First Time

The first time you run VMware, it will do one of two things. It will either show a dialog box saying it'll compile the special kernel modules, or show an error stating that it can’t find the kernel headers needed to compile the modules.

Some distributions have the kernel headers installed by default, or you may have already installed them as a dependency of some other software. If that's the case, you'll be able to skip over the next step.

VMWare Kernel Header dialog

If you get an error similar to above, click Cancel (using Refresh does not always work), open a terminal, and enter the appropriate command depending on the distro you're using.

For RPM-based distros such as Fedora or CentOS:

        sudo dnf install kernel-headers kernel-devel
    

For Debian-based distros such as Ubuntu or Linux Mint:

        sudo apt install linux-headers-$(uname -r)
    

On Arch Linux and its derivatives:

        sudo pacman -S linux-headers
    

Once the installation is complete, run VMware Workstation Player again and it should compile the necessary kernel modules for you without any trouble.

Compiling and installing the kernel modules will only take a few moments. VMware will then ask you to agree to the terms and conditions. After you agree to the terms you will see the VMware main menu. Congratulations, you’re now ready to set up your first virtual machine.

Creating Your First Virtual Machine With VMware

To create your first virtual machine, you will need installation media for whatever operating system you want to install. This can be any installation media that you would normally boot from an optical or USB drive.

To demonstrate, we’ll be using the Linux Mint ISO to create a guest virtual machine running on a Fedora Linux host.

To begin, load up VMware Workstation Player and select Create A New Virtual Machine. First, VMware will ask you to select the operating system installation media. You can use an ISO image stored on your hard drive or install it from an actual CD/DVD-ROM or USB drive.

VMWare ISO install selection

Next, it'll ask you what type of operating system you are going to install. There are options for many different versions of Linux as well as other less common operating systems such as FreeBSD and Solaris. Of course, you can also run Windows and even MacOS on a virtual machine. In our case, Linux Mint is based on Ubuntu, so we choose Ubuntu 64-bit.

VMWare guest OS selection

Related: Top Linux Operating Systems You Should Try in a Virtual Machine

Now, select where you want to store your guest system's virtual hard drive and how large you would like it to be. You can select any storage location that is convenient for you. It is generally recommended that you allocate at least 20GB to the virtual hard drive. VMware may recommend different settings depending on the operating system that you are installing.

VMware guest configuration

Finally, VMware will display the overall configuration for your new virtual machine. The default settings will generally work well, but you may be able to get better performance by increasing the RAM or number of processor cores allocated to the guest OS. You should not, however, assign more than 50 percent of your computer’s actual resources to the guest system.

If you happen to have trouble getting your installation media to boot, right-click on the VM name from the main menu to edit the settings. Usually, allocating more RAM or perhaps turning off 3D video acceleration will solve the problem. Try to make the virtual hardware settings as "vanilla" as possible.

VMware Linux Mint Boot Screen

A few moments after you click Finish on the hardware configuration screen, your virtual machine should boot up.

Your Virtual Machine Is Ready to Go

That’s all there is to it. You have successfully set up your first VMware virtual machine. Just follow the instructions for whatever operating system you are installing and, within a few minutes, you will have a fully functioning virtual guest OS to do with as you please. You can install as many guest systems as you like as long as you have enough free disk space.

Congratulations on setting up your first virtual machine! You’ll surely find virtual machines to be a useful tool for researching, exploring, and experimenting with different types of software.