You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VirtualBox iGPU透传疑问:Fedora下KVM PCI透传配置后挂载问题

Troubleshooting iGPU PCI Passthrough to VirtualBox on Fedora

Alright, let's work through your iGPU passthrough issue with VirtualBox on Fedora, building on the steps you've already knocked out successfully:

  • You enabled IOMMU and virtualization in your motherboard BIOS/UEFI (critical first step!)
  • You blocked the target device from being claimed by host kernel modules on boot
  • You verified IOMMU is active with dmesg | grep -i iommu – awesome that even VirtualBox's modules picked up on it!
  • You noticed via lspci -nnk that your iGPU isn't bound to vfio-pci but is occupied by another module (that's expected right now, but we need to fix that for passthrough)

Now let's dive into getting that iGPU passed to your VirtualBox VM. Here are the key steps and fixes to try:

1. Make Sure VirtualBox Has PCI Passthrough Support Turned On

VirtualBox doesn't do PCI passthrough out of the box – you need a couple of prerequisites:

  • Install the VirtualBox Extension Pack that matches your exact VirtualBox version. This is non-negotiable for PCI passthrough functionality.
  • Add your user to the vboxusers group with:
    sudo usermod -aG vboxusers $USER
    
    Log out and back in after running this so the group change takes effect.

2. Force Unbind the iGPU from the Host Kernel Module

Since lspci -nnk shows your iGPU is held by another module (probably Intel's i915 or AMD's amdgpu), we need to unbind it and hand it over to vfio-pci:

  • First, get the exact details of your iGPU:
    lspci -nnk | grep -A 3 "VGA compatible controller"
    
    Note down:
    • The PCI address (looks like 0000:XX:XX.X)
    • The vendor:device ID (looks like XXXX:XXXX)
    • The kernel driver currently in use (e.g., i915)
  • Temporarily unbind the driver for testing:
    # Replace i915 with your driver, and the PCI address with yours
    sudo modprobe -r i915
    sudo echo "0000:XX:XX.X" > /sys/bus/pci/drivers/i915/unbind
    
  • Now bind the iGPU to vfio-pci:
    sudo modprobe vfio-pci
    # Replace XXXX:XXXX with your vendor:device ID
    sudo echo "XXXX:XXXX" > /sys/bus/pci/drivers/vfio-pci/new_id
    
  • To make this permanent, create a systemd service that runs these commands on boot (so you don't have to do it manually every time).

3. Configure Your VirtualBox VM for iGPU Passthrough

  • Open your VM's settings, head to the PCI tab (this won't show up if you skipped the Extension Pack or group setup).
  • Click the "+" button to add a PCI device, then select your iGPU from the list.
  • Check the "Enable PCI passthrough" box for the device.
  • Switch the VM to EFI boot mode (iGPU passthrough almost always fails with legacy BIOS boot – go to System > Motherboard and set "Boot Order" to EFI).
  • Disable the VM's default virtual display adapter (since you'll use the iGPU's physical output): go to Display > Screen and set "Graphics Controller" to "None".

4. Fix Common iGPU Passthrough Headaches

  • Host is still using the iGPU: If your desktop environment is running on the iGPU, passthrough will fail. Switch to a text-only console before starting the VM:
    sudo systemctl isolate multi-user.target
    
    Switch back to the desktop later with sudo systemctl isolate graphical.target after shutting down the VM.
  • IOMMU Group conflicts: Ensure your iGPU is in its own IOMMU group (or a group with no other devices you need on the host). Check with:
    dmesg | grep -i "iommu group"
    
    If it's grouped with other devices, try enabling ACS override in your BIOS (if available) or moving the GPU to a different PCI slot.
  • Outdated VirtualBox: Make sure you're on the latest stable version – older builds have known bugs with iGPU passthrough.

If you're still hitting errors, share the exact message you get when starting the VM, plus the full output of lspci -nnk | grep -A 5 "VGA compatible controller" – that'll help zero in on the problem faster.

内容的提问来源于stack exchange,提问作者arielnmz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:57:05