Fix for PCI-passthrough and issues with Proxmox 6 GUI REGEX that needs resolving after upgrade.

TrevorJ

New Member
Mar 18, 2013
13
0
1
Hi All,

I’ve been reading through the forums about many users having issues with PCI-E passthrough after upgrading from Proxmox 5 to 6.

This issue has been caused by QEMU being upgraded to version 4 and the defaults for q35 having been changed.

After reading through the forum, it appears the main reason for upgrading to QEMU 4.0 was to fix other passthrough issues and get the benefit of a newer release which means the PCI-E root port hardware for q35 has also been changed.

The main change for q35 was to set split kernel IRQ support and enable Interrupt Remapping as default which has had major problems with vfio-pci INTx Support. The answer is to go back to version 3.1 support or re-enable the kernel only IRQ support and disable split IRQ support.

There are two workarounds which I’ve tested and both work

In either case, you will need to modify your machine type from the command line, like so:-

1) Specify the machine type as pc-q35-3.1 and therefore revert back to version 3.1 QEMU support for PCI-E passthrough.

qm set ID -machine pc-q35-3.1

2) Enable the kernel-based IRQ support.

qm set ID -args '-machine type=q35,kernel_irqchip=on'


Here are two interesting documents on q35 patch support for QEMU 4.0 and 4.1. For 4.1 a patch has been provided to revert back to kernel-based IRQ support due to the number of problems caused by the split IRQ support.

QEMU 4.0 q35 patch

https://patchwork.kernel.org/cover/10736915/

QEMU 4.1 v2 q35 patch

https://lists.sr.ht/~philmd/qemu/<155786484688.13873.6037015630912983760.stgit@gimli.home>

I personally think it is better to use QEMU 4.0 support and enable kernel-based IRQ support.

However, there is an issue with the latest Proxmox 6.0 release whereby the REGEX pattern needs updating for the machine parameter as it does not support comma-separated values like q35,kernel_irqchip=on.

So you get an annoying message all the time when trying to change something on a VM using the Proxmox
interface, that says Result Verification Failed (400) Machine: value does not match the regex pattern.

For your reference:-

The available parameters for q35 support in QEMU 4.0 are as follows: -
|--------------------------------------------------------+-------+----|
| params | split | IR |
|--------------------------------------------------------+-------+----|
| -M q35 | 0 | / |
| -M q35,accel=kvm | 1 | / |
| -M pc-q35-3.1,accel=kvm | 0 | / |
| -M q35,accel=kvm,kernel-irqchip=off | 0 | / |
| -M q35,accel=kvm,kernel-irqchip=on | 0 | / |
| -M q35 -device intel-iommu | 0 | 1 |
| -M q35,accel=kvm -device intel-iommu | 1 | 1 |
| -M q35,accel=kvm,kernel-irqchip=on -device intel-iommu | 0 | 0 |
|--------------------------------------------------------+-------+----|

As it appears to be such a big problem for so many users, how about patching the Proxmox interfaced so that these options are selectable from within the Proxmox Interface or at the very least fixing the REGEX to allow comma-separated values?
 
Yes no problem, but can we please not remove this post from this section. There are a lot of people having this issue and they probably won't think to look in the devel channel.
 
Ran into this today when I tried to upgrade to 6 again. Two of my VMs wouldn't work properly after the upgrade. I thought QEMU 4.0.1 fixed the issue, but apparently it didn't. After fixing the machine line in my VM configs I now have this error on my summary page:
"Error Result verification failed (400)

machine: value does not match the regex pattern"
 
@Kevo, please see the bug report above for more information.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!