Hello, I have installed Arch Linux with Hyprland onto my main personal Laptop, however I still need Windows for some select Programs and I don’t really want to do a DualBoot, instead I want a VM with GPU Passthrough, I have a Intel Core i7-14700HX and a Nvidia RTX 4060 GPU inside my Laptop and wish to have the iGPU used for Arch and the RTX used for the Windows VM, Thanks!
#Help make GPU Passthrough VM
367 messages · Page 1 of 1 (latest)
I already looked for guides on the Internet but I couldn’t seem to get them to work, they didn’t show what I need to install or just didn’t work, I am on a fresh installation rn.
Hi
Uhh
Lemme check
Idk I don’t have anything installed rn
Fresh install
But I used QEMU before
what kind of setup are you looking for? a setup where you want a main OS to manage different virtual machines? or do you want a normal linux distro with a virtual machine manager
I want to use Arch Linux on my Laptop and Windows VM for a couple of Apps and Games that don’t support Arch Linux
Essentially Arch Linux using iGPU and Windows using GPU
then you'd want to look at kvm qemu
keep in mind that some games wont with under a VM, this wont let you bypass kernel anti cheat
so if you already have arch linux installed, i'd start by setting up kvm qemu
I don’t think any of my Games have Anti Cheat
I never really play AAA Games
Its only really Minecraft Bedrock and Forza Horizon 4
Adobe Creative Cloud & Office too
Alright just give me couple of minutes my laptop is just finishing off fresh install
I think it is nearly done
Alright
Let me install it
also check if your cpu supports virtualization by doing "lsmod | grep kvm"
you should see something like this
yes great. virtualization will work
yes
alright, now do "sudo systemctl enable --now libvirtd.service"
that makes it so libvirtd starts on log in
otherwise you'd have to start it manually everytime
Failed to enable unit: unit libvirtd.service does not exist
try sudo systemctl enable --now libvirtd.socket ?
Same thing
Does not exist
After that do I enable just libvirtd.service?
good.
okay few more packages
virt-manager
virt-install
virt-viewer
dnsmasq
bridge-utils
edk2-ovmf
iptables-nft
Anything else?
thats all
Yes Windows 10 or 11
ignore bridge utils thats fine
So remove bridge utils?
leave it alone
It doesn’t let me install with it or something
i think ur done with the virtual machine manager side
I put in the install command then it does this and quit?
open virt manager
It won’t install
No it errors in this Photo
its okay
Or do I install them individually 1 by 1?
Ok I got it Installed
I removed Bridge-Utils
I opened Virt-Manager
details?
yeah idk tbh
Idk but QEMU seems to be connected
when you open it ur supposed to see this
I see this but it doesn’t say not connected
what does it say instead?
@slender wedge Sorry for long wait but I think this is right
I also clicked Close on Error and whenever I relaunch QEMU it doesnt show Error anymore
yeah thats good then that means its connected im pretty sure
does it let you make a new virtual machine?
Yes I think
I need ISO tho
Dont we still have to setup GPU Passthrough?
set up a windows 11 VM first before doing passthrough
Okay
you dont have to but i like to make sure the VM is working fine before hand
it is possible to boot from your usb by passing through the USB
yes
Worst case ill transfer ISO to my Documents
later you are going to want to set up a bridge connection
i'd rather you do that honestly
ventoy and windows can be weird
Its being fussy about ISO on USB
hm?
that looks fine
we are going to be using the arch linux wiki to set up passthrough https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF
notably section 3 starting with "Isolating the GPU"
I should proceed with Windows Install like normal?
yes
Does Home or Pro even matter?
depends on what your doing. but in most cases no
Will it even detect my Laptops Product Key?
no
thats not how that works
you either need to bypass the TPM and secure boot check by doing regedit. or set up TPM and secure boot in ur virtual machine
How can I setup SecureBoot and TPM on it?
idk i only know how to do it in proxmox, i usually just skip the checks
Ima js do Windows 10
Windows 11 is crap anyways
Gimme a Sec
Ok
@slender wedge I am Installing Windows
What now
bypassing the secureboot and tpm checks is really easy
What is Directory for it again
I forgo
uhh
yes
That line?
yes that is indeed the line
Okay
like tgat?
after that, save the config, close back to terminal, and then do sudo grub-mkconfig -o /boot/grub/grub.cfg
Oki done
now you need to stop the host from grabbing the gpu
So what do we do?
create a file in modprobe so do sudo nano /etc/modprobe.d/vfio.conf
put options vfio-pci ids=10de:28a0,10de:22be
softdep nvidia pre: vfio-pci
idk if the formatting matters, but just in case in the first line put
options vfio-pci ids=10de:28a0,10de:22be
and then on the second line
softdep nvidia pre: vfio-pci
thats just how i have it on my system
Done tha
edit /etc/mkinitcpio.conf
good
.
Ok done
Idk
Shall I do it just in case?
Ok
reboot
okay so now uh
do lspci -nnk | grep -A 3 "10de:28a0|10de:22be"
and show me what it says
do lspci -k | grep -A 2 "NVIDIA" ?
mmm
kernel driver in use should say vfio-pci
let me backtrack
right i dont think we blacklisted nouveau
Oh
all ur writing in there is
blacklist nouveau
save that
and then
sudo mkinitcpio -P
Ok done
im thinking
sudo nano /etc/modprobe.d/vfio.conf
replace with
options vfio-pci ids=10de:28a0,10de:22be
softdep nvidia pre: vfio-pci
softdep nouveau pre: vfio-pci
blacklist nouveau
Yea?
replace the cmdline linux default with "quiet intel_iommu=on iommu=pt vfio-pci.ids=10de:28a0,10de:22be modprobe.blacklist=nouveau"
or just add modprobe.blacklist=nouveau
good
do sudo grub-mkconfig -o /boot/grub/grub.cfg now
and then sudo mkinitcpio -P
and then reboot
when ur back do lspci -k | grep -A 2 "NVIDIA"
Nvm
I forgot Sudo
Ok let me Reboot
Okay back
This is the Issue I was having when I tried to do it originally
I couldnt figure out why it wouldnt change Driver to VFIO
at this point it would start working for me
i set mine up in the way i explained it
Bru what
since your using a laptop, maybe it has something to do with hybrid graphics?
Why wont mine work
Maybe
Any way of Disabling that?
I am on MSI Sword 16 HX B14V
or maybe your gpu shares a group with other devices?
someone else who's pass through hybrid graphics before on a laptop might be a better help. i've only done this on desktop
Do u know anyone who can?
not really,
Oh
This shows in BIOS
But it’s greyed out
i would not know where to start in disabling that, or if you even can nor do i know if that will solve your issue
find a way to switch ur gpu's to dgpu only
To the RTX?
idk what any of ur bios settings do
It has these options
IGFX is iGPU I think
try peg slot ig
Ok hold on
It doesn’t seem to let me
I change it to peg and reboot but screens stays black
And when I do a EC reset to fix it goes back to HG
@slender wedge Im probably going to do this on my Desktop, Do I just do the same steps as you mentioned for my Desktop?
yeah pretty much
Would you recomended it?
My Desktop is an i7-6700K & GTX 1080 Ti
assuming its also arch linux, the steps for gpu passthrough are a bit different on other distros
Should I use a Windows GPU Passthrough VM for it
idk thats more of a question for you and your needs
if i were you i’d just not play those games that cannot be ran on linux
or just dual boot
or set up a sunshine/moonlight setup to stream ur windows laptop to your linux desktop
Well
since ur laptop has a much more powerful 4060
At moment I dualboot Windows 7 and Arch on my Desktop
oh,
Im thinking of using Windows 7 with GPU Passthrough VM
why out of curiosity
And a Windosws 10 VM
Why what?