Lab running in VMware Workstation Pro on Linux

Introduction

VMware Workstation Pro is a powerful virtualization tool designed for software developers, IT professionals, and businesses to create, test, and deploy applications across multiple operating systems within a single host machine. Since it is an application installed on a base operating system, this means it is a Type-2 Hypervisor. By simulating virtual environments, Workstation Pro enables users to run multiple virtual machines (VMs) on a single physical computer, regardless of whether it runs Windows or Linux. This capability not only enhances productivity by consolidating hardware resources but also provides a sandboxed environment for testing software compatibility, doing Demos, and testing system upgrades safely. For Students and Professionals, VMware Workstation Pro offers invaluable hands-on experience with diverse platforms, facilitating skill development in system administration, software deployment, and network configuration, crucial for advancing careers in IT and software development. I have produced a number of videos on YouTube that step through some installation and configuration of Guest OS VMs running on VMware Workstation Pro in my VMware Playlist.

Since May of 2024, Broadcom now offers VMware Workstation Pro Free for personal use. For business use, a license is still required. So the product continues to be developed and supported!

Challenges

While VMware Workstation Pro tends to install and run quite easily on Windows, the same cannot be said for Linux. The good thing is that this highly capable software IS available for Linux and has been proven to run on a number of distributions. The challenge comes in the form of kernel compatibility, module installation, and Shared Folders. This article will provide some general notes on how the issues can be addressed, but the Detailed step-by-step solutions are demonstrated in the linked youtube videos.

Kernel Modules

The Linux Kernel is always being updated, patched, etc… Since VMware Workstation must compile modules for a given kernel, it doesn’t always work immediately after install without a little extra effort.

Symptoms

Here are some of the common errors that users encounter when attempting to install VMware Workstation Pro on Linux, launch VMware Workstation after a kernel update, import an OVA/OVF, or simply power on a VM.

VMware Host Modules (3rd party repo)

We can get past this issue by updating the necessary host modules; vmmon and vmnet. Continue on to learn how..

Pre-Requisites:

Make sure you have the following packages installed first (Fedora and Ubuntu noted, Other distros may have other requirements):

1# Fedora
2sudo dnf install elfutils-libelf-devel kernel-devel kernel-headers gcc
3
4# Ubuntu
5sudo apt install build-essential

GitHub Repo: vmware-host-modules

When you visit the repo linked above, I would recommend going with the “Second method (replace original tarballs)” instructions. While the first method originally worked for me, it has been a little inconsistent. The last couple times I’ve used the second method and things just worked!

If you do decide to go with option 1 in the repo, make note of the following:

NOTE: If the kernel update (OS Upgrade) results in issue recurring and you are Still running the same version of VMware Workstation as before the update, you must first CLEAN in the code folder (ONLY if re-using your last download):

  • cd into existing vmware-host-modules folder
  • make clean && make && sudo make install

If you are using Pop!_OS 22.04 LTS, try the following solution below, subsequent to following the steps outlined in this video (assumes you receive dev_lock_list and dev_unlock_list errors after reaching the stage of make from the step-by-step instructions in the video):

  1. Edit the bridge.c file:
1nano vmnet-only/bridge.c
  1. Find the lines calling dev_lock_list and dev_unlock_list and comment them out or remove them. They should look similar to this:
1     dev_lock_list();
2     dev_unlock_list();

Comment them out by adding // at the beginning of the line:

1     // dev_lock_list();
2     // dev_unlock_list();
  1. Save the file and exit the editor.

  2. Rebuild the module: make

This should help bypass the errors caused by the missing dev_lock_list and dev_unlock_list functions. Note: there are multiple instances of dev_lock_list and dev_unlock_list in the bridge.c file, each of which must be commented out for the solution to work.

For quick reference, the Second method is shown below. Be sure to update the version number with the most current version available to you when you view this article.

 1# Second method (replace original tarballs):
 2
 3  wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-17.5.1.tar.gz
 4  tar -xzf workstation-17.5.1.tar.gz
 5  cd vmware-host-modules-workstation-17.5.1
 6  tar -cf vmmon.tar vmmon-only
 7  tar -cf vmnet.tar vmnet-only
 8  cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/
 9  vmware-modconfig --console --install-all
10
11# In this case, last two commands require root privileges.

The following videos step through getting the software working on Fedora and Ubuntu. While these videos a little older at the time of this article being released, they still provide proper guidance to get things functional. Just be sure to also have the pre-requisite software installed on Fedora, or whichever flavor of Linux you prefer.

2023-08-27 - How to fix Unable to Install all modules VMware Workstation Linux

2023-03-08 - VMware Workstation 17 Pro on Linux Fedora 37

2023-02-15 - Install VMware ovftool on Linux - Fedora Workstation 37

2022-06-01 - How to Install VMware Workstation16 Pro on Ubuntu 22.04 Jammy Jellyfish

Importing and Exporting VMs

VMware Workstation relies on ovftool for processing the import and export activities.

Regardless of Linux distribution, make sure to download and install VMware ovftool. This is a hard requirement for importing/exporting VMs to/from VMware Workstation.

Example usage: (Replace ALL CAPS values with your local values) Import ovf or ova file to vCenter server:

1/usr/bin/ovftool -n=VMNAME --noSSLVerify --datastore=DATASTORENAME ./SOURCE.OVF vi://VCENTERUSER@VCENTERADDRESS/DATACENTER_NAME/host/CLUSTER_NAME/Resources

Shared Folders

Unfortunately the “Shared Folders” feature doesn’t work out of the box with open-vm-tools.

In the video below, I provide three different solutions to the issue:

  1. Add a simple entry to the /etc/fstab file
  2. Create a Gnome autostart .desktop file to run the appropriate command
  3. Apply a Systemd Mount Unit file. This is VMware’s KB fix. I’ll show what’s wrong with that, and provide you with a much more usable solution. Let’s get started!

Prerequisites:

  • Running either VMware Workstation or VMware Fusion
  • Guest Linux OS with open-vm-tools-desktop installed
  • sudo access to the Guest Linux OS
  • shared folders enabled in Fusion/Workstation with one or more folders shared

2022-11-23 - 3 Ways to fix VMware shared folders in Ubuntu 22.10 Linux under Fusion and Workstation