-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VM deployment fails with an error "XML error: Invalid PCI address 0000:01:01.0. slot must be <= 0" if MACHINE=q35 #6492
Comments
rsmontero
added a commit
that referenced
this issue
Feb 8, 2024
If q35 machine type is detected the slot of the pci device is set to 0 and the bus to pci_id + 1. Q35 models uses pcie-root-ports to attach PCI devices. Each PCI port is selected by the bus parameter of the PCI address and it that does not accept a slot number greater than 0. Example: A VM with 2 X710 VFs is defined OpenNebula as: PCI=[ ADDRESS="0000:44:0a:0", BUS="44", CLASS="0200", DEVICE="154c", DOMAIN="0000", FUNCTION="0", NUMA_NODE="0", PCI_ID="0", SHORT_ADDRESS="44:0a.0", SLOT="0a", VENDOR="8086", VM_ADDRESS="01:00.0", VM_BUS="0x01", VM_DOMAIN="0x0000", VM_FUNCTION="0", VM_SLOT="0000" ] PCI=[ ADDRESS="0000:44:0a:1", BUS="44", CLASS="0200", DEVICE="154c", DOMAIN="0000", FUNCTION="1", NUMA_NODE="0", PCI_ID="1", SHORT_ADDRESS="44:0a.1", SLOT="0a", VENDOR="8086", VM_ADDRESS="02:00.0", VM_BUS="0x02", VM_DOMAIN="0x0000", VM_FUNCTION="0", VM_SLOT="0000" ] Each PCI VFs is attached to different pcie-root-port, selected with the VM_BUS parameter: 00:02.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:02.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port The PCI topology is: -[0000:00]-+-00.0 Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller +-01.0 Cirrus Logic GD 5446 +-02.0-[01]----00.0 Intel Corporation Ethernet Virtual Function 700 Series +-02.1-[02]----00.0 Intel Corporation Ethernet Virtual Function 700 Series +-02.2-[03-04]----00.0-[04]-- +-02.3-[05]----00.0 Red Hat, Inc. Virtio network device +-02.4-[06]----00.0 Red Hat, Inc. Virtio SCSI +-02.5-[07]----00.0 Red Hat, Inc. QEMU XHCI Host Controller +-02.6-[08]----00.0 Red Hat, Inc. Virtio console +-02.7-[09]----00.0 Red Hat, Inc. Virtio memory balloon +-03.0-[0a]-- +-03.1-[0b]-- +-03.2-[0c]-- +-03.3-[0d]-- +-03.4-[0e]-- +-03.5-[0f]-- +-03.6-[10]-- +-03.7-[11]-- +-1f.0 Intel Corporation 82801IB (ICH9) LPC Interface Controller +-1f.2 Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] \-1f.3 Intel Corporation 82801I (ICH9 Family) SMBus Controller
rsmontero
added a commit
that referenced
this issue
Mar 11, 2024
If q35 machine type is detected the slot of the pci device is set to 0 and the bus to pci_id + 1. Q35 models uses pcie-root-ports to attach PCI devices. Each PCI port is selected by the bus parameter of the PCI address and it that does not accept a slot number greater than 0. Example: A VM with 2 X710 VFs is defined OpenNebula as: PCI=[ ADDRESS="0000:44:0a:0", BUS="44", CLASS="0200", DEVICE="154c", DOMAIN="0000", FUNCTION="0", NUMA_NODE="0", PCI_ID="0", SHORT_ADDRESS="44:0a.0", SLOT="0a", VENDOR="8086", VM_ADDRESS="01:00.0", VM_BUS="0x01", VM_DOMAIN="0x0000", VM_FUNCTION="0", VM_SLOT="0000" ] PCI=[ ADDRESS="0000:44:0a:1", BUS="44", CLASS="0200", DEVICE="154c", DOMAIN="0000", FUNCTION="1", NUMA_NODE="0", PCI_ID="1", SHORT_ADDRESS="44:0a.1", SLOT="0a", VENDOR="8086", VM_ADDRESS="02:00.0", VM_BUS="0x02", VM_DOMAIN="0x0000", VM_FUNCTION="0", VM_SLOT="0000" ] Each PCI VFs is attached to different pcie-root-port, selected with the VM_BUS parameter: 00:02.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port 00:02.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port The PCI topology is: -[0000:00]-+-00.0 Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller +-01.0 Cirrus Logic GD 5446 +-02.0-[01]----00.0 Intel Corporation Ethernet Virtual Function 700 Series +-02.1-[02]----00.0 Intel Corporation Ethernet Virtual Function 700 Series +-02.2-[03-04]----00.0-[04]-- +-02.3-[05]----00.0 Red Hat, Inc. Virtio network device +-02.4-[06]----00.0 Red Hat, Inc. Virtio SCSI +-02.5-[07]----00.0 Red Hat, Inc. QEMU XHCI Host Controller +-02.6-[08]----00.0 Red Hat, Inc. Virtio console +-02.7-[09]----00.0 Red Hat, Inc. Virtio memory balloon +-03.0-[0a]-- +-03.1-[0b]-- +-03.2-[0c]-- +-03.3-[0d]-- +-03.4-[0e]-- +-03.5-[0f]-- +-03.6-[10]-- +-03.7-[11]-- +-1f.0 Intel Corporation 82801IB (ICH9) LPC Interface Controller +-1f.2 Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] \-1f.3 Intel Corporation 82801I (ICH9 Family) SMBus Controller (cherry picked from commit 4ce7340)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
https://forum.opennebula.io/t/cannot-deploy-virtual-machine-using-q35-chipset-with-pci-passthrough/8832
VM deployment fails with an error "XML error: Invalid PCI address 0000:01:01.0. slot must be <= 0" if MACHINE=q35.
vm.log:
Corresponding part of onevm show -j output
Corresponding part of deployment.0
The following manual change helps to deploy VM from deployment.0 file:
lspci output from the inside VM:
To Reproduce
Create VM template with PCI device and MACHINE type 'q35'. Try to deploy it.
Expected behavior
VM should be deployed successfully.
Details
Progress Status
The text was updated successfully, but these errors were encountered: