Featured image of post Resolving the PCI Device Addition Hang Issue in PVE Virtual Machines

Resolving the PCI Device Addition Hang Issue in PVE Virtual Machines

Issue Description: When adding PCI devices to OpenWrt or Ikuai virtual machines, a hang may occur. If you've encountered this issue...

Issue Description

When adding PCI devices to OpenWrt or Ikuai virtual machines, you may experience a hang. If you are facing this problem and have already grouped the IOMMU network card devices, you might want to try this solution.

Solution

Edit the file by running:

1
nano /etc/default/grub

Modify the line to change:

1
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"

to:

1
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_port_pm=off iommu=pt"

After making this change, run:

1
update-grub

Explanation of the Content

Adding the pcie_port_pm=off command when passing through network cards in PVE virtual machines can disable PCIe port power management.

Specifically, this command can:

  • Prevent PCIe ports from entering low power states, thereby enhancing the performance of the virtual machine’s network card.
  • Avoid instability in PCIe ports when in low power states.

Scenarios for Adding This Command:

  • Virtual machines using NVIDIA graphics cards might encounter issues with GPU drivers due to PCIe port power management.
  • Situations where maximum virtual machine network performance is required, such as network servers or virtualization firewalls.

How to Add This Command:

  • Add pcie_port_pm=off to the boot parameters of the PVE host.
  • Add pcie_port_pm=off to the configuration file of the virtual machine.

Cautions:

  • Adding this command may slightly increase the power consumption of the virtual machine.
  • If you are unsure whether you need to add this command, it is recommended to leave it out initially and add it only if necessary.
Licensed under CC BY-NC-SA 4.0