Proxmox virtualization with HW acceleration

Calolo

n3wb
Joined
Jan 31, 2018
Messages
3
Reaction score
2
Hello

Like a lot of home users, I didn't want to dedicate a PC for BlueIris, so it took me some time to find the best virtualization solution to get BI running as a VM under Proxmox, using Intel HW iGPU acceleration.

I tested with Intel chipset H110 / KabyLake i7 HD630, it should be the same for all Skylake+ i3/i5/i7 processors. The VT-x + VT-d options must be enabled in the BIOS before begining.

First, install the lastest version of Proxmox on your new BI PC, you can find tutorials for this.
Use Putty (or any SSH client) to access the Proxmox host CLI.

Using the web interface, create a Windows 10 VM. When the installation is finished, enable Windows remote desktop (RDP) with an administrator account. Use RDP to install BlueIris, currently using no HW acceleration.

Please note that when you pass the Intel iGPU to the VM, you loose the Proxmox console on the attached screen.
So don't do this on a production server and don't mess up with Proxmox network configuration after that!

Here is my Proxmox configuration to enable iGPU passthrough:

-----------------------------------------------------------------

Add parameters to the GRUB configuration:

Code:
# nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on video=efifb:off"

# update-grub
Add these lines at the end of the file:

Code:
# nano /etc/initramfs-tools/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
Create/add these lines at the end of the file:

Code:
# nano /etc/modprobe.d/blacklist.conf
blacklist snd_hda_intel
blacklist snd_hda_codec_hdmi
blacklist i915
Identify the VGA/iGPU device:

Code:
#  lspci
...
00:02.0 VGA compatible controller: Intel Corporation Device 591d (rev 04)

# lspci -n -s 00:02
00:02.0 0300: 8086:591d (rev 04)
Create/add this line at the end of the file using the previous ids :

Code:
# nano /etc/modprobe.d/vfio.conf
options vfio-pci ids=8086:591d disable_vga=1
Create/add these lines at the end of the file:

Code:
# nano /etc/modprobe.d/kvm.conf
options kvm ignore_msrs=1
Finish and reboot the Proxmox host:

Code:
# update-initramfs -u

# reboot
After the GRUB menu you will loose the screen display.
Wait a little than reconnect to SSH.


Add this line at the end of the file:

Code:
# nano /etc/pve/qemu-server/100.conf
args: -device vfio-pci,host=00:02.0,addr=0x18,x-igd-opregion=on
-----------------------------------------------------------------

Start the Windows 10 VM, the screen attached to the iGPU should turn on after some time.
Please note that you must keep a screen attached to it, or use an HDMI dummy plug, only to enable HW acceleration.
Everything you do on the VM should be using RDP, not the attached screen (no mouse/keyboard, maybe you can use USB passthrough).
If the iGPU is detected by Windows, download and install the lastest version of the Intel HD drivers, than reboot.
If everything is working fine, you can configure BI to use "Intel+PostProc" HW acceleration.
The H.265 acceleration is not working at the moment, but I think this is the same for everyone.

I hope this would be helpfull to some of you :)
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,006
Location
USA
Thats right, for H.265 you need to use an nvidia card but that raises power consumption so much it isn't worth having.
 

cplagz

n3wb
Joined
Dec 18, 2018
Messages
2
Reaction score
0
Location
Aus
This guide is great, however now with PVE6 there is an additional step.


nano /etc/kernel/cmdline
add intel_iommu=on to the end ie, root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on
/etc/kernel/postinst.d/zz-pve-efiboot
reboot
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
big thanks but i can not find..
nano /etc/kernel/cmdline
And in my win10 i get no igpu

Edit: I switch VGA zu "Std" Now Working
 
Last edited:

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
I have install 6.1-7 ...
std = standart
 
Joined
Mar 15, 2020
Messages
1
Reaction score
0
Location
Mx
Hello, confirming it works with proxmox 6.1. Machine setup was:
-no QEMU agent
-machine type i440fx
-SeaBios
-added etc/kernel/cmdline intel_iommu=on .
Also had "no such file" errors randomly, but followed this tutorial for update entire dist, switched in bios to get video from igd first and everything seems to be working fine.
 

bugsysiegals

Getting the hang of it
Joined
Nov 1, 2018
Messages
179
Reaction score
27
Location
Racine, WI
I've got this booted up but when I try to install the latest Intel HD drivers the VM crashes. To confirm, I'm downloading drivers from ... Downloads for Graphics Drivers

FWIW - I've Intel 3700 CPU which is 3rd generation so I'm downloading 15.33 which currently is the 4th item down from the top. Should I be downloading some other driver since Windows Properties identifies it as Common KVM Processor?
 

detxm80

n3wb
Joined
Mar 19, 2020
Messages
18
Reaction score
0
Location
italy
hi guys, great guide with 6.1.7, i've upgrade to 6.2.4 and now i've this error:

kvm: -device vfio-pci,host=00:02.0,addr=0x18,x-igd-opregion=on: vfio 0000:00:02.0: failed to open /dev/vfio/1: No such file or directory
TASK ERROR: start failed: QEMU exited with code 1

i learn that get the error when i add this line:

# nano /etc/pve/qemu-server/100.conf
args: -device vfio-pci,host=00:02.0,addr=0x18,x-igd-opregion=on
 
Last edited:

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
hmm now with "6.2-10 " backup and vm changes GPU bypass not working :(
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,539
Reaction score
2,765
hmm now with "6.2-10 " backup and vm changes GPU bypass not working :(
What reason do you need BI to use a GPU? Just setup substreams and watch your CPU utilization fall.
 
Top