Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

vm missing psi-passthrough device if cpu pinning is in place

Dear Openstack community,

I am trying to setup a vm with bith pci-passthrough and cpu pinning.

This is my flavor:

[root@openstack-deployment ~]# openstack flavor show kudu.test.dedicated.tiny

+----------------------------+--------------------------------------------------------------+

| Field | Value |

+----------------------------+--------------------------------------------------------------+

| OS-FLV-DISABLED:disabled | False |

| OS-FLV-EXT-DATA:ephemeral | 0 |

| access_project_ids | None |

| disk | 10 |

| id | 7e241e94-1c50-4a92-9ce6-8abb272d79d8 |

| name | kudu.test.dedicated.tiny |

| os-flavor-access:is_public | True |

| properties | hw:cpu_policy='dedicated', hw:pci_passthrough:alias='nvme:1' |

| ram | 4096 |

| rxtx_factor | 1.0 |

| swap | |

| vcpus | 2 |

+----------------------------+--------------------------------------------------------------+

And this is how I create the vm:

[root@openstack-deployment ~]# openstack server create --flavor kudu.test.dedicated.tiny --image centos7.5-image --nic net-id=hpc --security-group admin --key-name mykey --availability-zone nova:zeus-53.localdomain kudu-test-3-1

The problem is that the vm does not have the nvme pci device attached to it.

[root@zeus-53 test]# docker exec -it nova_libvirt virsh dumpxml instance-000000ad

<domain type="kvm" id="9">

<name>instance-000000ad</name>

<uuid>5d8f6cc1-e716-4f4d-ac55-df24d4cffd38</uuid>

<metadata>

<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">

  <nova:package version="18.2.0-1.el7"/>

  <nova:name>kudu-test-3-1</nova:name>

  <nova:creationTime>2019-04-17 05:17:02</nova:creationTime>

  <nova:flavor name="kudu.test.dedicated.tiny">

    <nova:memory>4096</nova:memory>

    <nova:disk>10</nova:disk>

    <nova:swap>0</nova:swap>

    <nova:ephemeral>0</nova:ephemeral>

    <nova:vcpus>2</nova:vcpus>

  </nova:flavor>

  <nova:owner>

    <nova:user uuid="91e83343e9834c8ba0172ff369c8acac">admin</nova:user>

    <nova:project uuid="b91520cff5bd45c59a8de07c38641582">admin</nova:project>

  </nova:owner>

  <nova:root type="image" uuid="5ec18792-05f2-4bce-b5d8-cb3480cbb35a"/>

</nova:instance>

</metadata>

<memory unit="KiB">4194304</memory>

<currentmemory unit="KiB">4194304</currentmemory>

<vcpu placement="static">2</vcpu>

<cputune>

<shares>2048</shares>

<vcpupin vcpu='0' cpuset='9'/>

<vcpupin vcpu='1' cpuset='37'/>

<emulatorpin cpuset='9,37'/>

</cputune>

<numatune>

<memory mode='strict' nodeset='0'/>

<memnode cellid='0' mode='strict' nodeset='0'/>

</numatune>

<resource>

<partition>/machine</partition>

</resource>

<sysinfo type="smbios">

<system>

  <entry name='manufacturer'>RDO</entry>

  <entry name='product'>OpenStack Compute</entry>

  <entry name='version'>18.2.0-1.el7</entry>

  <entry name='serial'>00000000-0000-0000-0000-0cc47aa482cc</entry>

  <entry name='uuid'>5d8f6cc1-e716-4f4d-ac55-df24d4cffd38</entry>

  <entry name='family'>Virtual Machine</entry>

</system>

</sysinfo>

<os>

<type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>

<boot dev='hd'/>

<smbios mode='sysinfo'/>

</os>

<features>

<acpi/>

<apic/>

</features>

<cpu mode="custom" match="exact" check="full">

<model fallback='forbid'>Skylake-Client-IBRS</model>

<vendor>Intel</vendor>

<topology sockets='1' cores='1' threads='2'/>

<feature policy='require' name='ss'/>

<feature policy='require' name='hypervisor'/>

<feature policy='require' name='tsc_adjust'/>

<feature policy='require' name='stibp'/>

<feature policy='require' name='ssbd'/>

<feature policy='require' name='pdpe1gb'/>

<feature policy='disable' name='mpx'/>

<feature policy='disable' name='xsavec'/>

<feature policy='disable' name='xgetbv1'/>

<numa>

  <cell id='0' cpus='0-1' memory='4194304' unit='KiB'/>

</numa>

</cpu>

<clock offset="utc">

<timer name='pit' tickpolicy='delay'/>

<timer name='rtc' tickpolicy='catchup'/>

<timer name='hpet' present='no'/>

</clock>

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>destroy</on_crash>

<devices>

<emulator>/usr/libexec/qemu-kvm</emulator>

