Warning: UPDATING these packages broke my pci passthrough.

Sorry to borrow this topic. After updating the latest pve related components, compared with the original KVM that could not be started, now KVM can be started, but there are warnings.
References are as follows:

error writing '1' to '/sys/bus/pci/devices/0000:01:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:01:00.0', but trying to continue as not all devices need a reset
swtpm_setup: Not overwriting existing state file.
kvm: warning: host doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]

Among them, the swtpm and warnings exist on all virtual machines. The PCI device is my NV graphics card, which currently does not affect the normal startup of KVM and device passthrough.
 
Sorry to borrow this topic. After updating the latest pve related components, compared with the original KVM that could not be started, now KVM can be started, but there are warnings.
References are as follows:

error writing '1' to '/sys/bus/pci/devices/0000:01:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:01:00.0', but trying to continue as not all devices need a reset
swtpm_setup: Not overwriting existing state file.
kvm: warning: host doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]

Among them, the swtpm and warnings exist on all virtual machines. The PCI device is my NV graphics card, which currently does not affect the normal startup of KVM and device passthrough.

yes the pci warnings are new and intentional. Previously we tried e.g. to reset the device, but failed silently not knowing if it worked or not
those warnings are not bad per se, but could indicate a problem if e.g. something in the guest is not working right
 
  • Like
Reactions: mariol
In particular it should be fixed thanks to @dcsapak in libpve-common-perl >= 8.2.7 and qemu-server >= 8.2.6 both available in the testing repository at the time of this writing.

If you'd like to install the package, you can temporarily enable the repository (e.g. via the Repositories section in the UI), run apt update, run apt install libpve-common-perl qemu-server and disable the repository again, then run apt update again.

Just wanted to let the community know that the workaround Fiona suggested worked in my case.

I experienced issues on hosts with 2 CPU sockets and passing through two Nvidia L40(s) cards to a VM where only one of the GPUs was recognised in the VM. I do not exactly know which update broke the passtrough, but adding the testing apt repostiory, updating the two packages Fiona suggested and reverting back to the subscription repository, followed by an apt update and finally a host reboot, helped. Both GPUs show up in the VM now.
 
  • Like
Reactions: xmesaj2 and mariol
AMD IGPU 780M
task error:can't reset 'c6:00.0' pci device
same here with proxmox 8.3.0:

Code:
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset
TASK ERROR: timeout waiting on systemd

seems that RadeonResetBugFix does not work anymore https://github.com/inga-lovinde/RadeonResetBugFix/tree/master

how can I fix that?
 
Hi,
same here with proxmox 8.3.0:

Code:
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset
TASK ERROR: timeout waiting on systemd

seems that RadeonResetBugFix does not work anymore https://github.com/inga-lovinde/RadeonResetBugFix/tree/master

how can I fix that?
please share the output of pveversion -v and the VM configuration qm config <ID> as well as an excerpt of the system logs/journal around the time the issue happened. Does it work if you start the VM with a higher timeout, e.g. qm start <ID> --timeout 900? If yes, how long does it take to actually start?
 
Hello,
thank you for your support:

pveversion -v:
Code:
proxmox-ve: 8.3.0 (running kernel: 6.8.12-4-pve)
pve-manager: 8.3.0 (running version: 8.3.0/c1689ccb1065a83b)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.8: 6.8.12-4
proxmox-kernel-6.8.12-4-pve-signed: 6.8.12-4
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
amd64-microcode: 3.20240820.1~deb12u1
ceph-fuse: 17.2.7-pve3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx11
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.1
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.4
libpve-access-control: 8.2.0
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.0.10
libpve-cluster-perl: 8.0.10
libpve-common-perl: 8.2.9
libpve-guest-common-perl: 5.1.6
libpve-http-server-perl: 5.1.2
libpve-network-perl: 0.10.0
libpve-rs-perl: 0.9.1
libpve-storage-perl: 8.2.9
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.5.0-1
proxmox-backup-client: 3.3.0-1
proxmox-backup-file-restore: 3.3.0-1
proxmox-firewall: 0.6.0
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.3.1
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.7
proxmox-widget-toolkit: 4.3.3
pve-cluster: 8.0.10
pve-container: 5.2.2
pve-docs: 8.3.1
pve-edk2-firmware: 4.2023.08-4
pve-esxi-import-tools: 0.7.2
pve-firewall: 5.1.0
pve-firmware: 3.14-1
pve-ha-manager: 4.0.6
pve-i18n: 3.3.2
pve-qemu-kvm: 9.0.2-4
pve-xtermjs: 5.3.0-3
qemu-server: 8.3.0
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.6-pve1

