GitHub user correajl added a comment to the discussion: GPU Support forKVM
Hi! I've used Nvidia GPUs with CloudStack in a totally manual way. You will
need to do PCI passthrough. Some steps:
- enable some global configs like 'allow.additional.vm.configuration.list.kvm =
devices,hostdev,driver,source,address,alias' and
'enable.additional.vm.configuration = true' in ACS.
- enable features in BIOS like Intel VT-d or AMD IOV on hosts.
- use IOMMU to create groups and isolate PCIe bus.
- use some parameters on hosts kernel like 'GRUB_CMDLINE_LINUX="video=efifb:off
intel_iommu=on iommu=pt kvm.ignore_msrs=1 rd.driver.pre=vfio-pci"' or
'GRUB_CMDLINE_LINUX="video=efifb:off amd_iommu=on iommu=pt kvm.ignore_msrs=1
rd.driver.pre=vfio-pci"'
- discover the PCI IDs and change grub again to something like
'GRUB_CMDLINE_LINUX="video=efifb:off intel_iommu=on intel_iommu=on
kvm.ignore_msrs=1 rd.driver.pre=vfio-pci vfio-pci.ids=10de:2484,10de:228b"'
(then GPUs is not used by host)
- create new compute offerings that uses "extra-config"
`cmk -p profile create serviceoffering name="VM with 2x RTX3070"
displaytext="VM with 2x RTX3070" customized=true storagetype=shared
provisioningtype=fat cpuspeed=1 mincpunumber=2 maxcpunumber=12 minmemory=2000
maxmemory=30000 offerha=false dynamicscalingenabled=false
hosttags=rtx3070-bus17 diskofferingstrictness=false
serviceofferingdetails[1].key=extraconfig-1
serviceofferingdetails[1].value="CHANGEINDATABASE" `
- find it in database:
`select so.name, so.id, sod.service_offering_id, sod.name, sod.value from
service_offering as so left join service_offering_details as sod on so.id =
sod.service_offering_id where so.state = "Active" and so.name = "VM with 2x
RTX3070";`
- chage it to an extra-config that uses your GPU (pci bus, etc):
Something like:
```
GitHub link:
https://github.com/apache/cloudstack/discussions/10638#discussioncomment-12949988
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]