Hi Wei,

Thanks, going to take a deeper look into this.

I assume I will have to add the list as following, to allow the XML below to be 
accepted by the API when I submit this encoded?

I set this to be allowed for KVM: 
domain,devices,hostdev,source,address,memballoon,rng,backend

It should reflect this XML part:

<domain>
  <device>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x81' slot='0x00' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0' 
multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0xc1' slot='0x00' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0' 
multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x81' slot='0x00' function='0x6'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' 
function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0xc1' slot='0x00' function='0x6'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' 
function='0x1'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' 
function='0x0'/>
    </memballoon>
    <rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' 
function='0x0'/>
    </rng>
  </device>
</domain>

I only need to figure out if domain and device are required or not but I will 
see when I test it out.

Thanks so far!

JeanPaul
________________________________
From: Wei ZHOU <ustcweiz...@gmail.com>
Sent: Sunday, February 12, 2023 5:23 PM
To: users@cloudstack.apache.org <users@cloudstack.apache.org>
Subject: Re: PCI-E Passthrough

I think you need to add additional configuration to vm.
Refer to
https://www.shapeblue.com/cloudstack-feature-first-look-enable-sending-of-arbitrary-configuration-data-to-vms/

-Wei



On Sunday, 12 February 2023, JeanPaul van der Mijle <
jp.vandermi...@hyperai.ai> wrote:

> Hi all,
>
> Does anyone have a good guide on adding a PCI-E card (A Mellanox Connect-X
> 5 VF interface) to cloudstack?
> I had this all running before in stock Qemu, and all settings are still
> present for the card and VF's, I just need to know how the management sees
> that I have additional cards that I have available to assign to VMs.
>
> I tried adding:
> pci.devices=100GE,81:00.2|100GE,81:00.3|100GE,81:00.4|
> 100GE,81:00.5|100GE,81:00.6|100GE,81:00.7|100GE,81:01.0|
> 100GE,81:01.1|100GE,c1:00.2|100GE,c1:00.3|100GE,c1:00.4|
> 100GE,c1:00.5|100GE,c1:00.6|100GE,c1:00.7|100GE,c1:01.0|100GE,c1:01.1
>
> However, after restarting the agent, I noticed that it added escape
> characters:
> pci.devices=100GE,81\:00.2|100GE,81\:00.3|100GE,81\:00.4|
> 100GE,81\:00.5|100GE,81\:00.6|100GE,81\:00.7|100GE,81\:01.0|
> 100GE,81\:01.1|100GE,c1\:00.2|100GE,c1\:00.3|100GE,c1\:00.4|
> 100GE,c1\:00.5|100GE,c1\:00.6|100GE,c1\:00.7|100GE,c1\:01.0|100GE,c1\:01.1
>
> Not sure if this is fine, but so far it was the only thing I could find
> back on google, but this is 10 years ago. I suspect this is no longer
> sufficient.
> After restarting the agent, I do not see any changes unfortunately.
>
> Thanks!
>
> JeanPaul
>
>

Reply via email to