Increase PCIe ports to support multiple input/ output devices per virtual machine
Summaryβ
When virtual machines need more than two network interfaces, the default allocation of PCIe ports can become a limitation. To resolve this, you need to manually increase the number of available PCIe ports in the VM configuration.
Key steps to resolve insufficient PCIe ports availableβ
- Increase the default limit on the PCIe ports available to CubeCOS
- Add additional PCIe root port devices.
- Attach extra network interfaces to these newly created ports.
- Restart or redefine the VM for changes to take effect.
This ensures the VM has enough PCIe slots to support multiple NICs without conflicts.
Detailsβ
Use this article if attaching multiple network interfaces to a virtual machine fails and you have not configured additional PCIe ports.
Applicable versionsβ
CubeCOS 3.0.0 and above.
This article applies to environments running CubeCOS version 3.0.0 or newer.
Resolutionβ
Configure Nova computing service to use maximum available PCIe portsβ
The default allocation of PCIe ports may be insufficient. To resolve this issue, set the maximum number of available PCIe ports manually to the maximum supported by CubeCOS in the configuration.
-
Open a terminal session.
-
Log into the cluster VIP as the
rootuser via SSH.ssh root@<your-cluster-vip> -
Create a new configuration file to set the maximum number of available PCIe ports manually to the maximum supported by CubeCOS.
touch /etc/nova/nova.d/pcie.conf -
Oepn the Nova configuration using the command:
vi /etc/nova/nova.d/pcie.conf -
Enter the following value into
pcie.confwithito start insert mode.The default number of enabled PCIe ports on CubeCOS is 0, and the maximum supported configuration is 28.
# Override number of enabled pcie ports[libvirt]num_pcie_ports = 28 -
Save and exit the editor after making changes with
:wq.
Sync the PCIe ports configuration file to all computing nodesβ
Sync the vTPM with a cluster-wide synchronization task to ensure that all compute nodes support the same PCIe ports. Note that the sync command is limited to nodes running a compute service, such as AIO, Compute, or Compute with Storage.
-
Sync the configuration file to all CubeCOS nodes running the compute service.
cubectl node -r compute rsync /etc/nova/nova.d/pcie.conf
Restart the Nova computing service on all compute service nodesβ
In order to implement the PCIe ports configuration, finish syncing the configuration file and then execute the following command to restart the service:
Before attaching additional network interfaces, confirm that the synchronization process has finished for all compute nodes.
-
Restart the Nova compute service on all nodes hosting the compute service.
cubectl node -r compute exec -p "hex_config restart_nova" -
Check the Nova service health on all compute service nodes.
cubectl node -r compute exec -p "systemctl status openstack-nova-compute | grep Active" -
The
openstack-nova-computeservice status must returnActivefor all compute service nodes.
Attach additional network interfaces to existing virtual machinesβ
After applying the configuration, the maximum number of PCIe ports will be supported by default for all newly created virtual machines. However, you must modify existing virtual machines before applying the configuration. Follow this procedure to configure an existing virtual machine to support the new maximum number of PCIe ports.
Use the GUI to re-configure existing virtual machinesβ
To support attaching multiple network interfaces to existing virtual machines after increasing the maximum number of PCIe ports, the virtual machine must be shelved and unshelved.
To avoid data loss and unexpected service disruptions, shut down the guest OS safely before proceeding.
You cannot perform shelving or unshelving operations while the virtual machine is active.
- Log in to the CubeCOS management interface, and navigate to the
OpenStackintegration. - Navigate to Compute > Instances, and locate the instance to modify.
- Prepare for shelving and unshelving by accessing the guest OS of the instance and shutting down the instance cleanly.
- Verify that the instance status is
Shutoffbefore proceeding. - Shelve the instance by hovering over
More, clickingInstance Status, and selectingshelve. - Unshelve the instance by hovering over
More, clickingInstance Status, and selectingunshelve. - Attach additional network interfaces as needed.
- Restart the virtual machine.
Use the CLI to re-configure existing virtual machinesβ
- Log in to the CubeCOS management interface, and navigate to the
OpenStackintegration. - Navigate to Compute > Instances, and locate the instance to modify.
- Clip on the instance ID to copy the instance ID.
- Prepare for shelving and unshelving by accessing the guest OS of the instance and shutting down the instance cleanly.
- Verify that the instance status is
Shutoffbefore proceeding. - Open a terminal session.
- Log into the cluster VIP as the
rootuser via SSH withssh root@<your-cluster-ip>. - Shelve the instance by executing
openstack server shelve --offload <vm-id>- Replace
<vm-id>with the ID obtained in step 3.
- Replace
- Unshelve the instance by executing
openstack server unshelve <vm-id> - Attach additional network interfaces as needed.
- Restart the virtual machine.