Windows 10/11 physical & virtual dual boot on Steamdeck (KVM)

There are many instrusctions to tell how to install Windows physically in the Steamdeck, which is very nice in most of the cases, but sometimes I just want to run a small task in the Windows and in such a scene virtual machine would be much more convenient.

So here is the MEMO of the 1st trial. But to say, personally the 2nd trial Virtualbox solution is better (Link: https://okoken.github.io/post/windows-1011-physical-and-virtual-dual-boot-on-steamdeck-virtualbox/).

πŸ”¨<1st trial with KVM>
Tried to install Virtualbox following Archlinux wiki but failed to compile the kernal driver. To avoid ruin my SteamOS, turn around to try KVM which is originally installed.

πŸ’‘ Pros:
- survives after every SteamOS update, thanks for Distrobox
- better VM disk performance (if good USB SD card reader is used)
πŸ’‘ Cons:
- relies on USB passthrough, therefore SD card needs to be accessed via USB SD card reader when boot as VM
- complicated share folder solution when boot as VM

πŸ’‘ Steps:
This method is originally posted in the Steam community. Since I am not using this method anymore, no screenshot is left. πŸ˜–
Below is the copy.

https://steamcommunity.com/app/1675200/discussions/0/3761104049348898945/

πŸ’‘ Pre-requisite:
πŸ’‘ Recommended to build a new clean system for it, in case BSoD happened. If you want to go ahead with your existing system, do backup before starting.
πŸ’‘ WTG recommended to be installed with MBR partition scheme (UEFI + BIOS). GPT may work but did not try.
πŸ’‘ Use USB SD card reader but not the internal SD card reader for the Windows, unless you could find a way for PCI passthrough.

  1. To install distrobox in the HOME path following below site. Thanks to @Liam Dawe.

https://www.gamingonlinux.com/2022/09/distrobox-can-open-up-the-steam-deck-to-a-whole-new-world/

  1. To create container Alpine:latest, and follow below site "Installation" and "Management" and "Guest lifecycle management" to install KVM, virt-manager, etc.

https://wiki.alpinelinux.org/wiki/KVM
I tried a lot of Linux versions but only Alpine Linux works πŸ˜ƒ

  1. Run virt-manager in the container, connect to the QEMU/KVM User session, and create new virtual machine with USB passthrough for the SD card with Windows inside, following below site.
    https://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest

  2. Start the virtual machine to boot Windows, and enjoy!