<disk type='file' device='disk'>

  <driver name='qemu' type='qcow2' cache='none'/>

  <source file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/disk'/>

  <backingStore type='file' index='1'>

    <format type='raw'/>

    <source file='/var/lib/nova/instances/_base/4cc6eebe175e35178cb81853818a1eb103cea937'/>

    <backingStore/>

  </backingStore>

  <target dev='vda' bus='virtio'/>

  <alias name='virtio-disk0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

</disk>

<controller type='usb' index='0' model='piix3-uhci'>

  <alias name='usb'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

</controller>

<controller type='pci' index='0' model='pci-root'>

  <alias name='pci.0'/>

</controller>

<interface type='bridge'>

  <mac address='fa:16:3e:45:ba:a1'/>

  <source bridge='qbr2a0abb35-29'/>

  <target dev='tap2a0abb35-29'/>

  <model type='virtio'/>

  <mtu size='1500'/>

  <alias name='net0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

</interface>

<serial type='pty'>

  <source path='/dev/pts/14'/>

  <log file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/console.log' append='off'/>

  <target type='isa-serial' port='0'>

    <model name='isa-serial'/>

  </target>

  <alias name='serial0'/>

</serial>

<console type='pty' tty='/dev/pts/14'>

  <source path='/dev/pts/14'/>

  <log file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/console.log' append='off'/>

  <target type='serial' port='0'/>

  <alias name='serial0'/>

</console>

<input type='tablet' bus='usb'>

  <alias name='input0'/>

  <address type='usb' bus='0' port='1'/>

</input>

<input type='mouse' bus='ps2'>

  <alias name='input1'/>

</input>

<input type='keyboard' bus='ps2'>

  <alias name='input2'/>

</input>

<graphics type='vnc' port='5901' autoport='yes' listen='192.168.1.53'>

  <listen type='address' address='192.168.1.53'/>

</graphics>

<video>

  <model type='cirrus' vram='16384' heads='1' primary='yes'/>

  <alias name='video0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

</video>

<memballoon model='virtio'>

  <stats period='10'/>

  <alias name='balloon0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

</memballoon>

</devices>

<seclabel type="dynamic" model="dac" relabel="yes">

<label>+42436:+42436</label>

<imagelabel>+42436:+42436</imagelabel>

</seclabel>

</domain>

However I do can see the nvme if I use a flavor without cpu pinning.

Has anyone seen this before?

Thank you

vm missing psi-passthrough device if cpu pinning is in place

Dear Openstack community,

I am trying to setup a vm with bith pci-passthrough and cpu pinning.

This is my flavor:

[root@openstack-deployment ~]# openstack flavor show kudu.test.dedicated.tiny

+----------------------------+--------------------------------------------------------------+

kudu.test.dedicated.tiny +----------------------------+--------------------------------------------------------------+ | Field | Value |

+----------------------------+--------------------------------------------------------------+

| +----------------------------+--------------------------------------------------------------+ | OS-FLV-DISABLED:disabled | False |

| | OS-FLV-EXT-DATA:ephemeral | 0 |

| | access_project_ids | None |

| | disk | 10 |

| | id | 7e241e94-1c50-4a92-9ce6-8abb272d79d8 |

| | name | kudu.test.dedicated.tiny |

| | os-flavor-access:is_public | True |

| | properties | hw:cpu_policy='dedicated', hw:pci_passthrough:alias='nvme:1' |

| | ram | 4096 |

| | rxtx_factor | 1.0 |

| | swap | |

| | vcpus | 2 |

+----------------------------+--------------------------------------------------------------+

| +----------------------------+--------------------------------------------------------------+

And this is how I create the vm:

[root@openstack-deployment ~]# openstack server create --flavor kudu.test.dedicated.tiny --image centos7.5-image --nic net-id=hpc --security-group admin --key-name mykey --availability-zone nova:zeus-53.localdomain kudu-test-3-1

The problem is that the vm does not have the nvme pci device attached to it.

[root@zeus-53 test]# docker exec -it nova_libvirt virsh dumpxml instance-000000ad

<domain type="kvm" id="9">

<name>instance-000000ad</name>

<uuid>5d8f6cc1-e716-4f4d-ac55-df24d4cffd38</uuid>

<metadata>

<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">

  <nova:package version="18.2.0-1.el7"/>

  <nova:name>kudu-test-3-1</nova:name>

  <nova:creationTime>2019-04-17 05:17:02</nova:creationTime>

  <nova:flavor name="kudu.test.dedicated.tiny">

    <nova:memory>4096</nova:memory>

    <nova:disk>10</nova:disk>

    <nova:swap>0</nova:swap>

    <nova:ephemeral>0</nova:ephemeral>

    <nova:vcpus>2</nova:vcpus>

  </nova:flavor>

  <nova:owner>

    <nova:user uuid="91e83343e9834c8ba0172ff369c8acac">admin</nova:user>

    <nova:project uuid="b91520cff5bd45c59a8de07c38641582">admin</nova:project>

  </nova:owner>

  <nova:root type="image" uuid="5ec18792-05f2-4bce-b5d8-cb3480cbb35a"/>

