VMware Workstation VM gets sluggish then locks up (following recent Windows update)
For well over a year I have been using Ubuntu inside VMware Workstation as my development environment. Last week the Ubuntu VM developed an issue whereby over the couse of perhaps 15 to 30 minutes, the VM would get more and more sluggish, before locking up completely, and eventually switching to a black screen with text similar to the following:
[ 2741.744153] INFO: task gmain:1456 blocked for more than 155 seconds. [ 2741.744156] Not tainted 5.15.0-57-generic #63-Ubuntu [ 2741.744157] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 2741.744243] INFO: task kworker/u256:0:5130 blocked for more than 155 seconds. [ 2741.744244] Not tainted 5.15.0-57-generic #63-Ubuntu [ 2741.744244] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 2998.743235] INFO: task close:24619 blocked for more than 155 seconds. [ 2998.743257] Not tainted 5.15.0-57-generic #63-Ubuntu [ 2998.74326B] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
This became very disruptive to my work flow because the only resolution was to power off the VM, and turn it back on again. Unfortunately searching online for issues regarding a “sluggish” Ubuntu VM or even searching for the error above yields many irrelevant results.
However, my suspicions were that a recent Windows update had triggered this issue, since the issue began after I applied the Windows 22H2 update, and I had not made any changes to the Ubuntu VM or to VMware Workstation. Modifying my search term to include the Windows update led me to find that others had indeed encountered the same issue:
- “VMWare Workstation VMs unresponsive after a period of time and CPU usage spikes”
- “VMWare Workstation 16 Pro + Ubuntu 22.04.1 - VM unresponsive with high CPU”
The discussion reveals that the issue is not specific to Ubuntu, but seems to impact all Virtual Machines. Some users are able to “fix” the issue by uninstalling certain Windows updates, though this is not ideal, and if your machine is managed may not be possible.
Fortunately I found a fix that works well for me.
The fix §
The fix, as detailed by boomshankerx, is to disable the Windows Hypervisor Platform. These were the steps I followed:
- Open Powershell as administrator.
bcdedit /enumto view the current setting for
hypervisorlaunchtype. Mine was set to
bcdedit /set hypervisorlaunchtype offto set
- Open the “Turn Windows features on or off” window through Control Panel (or just type that phrase into the search bar).
Virtual Machine Platform,
Windows Hypervisor Platformand
Windows Subsystem for Linux.
A shortcoming of this fix is that it requires disabling WSL (Windows Subsystem for Linux), which will be inconvenient if you use that feature for something else!
NOTE: It might be possible to skip the reboot on step 4 and just reboot on step 7, but these were the steps I performed.
Verifying the fix §
If the fix is working, then the
vmware.log should indicate that the “Monitor Mode” is
In VMware Workstation, right click on the VM and select “Open VM directory”. In that directory will be a
vmware.log. Search for
Monitor Mode and verify it is set to
2023-01-09T19:01:33.638Z In(05) vmx Monitor Mode: CPL0
The VM should no longer get sluggish and lock up.
Version information §
- VM: Ubuntu 22.04
- Host: Windows 10 Enterprise, 22H2
- Hypervisor: VMware Workstation 16.2.5