Featured image of post Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

PVE (Proxmox Virtual Environment) is a popular open-source virtualization platform that offers powerful features and management tools...

PVE (Proxmox Virtual Environment) is a widely used open-source virtualization platform that provides robust features and management tools. One of its key functionalities is network interface card (NIC) passthrough, which can enhance the network performance of virtual machines. For more detailed information about the benefits of NIC passthrough, you can refer to the linked article: https://bmzhp.com/knowledge/456.

Here are the steps and precautions for setting up NIC passthrough in PVE:

  1. Check Hardware Compatibility: Before starting the setup, ensure that your server hardware supports virtualization technologies such as Intel VT-d or AMD IOMMU. You can find the relevant options in the server’s BIOS settings and enable them.
    Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

  2. Edit /etc/default/grub
    Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

    • Open the grub configuration file: nano /etc/default/grub
    • Locate the line GRUB_CMDLINE_LINUX_DEFAULT="quiet"
    • Modify it to: GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
    • Press Ctrl + X to save and exit (press Y to confirm).
    • If you are using an AMD CPU, it should be: GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"
  3. Update grub Configuration: Run the command: update-grub
    Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

  4. Modify Kernel Modules: Edit the modules file with the command: nano /etc/modules and add the following modules:

    • vfio
    • vfio_iommu_type1
    • vfio_pci
    • vfio_virqfd
    • kvmgt
      Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines
  5. Update initramfs: Run the command: update-initramfs -u -k all
    Steps to Set Up NIC Passthrough for PVE 8.1.x Virtual Machines

  6. Save and Reboot: Finally, save all changes and reboot the server: reboot

At this point, all the configuration is complete. In fact, if you are not using Ikuai or OpenWRT, there may be no need to set up NIC passthrough, as paravirtualization works quite well.

Licensed under CC BY-NC-SA 4.0