Sam Hooke

VMware Workstation VM gets sluggish then locks up

TL;DR: Following Windows update 22H2, Ubuntu (and other VMs) running inside VMware Workstation 16 get progressively slower, over the course of about 30 minutes, before eventually locking up. The fix that works for me is disabling the Windows Hypervisor Platform, but this causes WSL (Windows Subsystem for Linux) to be disabled.

Ubuntu locking up §

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:

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:

  1. Open Powershell as administrator.
  2. Run bcdedit /enum to view the current setting for hypervisorlaunchtype. Mine was set to Auto.
  3. Run bcdedit /set hypervisorlaunchtype off to set hypervisorlaunchtype to off.
  4. Open the “Turn Windows features on or off” window through Control Panel (or just type that phrase into the search bar).
  5. Disable Virtual Machine Platform, Windows Hypervisor Platform and Windows Subsystem for Linux.
Screenshot of the 'Turn Windows features on or off' window, with 'Virtual Machine Platform', 'Windows Hypervisor Platform' and 'Windows Subsystem for Linux' disabled.
Disable these features.
  1. It may then take a minute or so to apply changes:
Screenshot of the 'Turn Windows features on or off' window, with a progress bar saying 'Applying changes'
Applying changes...
  1. Then you will need to reboot, as prompted.

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!

Verifying the fix §

If the fix is working, then the vmware.log should indicate that the “Monitor Mode” is CPL0, not ULM.

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 CPL0:

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

These are rough notes that vary greatly in quality and length, but prove useful to me, and hopefully to you too!

← Previous: Mount Peak
Next: Annette Lake Sno-Park →