I would like to passthrough a port from a PCI NIC. Here is what i did:
I added (to /etc/pve/qemu-server/102.conf):
I also tried with just:
What i am doing wrong?
- GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on" added to /etc/default/grub, executed update-grub
- dmesg | grep -e DMAR -e IOMMU does produce output
- appenede (to /etc/modules):
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd - The output of dmesg | grep ecap ends with e, so IOMMU interrupt remapping is supported
- I did find the address - 0a:00.0, and ist in its own iommu_group
I added (to /etc/pve/qemu-server/102.conf):
and themachine: q35
hostpci0: 0a:00.0,pcie=1
Use of uninitialized value $kvmver in pattern match (m//) at /usr/share/perl5/PVE/QemuServer.pm line 6378.
Use of uninitialized value $current_major in numeric ge (>=) at /usr/share/perl5/PVE/QemuServer.pm line 6384.
Running as unit 102.scope.
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to set iommu for container: Operation not permitted
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to setup container for group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to get group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: Device initialization failed
TASK ERROR: start failed: command '/usr/bin/systemd-run --scope --slice qemu --unit 102 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 102 -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -smbios 'type=1,uuid=4de08e04-d36e-48ed-88e5-ef6c42759d3d' -name tmpomv -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 3092 -k en-us -readconfig /usr/share/qemu-server/pve-q35.cfg -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:803a1a4fc45e' -drive 'file=/proxmox/img/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -drive 'file=/proxmox/iso/template/iso/openmediavault_2.1_amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -machine 'type=q35'' failed: exit code 1
Use of uninitialized value $current_major in numeric ge (>=) at /usr/share/perl5/PVE/QemuServer.pm line 6384.
Running as unit 102.scope.
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to set iommu for container: Operation not permitted
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to setup container for group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio: failed to get group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: Device initialization failed
TASK ERROR: start failed: command '/usr/bin/systemd-run --scope --slice qemu --unit 102 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 102 -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -smbios 'type=1,uuid=4de08e04-d36e-48ed-88e5-ef6c42759d3d' -name tmpomv -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 3092 -k en-us -readconfig /usr/share/qemu-server/pve-q35.cfg -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' -device 'vfio-pci,host=0a:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:803a1a4fc45e' -drive 'file=/proxmox/img/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -drive 'file=/proxmox/iso/template/iso/openmediavault_2.1_amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -machine 'type=q35'' failed: exit code 1
I also tried with just:
but still without success.hostpci0: 0a:00.0
Running as unit 102.scope.
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to set iommu for container: Operation not permitted
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to setup container for group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to get group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: Device initialization failed
TASK ERROR: start failed: command '/usr/bin/systemd-run --scope --slice qemu --unit 102 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 102 -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -smbios 'type=1,uuid=4de08e04-d36e-48ed-88e5-ef6c42759d3d' -name tmpomv -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 3092 -k en-us -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:803a1a4fc45e' -drive 'file=/proxmox/iso/template/iso/openmediavault_2.1_amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/proxmox/img/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100'' failed: exit code 1
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to set iommu for container: Operation not permitted
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to setup container for group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to get group 20
kvm: -device vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10: Device initialization failed
TASK ERROR: start failed: command '/usr/bin/systemd-run --scope --slice qemu --unit 102 -p 'KillMode=none' -p 'CPUShares=1000' /usr/bin/kvm -id 102 -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -smbios 'type=1,uuid=4de08e04-d36e-48ed-88e5-ef6c42759d3d' -name tmpomv -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 3092 -k en-us -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'vfio-pci,host=0a:00.0,id=hostpci0,bus=pci.0,addr=0x10' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:803a1a4fc45e' -drive 'file=/proxmox/iso/template/iso/openmediavault_2.1_amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/proxmox/img/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100'' failed: exit code 1
What i am doing wrong?