Windows VMs black screen and freeze after trim
2 posts
This issue may be unrelated to SoftPerfect Virtual Disk Trim, but as your team clearly has good knowledge of virtual machines, I thought I would ask for help here.
I've been trying out your VDTrim on my VMware Workstation machines. Ran it over the whole VMs folder on Friday, got back nearly 60 GB, so I am very happy with the results.
The problem is that soon after that, two of my Windows VMs (Win10 and Win11) don't work properly anymore. They boot, I get the login screen, type the password - and then they go into a black screen and freeze in that state. The mouse pointer is there sometimes, but no desktop. I left one sitting for 10 minutes and it never came up. My third VM works fine most of the time, but did the same thing once, earlier today.
I do have backups of the vmdk files from before the trim, but before I go restoring 200 GB, I'd like to know if this is something the trim could have caused. Could it have removed something Windows needs, the pagefile maybe? I did have the option to remove page and hibernation files ticked. Or maybe you know what else could have caused this issue?
Thanks
Don't restore anything yet. Your disk is fine: if your VM gets as far as the login screen and takes your password, it is reading its disk properly. Virtual Disk Trim is also fine: it compares every trimmed image against the original before it replaces anything. The page file isn't a problem either: Windows simply creates a new one on the next start.
We are fairly sure this wasn't caused by the trim, because we had exactly the same issue on our own test VMs last week, and the first thing we did was to investigate our own tool. The culprit turned out to be 3D acceleration in VMware Workstation, not Virtual Disk Trim.
If you recently updated your graphics driver, that's a solid confirmation. For us it started right after an NVIDIA driver update on the host. After that, the guest booted, showed the login screen, and then the desktop never appeared because Windows was waiting for the virtual graphics card. That's exactly what you describe. It also explains your third VM: for us it happened in about half of the boots, so not every VM and not every boot was affected.
How to fix:
- Shut the affected VM down completely (power off, not suspend).
- Go to VM > Settings > Display, and untick "Accelerate 3D graphics".
- Start the VM again.
If you prefer to edit the .vmx file instead, it's this line:
mks.enable3d = "FALSE"
After this fix, all our VMs have been booting normally.
If you did more online searching and found the advice to switch VMware renderer from Vulkan to DirectX instead, we don't recommend it. We actually tried that. DirectX 12 made no difference, and with DirectX 11 the VM booted, but some visual effects were gone. Turning 3D off was the thing that really fixed the issue for us.
Note: Win11 guest windows lose their rounded corners without 3D. If that bothers you, add this in the guest registry and restart the guest:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Dwm ForceEffectMode (DWORD) = 2
Hopefully the next VMware or driver update will sort this out properly and we can re-enable 3D. But for now this is a decent solution.