</nova:instance>

</metadata>

<memory unit="KiB">4194304</memory>

<currentmemory unit="KiB">4194304</currentmemory>

<vcpu placement="static">2</vcpu>

<cputune>

<shares>2048</shares>

<vcpupin vcpu='0' cpuset='9'/>

<vcpupin vcpu='1' cpuset='37'/>

<emulatorpin cpuset='9,37'/>

</cputune>

<numatune>

<memory mode='strict' nodeset='0'/>

<memnode cellid='0' mode='strict' nodeset='0'/>

</numatune>

<resource>

<partition>/machine</partition>

</resource>

<sysinfo type="smbios">

<system>

  <entry name='manufacturer'>RDO</entry>

  <entry name='product'>OpenStack Compute</entry>

  <entry name='version'>18.2.0-1.el7</entry>

  <entry name='serial'>00000000-0000-0000-0000-0cc47aa482cc</entry>

  <entry name='uuid'>5d8f6cc1-e716-4f4d-ac55-df24d4cffd38</entry>

  <entry name='family'>Virtual Machine</entry>

</system>

</sysinfo>

<os>

<type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>

<boot dev='hd'/>

<smbios mode='sysinfo'/>

</os>

<features>

<acpi/>

<apic/>

</features>

<cpu mode="custom" match="exact" check="full">

<model fallback='forbid'>Skylake-Client-IBRS</model>

<vendor>Intel</vendor>

<topology sockets='1' cores='1' threads='2'/>

<feature policy='require' name='ss'/>

<feature policy='require' name='hypervisor'/>

<feature policy='require' name='tsc_adjust'/>

<feature policy='require' name='stibp'/>

<feature policy='require' name='ssbd'/>

<feature policy='require' name='pdpe1gb'/>

<feature policy='disable' name='mpx'/>

<feature policy='disable' name='xsavec'/>

<feature policy='disable' name='xgetbv1'/>

<numa>

  <cell id='0' cpus='0-1' memory='4194304' unit='KiB'/>

</numa>

</cpu>

<clock offset="utc">

<timer name='pit' tickpolicy='delay'/>

<timer name='rtc' tickpolicy='catchup'/>

<timer name='hpet' present='no'/>

</clock>

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>destroy</on_crash>

<devices>

<emulator>/usr/libexec/qemu-kvm</emulator>

<disk type='file' device='disk'>

  <driver name='qemu' type='qcow2' cache='none'/>

  <source file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/disk'/>

  <backingStore type='file' index='1'>

    <format type='raw'/>

    <source file='/var/lib/nova/instances/_base/4cc6eebe175e35178cb81853818a1eb103cea937'/>

    <backingStore/>

  </backingStore>

  <target dev='vda' bus='virtio'/>

  <alias name='virtio-disk0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

</disk>

<controller type='usb' index='0' model='piix3-uhci'>

  <alias name='usb'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

</controller>

<controller type='pci' index='0' model='pci-root'>

  <alias name='pci.0'/>

</controller>

<interface type='bridge'>

  <mac address='fa:16:3e:45:ba:a1'/>

  <source bridge='qbr2a0abb35-29'/>

  <target dev='tap2a0abb35-29'/>

  <model type='virtio'/>

  <mtu size='1500'/>

  <alias name='net0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

</interface>

<serial type='pty'>

  <source path='/dev/pts/14'/>

  <log file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/console.log' append='off'/>

  <target type='isa-serial' port='0'>

    <model name='isa-serial'/>

  </target>

  <alias name='serial0'/>

</serial>

<console type='pty' tty='/dev/pts/14'>

  <source path='/dev/pts/14'/>

  <log file='/var/lib/nova/instances/5d8f6cc1-e716-4f4d-ac55-df24d4cffd38/console.log' append='off'/>

  <target type='serial' port='0'/>

  <alias name='serial0'/>

</console>

<input type='tablet' bus='usb'>

  <alias name='input0'/>

  <address type='usb' bus='0' port='1'/>

</input>

<input type='mouse' bus='ps2'>

  <alias name='input1'/>

</input>

<input type='keyboard' bus='ps2'>

  <alias name='input2'/>

</input>

<graphics type='vnc' port='5901' autoport='yes' listen='192.168.1.53'>

  <listen type='address' address='192.168.1.53'/>

</graphics>

<video>

  <model type='cirrus' vram='16384' heads='1' primary='yes'/>

  <alias name='video0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

</video>

<memballoon model='virtio'>

  <stats period='10'/>

  <alias name='balloon0'/>

  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

</memballoon>

</devices>

<seclabel type="dynamic" model="dac" relabel="yes">

<label>+42436:+42436</label>

<imagelabel>+42436:+42436</imagelabel>

</seclabel>

</domain>

However I do can see the nvme if I use a flavor without cpu pinning.

Has anyone seen this before?

Thank you