How to Enable PCI Resource Class Based Placement Reporting in Nova
Problem
By default the PCI resource class based placement reporting is not enabled in nova, which will affect the requirement to maintain the inventory of our GPUs in the cluster.
Environment
- Self-Hosted Private Cloud Director Virtualization - v2025.6 and Higher
- Component - GPU, Nova.
Procedure
To enable PCI resource class based placement reporting in nova, it is required pass the report_in_placement=True in nova_override.conf as shown below:
$ cat /opt/pf9/etc/nova/conf.d/nova_override.conf | grep -i pci -A 5[pci]report_in_placement=TrueThis will enable PCI resources which are reported with default resource class name of format CUSTOM_PCI_{vendor_id}_{product_id}
Validation
Post enabling the PCI resource class based placement reporting in nova-override.conf, the PCI with resource class will start getting reported to placement from ostackhost logs. Please find the sample traces from Ostackhost logs below:
INFO nova.compute.pci_placement_translator Placement PCI resource view: Placement PCI view on elaborate-rate.metalseed.io: RP([RESOURCE_NAME], CUSTOM_PCI_10DE_27B8=1, traits=COMPUTE_MANAGED_PCI_DEVICE)INFO nova.scheduler.client.report Created resource provider record via placement API for resource provider with UUID [UUID] and name [RESOURCE_NAME]INFO nova.scheduler.client.report Performing resource provider inventory and allocation data migration.Validation from the mysql placement table. Sample output:
MySQL [placement]> select * from resource_classes where name="CUSTOM_PCI_10DE_27B8";+---------------------+------------+-------+----------------------+| created_at | updated_at | id | name |+---------------------+------------+-------+----------------------+| 2025-10-13 03:06:23 | NULL | 10000 | CUSTOM_PCI_10DE_27B8 |+---------------------+------------+-------+----------------------+MySQL [placement]> select * from inventories where resource_class_id=10000;+---------------------+---------------------+----+----------------------+-------------------+-------+----------+----------+----------+-----------+------------------+| created_at | updated_at | id | resource_provider_id | resource_class_id | total | reserved | min_unit | max_unit | step_size | allocation_ratio |+---------------------+---------------------+----+----------------------+-------------------+-------+----------+----------+----------+-----------+------------------+| 2025-10-13 03:06:23 | 2025-10-13 03:06:23 | 31 | 11 | 10000 | 1 | 0 | 1 | 1 | 1 | 1 |+---------------------+---------------------+----+----------------------+-------------------+-------+----------+----------+----------+-----------+------------------+Validation using Openstack cli:
(openstack) resource provider inventory list [INVENTORY_UUID];+----------------------+------------------+----------+----------+----------+-----------+-------+------+| resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total | used |+----------------------+------------------+----------+----------+----------+-----------+-------+------+| CUSTOM_PCI_10DE_27B8 | 1.0 | 1 | 1 | 0 | 1 | 1 | 1 |+----------------------+------------------+----------+----------+----------+-----------+-------+------+