Install and run libvirtd (also requires running the virtlogd command)
Install and run virt-manager
Create a guest VM of your choice
Everything should be running at this point
Close things down then run wsl --shutdown to shutdown the whole WSL 2 system
Reopen WSL2 (dealer's choice on exactly how, I've tried all the command line options and just opening Virt Manager from the Start menu)
Try to start a VM
Get Permission Denied from KVM
Requires a full system reboot to get KVM back
Expected Behavior
When recovering from WSL2 shutdown, KVM should still be available in my distro without rebooting Windows.
Actual Behavior
KVM is not available after a wsl --shutdown and doesn't come back until the full Windows system is rebooted.
Diagnostic Logs
Error encountered in virt-manager GUI:
Error starting domain: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
2021-10-08T08:49:12.215371Z qemu-system-x86_64: failed to initialize KVM: Permission denied
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1279, in startup
self._backend.create()
File "/usr/lib/python3/dist-packages/libvirt.py", line 1234, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
2021-10-08T08:49:12.215371Z qemu-system-x86_64: failed to initialize KVM: Permission denied
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Windows Build Number
Microsoft Windows [Version 10.0.22000.194]
WSL Version
Kernel Version
5.10.60.1
Distro Version
Ubuntu 20.04
Other Software
libvirt-daemon 6.0.0-0ubuntu8.14 virt-manager 1:2.2.1-3ubuntu2.1
Repro Steps
wsl --shutdown
to shutdown the whole WSL 2 systemExpected Behavior
When recovering from WSL2 shutdown, KVM should still be available in my distro without rebooting Windows.
Actual Behavior
KVM is not available after a
wsl --shutdown
and doesn't come back until the full Windows system is rebooted.Diagnostic Logs
Error encountered in virt-manager GUI: