<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>virtfusion — LowEndSpirit</title>
        <link>https://staging.lowendspirit.com/index.php?p=/</link>
        <pubDate>Fri, 05 Jun 2026 22:27:36 +0000</pubDate>
        <language>en</language>
            <description>virtfusion — LowEndSpirit</description>
    <atom:link href="https://staging.lowendspirit.com/index.php?p=/discussions/tagged/virtfusion/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>[HOWTO] Setup AMD iGPU passthrough with VirtFusion</title>
        <link>https://staging.lowendspirit.com/index.php?p=/discussion/5084/howto-setup-amd-igpu-passthrough-with-virtfusion</link>
        <pubDate>Sun, 18 Dec 2022 23:45:56 +0000</pubDate>
        <category>Technical</category>
        <dc:creator>webcraft</dc:creator>
        <guid isPermaLink="false">5084@/index.php?p=/discussions</guid>
        <description><![CDATA[<h1>iGPU passthrough with VirtFusion</h1>

<p>I've spend quite a lot of time setting up iGPU passthrough with an AMD processor. It was super easy with Intel's iGPU (VT-d) but not that easy with a Ryzen APU. Also thanks a lot for <a href="https://staging.lowendspirit.com/index.php?p=/profile/VirtFusion" rel="nofollow">@VirtFusion</a> for your efforts to implement such functionalities. In general this works quite similar with an external GPU or any other PCIe device, you just need to regroup the iommo-groups.</p>

<h1>Guide</h1>

<h2>Enable IOMMU in Motherboard UEFI</h2>

<p>As a first step, make sure that iommo is enabled in your motherboard's uefi. It should be really enabled and not in auto mode because I noticed that for some motherboards (e.g. MSI) auto doesn't work for some reason but enabled does.</p>

<h2>Install OS and VirtFusion</h2>

<p>Perform an installation from ISO without desktop environment (in theory you can use it along with a desktop programm but this will install packages which interfer with our setup). Install VirtFusion and configure networking and everything as described in their docs. Do not create a VM however. Also install <code>pciutils</code> which might not be part of a default installation but we'll need it later.</p>

<h2>Server setup</h2>

<p>Now comes the actual part of the passthrough procedure.<br />
The hypervisor may not load any drivers that activate the iGPU because the iGPU can only be accessed by one driver per startup. We need to tell the hypervisor kernel to not load any video modules by appending the following to the line <code>GRUB_CMDLINE_LINUX_DEFAULT=</code>:</p>

<pre><code># nano /etc/default/grub

amd_iommu=on initcall_blacklist=sysfb_init video=simplefb:off video=vesafb:off video=efifb:off video=vesa:off disable_vga=1 textonly vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=amdgpu,snd_hda_intel
</code></pre>

<p>Not all those flags might be necessary but they usually don't have any negative effects if they're set though they're not needed.<br />
In a next step we need to load vfio drivers which are used as passthrough drivers that host the iGPU as device in the virtual machine later.</p>

<p>DEBIAN</p>

<pre><code> # nano /etc/modules

 vfio
 vfio_iommu_type1
 vfio_pci
 vfio_virqfd
</code></pre>

<p>RHEL</p>

<pre><code> # vi /etc/modules-load.d/vfio-pci.conf

 vfio
 vfio_iommu_type1
 vfio-pci
 vfio_virqfd
</code></pre>

<p>Then we need to tell vfio which devices it should pass through. You can look up the device IDs of the iommo-group through pciutils with <code>lscpi -nnv</code>. Note that you have to list the IDs of all devices of the iommo-group to be passed on even if you don't use the sound device for instance.</p>

<pre><code># nano /etc/modprobe.d/vfio.conf

options vfio-pci ids=1002:1863,1002:1864
</code></pre>

<p>Then we update the grup config to reflect the new settings and restart the server:</p>

<pre><code>update-grub2 (RHEL: grub2-mkconfig -o /boot/grub2/grub.cfg)
update-initramfs -u -k all
reboot now
</code></pre>

<p>To verify you were successfull, run <code>lspci -nnv</code> and scroll down until you find your VGA compatible device and Audio device. If it says <code>Kernel driver in use: vfio-pci</code> you're all set.</p>

<h2>VirtFusion setup</h2>

<p>After having configured the hypervisor, it's time to create our first virtual machine in VirtFusion and configure it to use the iGPU through the previously created vfio virtual-devices.<br />
It may work with seabios (VirtFusion: "SMBIOS") and i440FX (VirtFusion: "PC") but only on compatibility layer hence we use Q35 (which supports PCIe and not only PCI like i440FX) and UEFI (because the vbios, see below, will be available for UEFI only on modern systems).<br />
<img src="https://lowendspirit.com/uploads/editor/5s/yco3jg71es5f.jpg" alt="" title="" /></p>

<p>The environmental variables of the virtual machine are now configured to work with vfio and an optional modern vbios. You can extract the vbios from the bios file of your motherboard vendor with e.g. GPU-Z. I've stored my vbios of the APU in this example at <code>/usr/share/kvm/vbios-cezanne.bin</code>.<br />
In order to make libvirt create the hostdevice for us, we need to configure it in the corresponding fields in VirtFusion. For compatibility reasons you can hide the kvm status but this isn't mendatory. Make sure to adapt the iommu-group number and the functions id to the one of your config. You get the values with <code>lscpi -nnv</code>.</p>

<pre><code>&lt;hostdev mode="subsystem" type="pci" managed="yes"&gt;
    &lt;driver name="vfio"/&gt;
    &lt;source&gt;
        &lt;address type="pci" domain="0x0000" bus="0x20" slot="0x00" function="0x0"/&gt;
    &lt;/source&gt;
    &lt;address type="pci" domain="0x0000" bus="0x00" slot="0x8" function="0x0"/&gt;
    &lt;rom bar="on" file="/usr/share/kvm/vbios-cezanne.bin"/&gt;
&lt;/hostdev&gt;
</code></pre>

<p><img src="https://lowendspirit.com/uploads/editor/nv/psojd1d1xem8.jpg" alt="" title="" /></p>

<p>Enable the custom elements you've filled out and update the config. Then restart the virtual machine.<br />
Do not assign a PCIe device (in this case the iGPU) to more than one virtual machine at a time or you'll get permission errors from vfio or driver errors.<br />
<strong>That's it.</strong> I hope this guide is helpful to you.</p>
]]>
        </description>
    </item>
   </channel>
</rss>
