

Install your kernel in WSL 2 and enable nested KVM cp arch/x86/boot/bzImage /mnt/c/Users//bzImage Install your kernel modules sudo make modules_install Sit back and watch a movie while you wait: If you are 10x and too cool to use a GUI, you can edit your.

If you don't want to do this, just leave KVM for Intel processors support as built-in, and you can skip the make modules_install step below, but make sure you still add KVM guest support and configure kvm_intel in /etc/modprobe.d/nf as described below.Įxit the Virtualization menu and then proceed to Processor type and features -> Linux guest support enable built-in KVM guest support: Butit means you will have to load the module each time manually or add it to your. This might be useful getting certain operating systems to run or finetune their performance. Modprobe kvm_intel enable_apicv=0 # reloads the module with apicv disable Important note about building a module in WSL:īuilding KVM for Intel as a module makes it easier to unload, tweak, and reload the module as needed, for example: sudo modprobe -r kvm_intel # removes the module Under Virtualization I set KVM for Intel processor support to build as a module (read below and decide if you should) and enable built-in virtio net support: Start by borrowing the official WSL 2 kernel configuration: cp Microsoft/config-wsl. You could also use git to retrieve specific branches and tagged releases of the WSL 2 kernel. You can find all the WSL 2 kernel releases on GitHub. If you are reading this in the future, you can check your current WSL 2 version number with: uname -r

There may be more recent WSL 2 kernels available but this has only been tested on 4.19.104 (and you will need 4.19.121 or higher for GPU compute): cd ~ You could use any kernel, including one from your distro, but for simplicity I use the default Microsoft WSL terminal as a base. Sudo apt -y install build-essential libncurses-dev bison flex libssl-dev libelf-dev cpu-checker qemu-kvm aria2 You have been regularly updating your WSL distro, right? sudo apt update & sudo apt -y upgrade Update, upgrade, and install dependencies **If you are not ready to build Linux kernel modules but want to get started, check out my guide on running Windows 2000 with QEMU on WSL.

They have said Linux KVM guest support is coming.įamiliarity with building a Linux kernel**įamiliarity with KVM, QEMU, or virtualization technology Hyper-V just got AMD nested virtualization support. *AMD users: WSL 2 runs in a lightweight Hyper-V platform on any edition of Windows 10. X410 or VcXsrv (For now, native GUI support and GPU acceleration is coming!) Windows 10 Insider Fast Ring, tested on build 19645.1Īn X server for Windows, e.g. This guide has been deprecated in favor of this 2022 update.
