VMware is an excellent virtualization solution for Linux users who want to experiment with multiple operating systems on one computer, but there is an annoying problem. It tends to break when you upgrade the Linux kernel to a very recent version.
In this case, you can either do without your virtual machines and wait for the VMware team to update the kernel modules – which can take a few days or more – or you can fix the kernel modules yourself.
We assume that you will want to repair the VMware kernel modules yourself. It’s not as difficult as you might think and will get your virtual machines back up and running in no time.
Download the latest VMware kernel patches
The mkubecek / vmware-host-modules repository on GitHub is tracking patches required to build VMware host modules (player and workstation both) for current kernels.
The easiest way to repair a broken VMware installation after a kernel upgrade is to clone, compile, and install the files provided in this repository.
In order to apply the patch on your system, you must first have the GitHub page to select the correct package for the version of VMware installed and get its url to clone the repository.
You only need to clone the repository once. After that, you can process all new updates with just a few quick commands in your terminal.
On the side you will see a button with the word master thereon. Click this button to view the list of available patches. Patches are available for different versions of the VMware Workstation and VMware Player packages.
Note that if you haven’t purchased a VMware license, you’re running the free version VMware player.
Select the version of VMware Player you are using from the list. If you are unsure and it’s your first time to complete this procedure, there is a very good chance that you are using the latest version.
When you have selected the correct version, click the green one code Button. A small box will appear with the URL required to clone the patch version you selected. Copy this url and return to your terminal.
Enter the following command on your terminal to clone the repository. Make sure to replace the URL in the command below with the one you copied.
git clone https://github.com/mkubecek/vmware-host-modules.git
The entire process should only take a few seconds. After the repository has been successfully cloned, you are moments away from patching and repairing your VMware installation.
Install the latest VMware kernel patch for the first time
First, navigate to the newly created directory using the cd command. From here, enter the following commands in order and enter your password when prompted:
sudo make install
You will see a few lines of text go by while the compiler does its job. Depending on the speed of your computer, it could take anywhere from a few seconds to a few minutes to complete both steps.
note: If you get an error message that the make command does not exist, it means that you do not have a suitable compiler installed on your system.
That’s it. You have installed the updated kernel modules. In most cases, your VMware installation should work again. If you still get an error message trying to load VMware, reboot your system to make sure all kernel modules load correctly.
How to update VMware kernel modules for future updates
You will need to update the kernel modules again when your system kernel is updated. It’s quick and easy now that you’ve cloned the updated Git repository.
The next time your VMware installation aborts due to a kernel update, open a terminal, go to the directory where you cloned the repository, and enter the following commands in sequence:
sudo make clean
sudo make install
the git pull Command will automatically download the latest files from the repository to your computer. the clean up Command removes the files that you previously compiled.
Then it is do and to install Commands compile the modules with the new code and install them. Then your VMware installation should work normally again.
You can now update VMware Kernel modules if necessary
There you have it. You now have everything you need to update your VMware kernel modules if your installation is interrupted due to a system kernel update. If you encounter such problems, all you need to do is pull the latest source code from the repository as shown above and run the program do and to install Commands.
If you don’t want to do manual fixes like this every time you upgrade the kernel, don’t forget that alternative hypervisors exist for Linux. Depending on your needs, they can be worthwhile.