A little secret to rock your YouTube subscribers
Get Free YouTube Subscribers, Views and Likes

Single GPU Passthrough Tutorial - KVM/VFIO

Follow
BlandManStudios

The world's first and world's best video tutorial on single gpu passthrough. Play video games in a Windows VM running on Linux

LINKS #
Discord Invite:   / discord  
blandmanstudios store: https://blandmanstudios.square.site/

Chapters and Links and Commands by Timestamp#
0:00 Intro
My Dual GPU Tutorial Series:    • Beginner VFIO Tutorial  Part 0: Demo...  
My Looking Glass Demo:    • Looking Glass Demo  KVM VFIO  Virtu...  
My Single GPU Demo:    • Demo  Single GPU Passthrough  Windo...  
My Hardware Compatibility Video:    • Beginner VFIO Tutorial  Part 0: Demo...  
My Linux Install Tutorial:    • Beginner VFIO Tutorial  Part 1: Inst...  
1:14 Update your OS
sudo dnf update
1:37 Installing nvidia drivers
lspci nnk
sudo dnf install akmodnvidia xorgx11drvnvidiacuda
2:37 Install UNIGINE Valley
cd ~/Downloads
chmod a+x UnigineValley
./Unigine_Valley1.0.run
cd Unigine_Valley1.0
./valley
4:00 Benchmark Results (on Host)
4:16 UEFI/BIOS Settings
Enable "Virtualization" and "VTd"
4:49 Install Stuff
sudo dnf groupinstall withoptional virtualization
5:10 Configure Linux
sudo vi /etc/sysconfig/grub
Content to add: intel_iommu=on iommu=pt
sudo grub2mkconfig o /etc/grub2.cfg
sudo vi /etc/dracut.conf.d/local.conf
add_driver+=" vfio vfio_iommu_type1 vfio_pci vfio_virqfd "
sudo dracut f kver `uname r`
My Grub and Dracut Explanation:    • Beginner VFIO Tutorial  Part 2: BIOS...  
6:24 Verify Linux Setup
lsmod | grep kvm
dmesg | grep i iommu
cat /proc/cmdline
lspci nnk
7:30 Downloads
Windows 10 ISO: https://www.microsoft.com/enus/softw...
VIRTIO Driver ISO: https://github.com/virtiowin/virtio...
7:46 Create the VM
9:30 Installing Windows
10:00 Virtual Disk Performance
11:39 VM Network Connection
11:55 Remote Display
ip addr
13:42 Install Hook Helper
Github Tutorial: https://github.com/joeknock90/Single...
PassthroughPo.st Hook Helper: https://passthroughpo.st/simpleperv...
PassthroughPo.st VFIO Tools: https://github.com/PassthroughPOST/VF...
sudo mkdir p /etc/libvirt/hooks
sudo wget 'https://raw.githubusercontent.com/Pas... O /etc/libvirt/hooks/qemu
sudo chmod +x /etc/libvirt/hooks/qemu
sudo service libvirtd restart
11:14 Writing the Hook Scripts
mkdir p /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/prepare/begin
mkdir p /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/release/end
vi /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/prepare/begin/start.sh
chmod +x /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/prepare/begin/start.sh
vi /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/release/end/revert.sh
chmod +x /etc/libvirt/hooks/qemu.d/win10vm1singlegpu/release/end/revert.sh
14:50 Customize Hook Scripts
lspci nnk
15:45 Test and Fix Hook Scripts
sudo systemctl start sshd
ssh [email protected]
/etc/libvirt/hooks/qemu.d/win10vm1singlegpu/prepare/begin
lsmod | grep nv
sudo rmmod nvidia_drm
sudo rmmod nvidia_uvm
sudo rmmod nvidia_modeset
sudo rmmod nvidia
/etc/libvirt/hooks/qemu.d/win10vm1singlegpu/release/end/revert.sh
18:53 Add GPU to the VM
19:34 Install GPU Drivers
20:04 Mouse and Keyboard
20:40 Install UNIGINE Valley
21:43 Benchmark Results (on Guest)
21:55 Closing Thoughts
22:27 Bonus Message
Discord Invite:   / discord  
blandmanstudios store: https://blandmanstudios.square.site/

External Links #
Download Windows 10 ISO: https://www.microsoft.com/enus/softw...
Download VIRTIO Driver ISO: https://github.com/virtiowin/virtio...

Corrections #
If you're having trouble connecting to the VNC on another computer, try disabling firewalld with the command: systemctl stop firewalld

My Links #
you can find my other creative endeavors at:
http://blandmanstudios.com
http://blandmanstudios.itch.io
  / blandmanstudios  
  / blandmanstudios  
  / discord  

posted by abeljz