qm config <ID> (Win11 vm with iGPU pass):
Code:
agent: 1
args: -cpu 'host,-hypervisor,kvm=off'
bios: ovmf
boot: order=scsi0;net0
cores: 16
cpu: host
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:c6:00.0,pcie=1,romfile=vbios_8845.bin,x-vga=1
hostpci1: 0000:c6:00.1,pcie=1,romfile=AMDGopDriver_8845hs.rom
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1732920848
name: win11
net0: virtio=BC:24:11:46:0D:C3,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: local-lvm:vm-100-disk-1,cache=writeback,discard=on,iothread=1,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=3be659fd-57b6-4496-9f8b-37b4dc200bad
sockets: 1
tpmstate0: local-lvm:vm-100-disk-2,size=4M,version=v2.0
vga: none
vmgenid: 9cdc5539-d08b-473d-b970-a2b6bbc76522

the "excerpt of the system logs/journal around the time the issue" it's only about this message as before, even if I start it with 900 timeout:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset
timeout waiting on systemd
with a HDMI connected to the machine, after win vm go off, monitor stay blank, does not return to the host...

thank you again for your time
 
  • Like
Reactions: wustrong
the "excerpt of the system logs/journal around the time the issue" it's only about this message as before, even if I start it with 900 timeout:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset
timeout waiting on systemd
with a HDMI connected to the machine, after win vm go off, monitor stay blank, does not return to the host...
That does not look like journalctl output, e.g. timestamp and process IDs are missing. There also should be log lines mentioning the qmstart task.
 
oh sorry, I didn't undestand, I guess this:

Code:
Dec 02 10:52:57 proxmox login[166633]: ROOT LOGIN  on '/dev/pts/0'
Dec 02 10:52:59 proxmox qm[166665]: <root@pam> starting task UPID:proxmox:00028B0A:0047DD96:674D837B:qmstart:100:root@pam:
Dec 02 10:52:59 proxmox qm[166666]: start VM 100: UPID:proxmox:00028B0A:0047DD96:674D837B:qmstart:100:root@pam:
Dec 02 10:53:00 proxmox systemd[1]: 100.scope: Deactivated successfully.
Dec 02 10:53:00 proxmox systemd[1]: Stopped 100.scope.
Dec 02 10:53:00 proxmox systemd[1]: 100.scope: Consumed 5h 41min 49.973s CPU time.
Dec 02 10:53:20 proxmox qm[166666]: timeout waiting on systemd
Dec 02 10:53:20 proxmox qm[166665]: <root@pam> end task UPID:proxmox:00028B0A:0047DD96:674D837B:qmstart:100:root@pam: timeout waiting on systemd
Dec 02 10:54:22 proxmox qm[166950]: <root@pam> starting task UPID:proxmox:00028C27:0047FDF6:674D83CE:qmstart:100:root@pam:
Dec 02 10:54:22 proxmox qm[166951]: start VM 100: UPID:proxmox:00028C27:0047FDF6:674D83CE:qmstart:100:root@pam:
Dec 02 10:54:42 proxmox qm[166951]: timeout waiting on systemd
Dec 02 10:54:42 proxmox qm[166950]: <root@pam> end task UPID:proxmox:00028C27:0047FDF6:674D83CE:qmstart:100:root@pam: timeout waiting on systemd
 
That does not look like journalctl output, e.g. timestamp and process IDs are missing. There also should be log lines mentioning the qmstart task.
Just checking in to see if there has been any progress on this? I am also experiencing this issue - happy to help anyway I can.
 
That does not look like journalctl output, e.g. timestamp and process IDs are missing. There also should be log lines mentioning the qmstart task.
I'm experiencing the same issue.

I’m using an AMD Ryzen 7 8745HS with a 780M iGPU, running PVE 8.3.2.

After applying the RadeonResetBugFix, every time I reboot or shut down the Windows VM, it seems the iGPU isn't released. The VM cannot restart, and the status shows the following error message:

Code:
error writing '1' to '/sys/bus/pci/devices/0000:65:00.0/reset': Inappropriate ioctl for device

