You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "amitcsc1989 (via GitHub)" <gi...@apache.org> on 2026/04/03 08:40:25 UTC
[I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
amitcsc1989 opened a new issue, #12960:
URL: https://github.com/apache/cloudstack/issues/12960
### problem
We are running CloudStack 4.22 with KVM hypervisors and NVIDIA GPUs (vendor 10de, device 233b). GPU discovery works correctly — devices are listed in the gpu_device table and show up as Free/Allocated in the UI. When attempting to create a VM with GPU passthrough, CloudStack fails to start the VM with the following error:"LibvirtException: XML error: Invalid PCI address slot='0xd6', must be <= 0x1F"
### versions
Cloudstack 4.22
### The steps to reproduce the bug
1.
2.
3.
...
### What to do about it?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204086179
Hi , Please find the attached screenshot .
when it is attaching 0001:d6:00.0 or 0001:d8:00.0 for new vm then it is throghing error "LibvirtException: XML error: Invalid PCI address slot='0xd6', must be <= 0x1F". xmlstarlet is already installed .


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204052368
@amitcsc1989 I didn't understand this. How many cards are on the host & how many are allocated? Can you share some screenshot?
> i have checked GPU discovery is posting additional PCI slot domain 0000 in discovery.
Also, can you confirm if you have xmlstarlet installed on the host?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204289730
sure . please let me know how i can help or any additional details do you want from my side .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4211376975
hi @amitcsc1989 could you test and confirm whether the issue is fixed or not?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204266766
@amitcsc1989 I won't be able to reproduce this on my current hardware. Will you be able to help me with testing this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204097746
@amitcsc1989 Please share the output of the gpudiscovery.sh from the host.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4205844167
@amitcsc1989 I have prepared a jar file which you can use to test this out.
1. Take a backup of `gpudiscovery.sh` in `/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm`
2. Replace gpudiscovery.sh with https://raw.githubusercontent.com/shapeblue/cloudstack/4e7a8346b7428889b5f286ede006882d5c2a9df0/scripts/vm/hypervisor/kvm/gpudiscovery.sh Ensure the permissions are correct and the script if executable.
3. Take a backup of `cloud-plugin-hypervisor-kvm-4.22.0.0.jar` in `/usr/share/cloudstack-agent/lib`
4. Extract the below jar file and replace in `/usr/share/cloudstack-agent/lib`
5. Restart the cloudstack-agent
[cloud-plugin-hypervisor-kvm-4.22.0.0.jar.gz](https://github.com/user-attachments/files/26566454/cloud-plugin-hypervisor-kvm-4.22.0.0.jar.gz)
P.S. - This shouldn't break anything, but please be careful. Revert the files from backup and restart the cloudstack agent again.
Let me know if this works.
Also, I am preparing a list of cards which have been tested with CloudStack. It will be great if you can share the card details you are testing with.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204181182
Thanks Vishesh , I'm waiting for the fix .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204312748
ok . i hope that will not imact running VM's . Please share i will run that and will share the output . kindly let me know the process as well to run that jar and bash script .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4211402980
@vishesh92 issue has been resolved post changes as suggested .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204173896
@amitcsc1989 I checked the code and it seems to be a bug. We seem to have used 0000 domain as the default. Let me try to create a fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204293650
Thanks @amitcsc1989 . I will share the jar and the bash file for testing once I have the fix ready.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4205700002
Hi Vishesh,
Please find the output of test gpu discovery script.
{ "gpus": [
{
"pci_address":"ae:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"vfio-pci",
"pci_class":"3D controller [0302]",
"iommu_group":"35",
"pci_root":"0000:ab:02.0",
"numa_node":0,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0xae",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":"i-2-385-VM"
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"b0:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"vfio-pci",
"pci_class":"3D controller [0302]",
"iommu_group":"36",
"pci_root":"0000:ab:02.0",
"numa_node":0,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0xb0",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":"i-2-361-VM"
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"0001:d6:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"nvidia",
"pci_class":"3D controller [0302]",
"iommu_group":"89",
"pci_root":"0001:d3:02.0",
"numa_node":1,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0001",
"bus":"0xd6",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":null
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"0001:d8:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"nvidia",
"pci_class":"3D controller [0302]",
"iommu_group":"90",
"pci_root":"0001:d3:02.0",
"numa_node":1,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0001",
"bus":"0xd8",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":null
},
"vgpu_instances":[],
"vf_instances":[]
}
]}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti closed issue #12960: CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping
URL: https://github.com/apache/cloudstack/issues/12960
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4205657815
@amitcsc1989 can you check if this script executes correctly on your host? Also, share the output of the below script.
https://raw.githubusercontent.com/shapeblue/cloudstack/4e7a8346b7428889b5f286ede006882d5c2a9df0/scripts/vm/hypervisor/kvm/gpudiscovery.sh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4204121080
Hi , Please find the details ../usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/gpudiscovery.sh
{ "gpus": [
{
"pci_address":"ae:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"vfio-pci",
"pci_class":"3D controller [0302]",
"iommu_group":"35",
"pci_root":"0000:ab:02.0",
"numa_node":0,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0xae",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":"i-2-385-VM"
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"b0:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"vfio-pci",
"pci_class":"3D controller [0302]",
"iommu_group":"36",
"pci_root":"0000:ab:02.0",
"numa_node":0,
"sriov_totalvfs":32,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0xb0",
"slot":"0x00",
"function":"0x0"
},
"used_by_vm":"i-2-361-VM"
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"0001:d6:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"unknown",
"pci_class":"3D controller [0302]",
"iommu_group":"null",
"pci_root":"0000:0001:d6:00.0",
"numa_node":-1,
"sriov_totalvfs":0,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0x00",
"slot":"0x1:",
"function":"0x6"
},
"used_by_vm":null
},
"vgpu_instances":[],
"vf_instances":[]
}
,
{
"pci_address":"0001:d8:00.0",
"vendor_id":"10de",
"device_id":"233b",
"vendor":"NVIDIA Corporation",
"device":"Device",
"driver":"unknown",
"pci_class":"3D controller [0302]",
"iommu_group":"null",
"pci_root":"0000:0001:d8:00.0",
"numa_node":-1,
"sriov_totalvfs":0,
"sriov_numvfs":0,
"max_instances":null,
"video_ram":null,
"max_heads":null,
"max_resolution_x":null,
"max_resolution_y":null,
"full_passthrough": {
"enabled":1,
"libvirt_address": {
"domain":"0x0000",
"bus":"0x00",
"slot":"0x1:",
"function":"0x8"
},
"used_by_vm":null
},
"vgpu_instances":[],
"vf_instances":[]
}
]}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "amitcsc1989 (via GitHub)" <gi...@apache.org>.
amitcsc1989 commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4193962108
i have checked GPU discovery is posting additional PCI slot domain 0000 in discovery. when i 'am trying to add one more vm then it is not allowing beacause already 2 vm's are running same domain id 0000. it should have free starting with 0001 domain . Kindly look into this .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CloudStack 4.22 – GPU passthrough VM creation fails due to invalid PCI slot mapping [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on issue #12960:
URL: https://github.com/apache/cloudstack/issues/12960#issuecomment-4220163305
Fixed in #12981
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org