Title: Dual Boot with Windows and Linux Using KVM/QEMU
Hello dear community,
Lately, Windows has been getting quite a bit of negative press. I took the opportunity to thoroughly research and decided to finally switch to Linux. I’m very satisfied with this decision. However, due to my profession, I cannot completely abandon Windows. I’ve read in various small posts and other sources that I can have a dual Windows boot system and simultaneously access my Windows partition via KVM/QEMU. The biggest problem for me right now is that I have to restart my computer for every little thing I need to do in Windows, which doesn’t work under Linux.
So, I’m currently desperate and just don’t know exactly how to implement this. My current setup is as follows:
My EndeavourOS System:
nvme2n1 259:7 0 1.8T 0 disk
├─nvme2n1p1 259:8 0 1G 0 part /boot/efi
└─nvme2n1p2 259:9 0 1.8T 0 part /var
/home
/.snapshots
/
My Windows System:
nvme1n1 259:0 0 931.5G 0 disk
├─nvme1n1p1 259:1 0 100M 0 part
├─nvme1n1p2 259:2 0 16M 0 part
├─nvme1n1p3 259:3 0 930.6G 0 part
└─nvme1n1p4 259:4 0 783M 0 part
First, I installed a fresh copy of Windows (standalone). Then, I installed EndeavourOS on my other drive. Both systems can be booted via Grub (btrfs). So far, so good.
Of course, I have also installed and set up KVM and QEMU with User/Group, etc.:
sudo pacman -S virt-manager virt-viewer qemu vde2 ebtables iptables-nft nftables dnsmasq bridge-utils ovmf swtpm
I can install virtual machines. Currently, I’m working on getting IOMMU to run properly because I also want to pass through my GPU.
Now, the problems are starting:
All the tutorials I’ve found so far are based on Arch Linux and therefore on:
mkinitcpio
However, EndeavourOS uses dracut. Yes, I found this: Arch Linux PCI Passthrough via OVMF, and there are various solutions, but they are often just snippets and therefore hard for an inexperienced user like me to understand.
But back to the main topic:
How exactly can I integrate my Windows partition?
For example, I found this statement: Reddit VFIO NVMe Partition Passthrough
However, I don’t understand exactly what it means. Where do I enter what? Do I need to have IOMMU running? Can my partition be mounted? The drive consists of several partitions as shown above. Standard Windows partitioning. Which partition will it be?
Of course, I tried it myself. I created a new VM. Chose an existing system, then as drive/directory: /dev/nvme1n1p3
, and booted. The only thing that pops up is a window with a shell.
Then I also found other sources, such as: Reddit VFIO Partition Passthrough. Here, for example, the XML file of the machine itself is edited.
I’m slowly getting desperate.
Can someone please provide something more coherent than just snippets?
I don’t expect a full tutorial, but something more cohesive would be great.
I’m still learning.
Thanks in advance!