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 your virtual machines will get back up and running in no time.
Download the latest VMware kernel patches
The mkubecek / vmware-host-modules repository on GitHub tracks 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.
To get the patch up on your system, the first thing you need to do is visit the GitHub page to select the correct package for the VMware version you have installed and get the 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.
MAKEUSEOF VIDEO OF THE DAY
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:
make sudo 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, change to the directory where you cloned the repository, and enter the following commands in sequence:
sudo make clean
make sudo 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.
Unless you want to do manual fixes like this every time you upgrade the kernel, don't forget that alternative hypervisors are available for Linux. Depending on your needs, they can be worthwhile.
How to run a virtual machine on Linux: 3 different ways
If you want to run a second operating system on your Linux machine without rebooting to switch between them, a virtual machine is your only answer.
About the author
(9 articles published)
JT is a technology industry veteran with over 25 years of experience. From technical support and programming to system administration, he did everything. He especially enjoys teaching new users the freedom and power of Linux.
By JT McGinty
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!
Click here to subscribe