The only way I can get the VM running again is by restarting the host machine.
 
  • Like
Reactions: wustrong
error writing '1' to '/sys/bus/pci/devices/0000:65:00.0/reset': Inappropriate ioctl for device

I encounter the same issue with my TrueNAS Scale VM. The PCIe devices (JBOD controllers) are not released after a VM reboots, causing the error message above (and the VM not starting).

I need to reboot the host to boot the VM.
 
For me I am passing through an AMG 7900 GRE, it passes through fine initially, then at some point the VM will freeze. When I try and start the VM again, I get:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:26:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:26:00.0', but trying to continue as not all devices need a reset
kvm: ../hw/pci/pci.c:1633: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

Only way to start the VM again is to reboot the host.
 
For me I am passing through an AMG 7900 GRE, it passes through fine initially, then at some point the VM will freeze. When I try and start the VM again, I get:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:26:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:26:00.0', but trying to continue as not all devices need a reset
kvm: ../hw/pci/pci.c:1633: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

Only way to start the VM again is to reboot the host.
same here, do you think is a proxmox's problem o ResetBugFix on AMD does not work anymore?
 
Hello,
thank you for your support:

pveversion -v:
Code:
proxmox-ve: 8.3.0 (running kernel: 6.8.12-4-pve)
pve-manager: 8.3.0 (running version: 8.3.0/c1689ccb1065a83b)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.8: 6.8.12-4
proxmox-kernel-6.8.12-4-pve-signed: 6.8.12-4
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
amd64-microcode: 3.20240820.1~deb12u1
ceph-fuse: 17.2.7-pve3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx11
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.1
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.4
libpve-access-control: 8.2.0
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.0.10
libpve-cluster-perl: 8.0.10
libpve-common-perl: 8.2.9
libpve-guest-common-perl: 5.1.6
libpve-http-server-perl: 5.1.2
libpve-network-perl: 0.10.0
libpve-rs-perl: 0.9.1
libpve-storage-perl: 8.2.9
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.5.0-1
proxmox-backup-client: 3.3.0-1
proxmox-backup-file-restore: 3.3.0-1
proxmox-firewall: 0.6.0
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.3.1
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.7
proxmox-widget-toolkit: 4.3.3
pve-cluster: 8.0.10
pve-container: 5.2.2
pve-docs: 8.3.1
pve-edk2-firmware: 4.2023.08-4
pve-esxi-import-tools: 0.7.2
pve-firewall: 5.1.0
pve-firmware: 3.14-1
pve-ha-manager: 4.0.6
pve-i18n: 3.3.2
pve-qemu-kvm: 9.0.2-4
pve-xtermjs: 5.3.0-3
qemu-server: 8.3.0
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.6-pve1

qm config <ID> (Win11 vm with iGPU pass):
Code:
agent: 1
args: -cpu 'host,-hypervisor,kvm=off'
bios: ovmf
boot: order=scsi0;net0
cores: 16
cpu: host
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:c6:00.0,pcie=1,romfile=vbios_8845.bin,x-vga=1
hostpci1: 0000:c6:00.1,pcie=1,romfile=AMDGopDriver_8845hs.rom
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1732920848
name: win11
net0: virtio=BC:24:11:46:0D:C3,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: local-lvm:vm-100-disk-1,cache=writeback,discard=on,iothread=1,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=3be659fd-57b6-4496-9f8b-37b4dc200bad
sockets: 1
tpmstate0: local-lvm:vm-100-disk-2,size=4M,version=v2.0
vga: none
vmgenid: 9cdc5539-d08b-473d-b970-a2b6bbc76522

the "excerpt of the system logs/journal around the time the issue" it's only about this message as before, even if I start it with 900 timeout:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset
timeout waiting on systemd
with a HDMI connected to the machine, after win vm go off, monitor stay blank, does not return to the host...

thank you again for your time
have you fixed that?what to do?
 
For me I am passing through an AMG 7900 GRE, it passes through fine initially, then at some point the VM will freeze. When I try and start the VM again, I get:
Code:
error writing '1' to '/sys/bus/pci/devices/0000:26:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:26:00.0', but trying to continue as not all devices need a reset
kvm: ../hw/pci/pci.c:1633: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

Only way to start the VM again is to reboot the host.
everytime!!!
 

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!