Jump to content
jonp

***GUIDE*** Passing Through Network Controllers to unRAID 6 Virtual Machines

142 posts in this topic Last Reply

Recommended Posts

Because of the IOMMU groups above you could pass two controllers through to each VM but not individually.  If you turn on the "PCIe ACS Override:" in VM settings you might be able to separate them but it still may not work.  If you don't turn on the ACS Override you will have better luck but you have to settle for passing both nics in the IOMMU group to the VM together.  So 04:00.0 & 04:00.1 would go to one VM and 05:00.0 & 05:00.1 to another.  I would expect that to work.  I must confess however I have never tried a quad nic card and pass through just my MB built in quad nics.

 

 

Edit: OH yes you can't just pass a single nic of the pair through at a time they would have to be passed together for it to work at all - if I'm right.

 

 

I have PCIe ACS Override on to pass through my GPU I believe.

 

I also tried passing through one, a pair, and all four but still receive the same error.

I would check with jonp now.  I am out of ideas.

Share this post


Link to post

5 - Obtain the vendor/product ID for that device from the last column.  00:19.0 from my example is 8086:153b.

6 - Edit your syslinux.cfg file and add the following after the append but before initrd=/bzroot.

Code: [select]

pci-stub.ids=8086:153b

 

what does this do?

 

i have a on board network and a pci 2 port

 

but all show up same

 

 

05:00.0 0200: 10ec:8168 (rev 0c)

06:00.0 0200: 10ec:8168 (rev 0c)

 

0d:00.0 0200: 10ec:8168 (rev 09)

 

 

i did add the 2 port to my vm and its working but what happens when i reboot the system? will unraid try to use it ?

 

Share this post


Link to post

Silly question, perhaps, but does this guide assume your CPU has VT-d support? Does this work if you only have VT-x?

Share this post


Link to post

Vt-d is a requirement for passing through PCI/pcie devices, so yes vt-d support is assumed.

Share this post


Link to post

Hi Guys!

Trying to add a network card to my pfsense vm.

 

3Com Corporation 3c940              37:09.0 0200: 10b7:1700

Realtek RTL8111/8168/8411          03:00.0 0200: 10ec:8168

 

Added pci-stub.ids=10ec:8168,10b7:1700 to my syslinux.cfg

rebooted

 

Added the following line to my .xml-file

(Im only testing ONE card at the moment for a proof of concept)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

    </hostdev>

 

That was changed to:

(2 last lines automatically added)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

    </hostdev>

 

However i receive the following error when trying to start the vm:

 

virsh start pfSense160325

error: Failed to start domain pfSense160325

error: internal error: early end of file from monitor: possible problem:

2016-03-25T20:01:38.358902Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to set iommu for container: Operation not permitted

2016-03-25T20:01:38.358943Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to setup container for group 13

2016-03-25T20:01:38.358957Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to get group 13

2016-03-25T20:01:38.358969Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device initialization failed

2016-03-25T20:01:38.358982Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device 'vfio-pci' could not be initialized

 

Any clues?!

Share this post


Link to post

Hi All...

 

Can anyone here recommend a good / Compatible multiport nic?... 6 ports ideally but 4 ports being acceptable... i'd like the ability to pass each NIC individually to V/Ms .... I have currently an 'Intel Pro/1000 PT Quad port LP SVR' but cant pass ports individually i have to pass them in pairs to my V/Ms

 

Cheers

Share this post


Link to post

I have the SAME Exact Problem. Trying to install Astaro Security Gateway in a physically separated Network VM...

The XML gets "appended with a "special" line without any of my action AND the VM won't start.

My cpu supports all the VM shananagans

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

 

Don't know what to do...

 

Hi Guys!

Trying to add a network card to my pfsense vm.

 

3Com Corporation 3c940              37:09.0 0200: 10b7:1700

Realtek RTL8111/8168/8411          03:00.0 0200: 10ec:8168

 

Added pci-stub.ids=10ec:8168,10b7:1700 to my syslinux.cfg

rebooted

 

Added the following line to my .xml-file

(Im only testing ONE card at the moment for a proof of concept)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

    </hostdev>

 

That was changed to:

(2 last lines automatically added)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

    </hostdev>

 

However i receive the following error when trying to start the vm:

 

virsh start pfSense160325

error: Failed to start domain pfSense160325

error: internal error: early end of file from monitor: possible problem:

2016-03-25T20:01:38.358902Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to set iommu for container: Operation not permitted

2016-03-25T20:01:38.358943Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to setup container for group 13

2016-03-25T20:01:38.358957Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to get group 13

2016-03-25T20:01:38.358969Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device initialization failed

2016-03-25T20:01:38.358982Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device 'vfio-pci' could not be initialized

 

Any clues?!

Share this post


Link to post

I have the SAME Exact Problem. Trying to install Astaro Security Gateway in a physically separated Network VM...

The XML gets "appended with a "special" line without any of my action AND the VM won't start.

My cpu supports all the VM shananagans

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

 

Don't know what to do...

 

Hi Guys!

Trying to add a network card to my pfsense vm.

 

3Com Corporation 3c940              37:09.0 0200: 10b7:1700

Realtek RTL8111/8168/8411          03:00.0 0200: 10ec:8168

 

Added pci-stub.ids=10ec:8168,10b7:1700 to my syslinux.cfg

rebooted

 

Added the following line to my .xml-file

(Im only testing ONE card at the moment for a proof of concept)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

    </hostdev>

 

That was changed to:

(2 last lines automatically added)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x37' slot='0x09' function='0x0'/>

      </source>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

    </hostdev>

 

However i receive the following error when trying to start the vm:

 

virsh start pfSense160325

error: Failed to start domain pfSense160325

error: internal error: early end of file from monitor: possible problem:

2016-03-25T20:01:38.358902Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to set iommu for container: Operation not permitted

2016-03-25T20:01:38.358943Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to setup container for group 13

2016-03-25T20:01:38.358957Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: vfio: failed to get group 13

2016-03-25T20:01:38.358969Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device initialization failed

2016-03-25T20:01:38.358982Z qemu-system-x86_64: -device vfio-pci,host=37:09.0,id=hostdev0,bus=pci.2,addr=0x6: Device 'vfio-pci' could not be initialized

 

Any clues?!

 

You should try this from the unraid wiki

 

The extra line added is supposed to be added. It is the address inside the specific VM. So nothing to worry about.

 

 <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

Share this post


Link to post

I have tried to follow the OP's directions and cannot get this working. I want to pass through a quad port NIC to a VM.

 

lspci reports the 4 port card as this:

 

04:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) (rev 06)
04:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) (rev 06)
05:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) (rev 06)
05:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) (rev 06)

 

lspci -n reports:

 

04:00.0 0200: 8086:10bc (rev 06)
04:00.1 0200: 8086:10bc (rev 06)
05:00.0 0200: 8086:10bc (rev 06)
05:00.1 0200: 8086:10bc (rev 06)

 

I've edited syslinux.cfg to add this line:

 

  append pci-stub.ids=8086:10bc initrd=/bzroot

 

I've added this to the xml for the vm:

 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
    </hostdev>

 

After I add this, I click "update" to save the changes. When I look at the XML again it shows an extra line which I've bolded:

 

  <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>    <----This line was added.
    </hostdev>

 

When I try to start the VM, I get "Execution error, Requested operation is not valid: PCI device 0000:04:00.0 is not assignable."

 

I'm running unraid 6.1.9 pro.  Would appreciate some help.

 

 

 

 

Share this post


Link to post

You have only passed through one of the ports on your card. You need to add three more hostdev tags with the PCI number if you want all four.

It's normal that there is a line added, so nothing to worry about.

Share this post


Link to post

@saag  I have added all 4 of the nics on the card to xml, but I still get the same error "Execution error, Requested operation is not valid: PCI device 0000:04:00.0 is not assignable." 

 

I checked the bios and vt-d is enabled. Are there any other bios settings to check?

 

Here's xml I added for the 4 ports:

 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x09' function='0x0'/>
    </hostdev>

Share this post


Link to post

Have you turned on the ACS override in the VM settings?

Your network card is in groups with other devices.

Share this post


Link to post

I saw this error message in the libvirtd log: internal error: Device 0000:04:00.0 is behind a switch lacking ACS and cannot be assigned

 

So I turned on the ACS override option. After rebooting, tried to start the VM, but got the same error message as before.

Share this post


Link to post

I saw this error message in the libvirtd log: internal error: Device 0000:04:00.0 is behind a switch lacking ACS and cannot be assigned

 

So I turned on the ACS override option. After rebooting, tried to start the VM, but got the same error message as before.

You could try to add allow_unsafe_assigned_interrupts=1  in your syslinux.cfg after append and see if that changes anything.

Share this post


Link to post

You could try to add allow_unsafe_assigned_interrupts=1  in your syslinux.cfg after append and see if that changes anything.

 

I've added allow_unsafe_assigned_interrupts=1 to syslinux.cfg and tried it with and without the ACS override. I still get the same error.

 

Thanks for your help saarg. I appreciate your efforts.

 

Update:  I think I've got this working now. The answer was to uncomment relaxed_acs_check = 1 in /etc/libvirt/qemu.conf.

Update:  Turned off PCIe ACS override, rebooted. Confirmed that VM still starts up without error

Update:  Removed vfio_iommu_type1.allow_unsafe_interrupts=1 from syslinux.cfg. Confirmed that VM starts up without error.

Share this post


Link to post

Sorry to revive an old thread. But how do I pass through a NIC with multiple ports? I followed John's original post and can get the NIC to pass through however I only see one port, the other three are not available.

Share this post


Link to post

Sorry to revive an old thread. But how do I pass through a NIC with multiple ports? I followed John's original post and can get the NIC to pass through however I only see one port, the other three are not available.

A little more info would be nice to have.

Post the  VM's XML and which operating system is it?

Which PCI numbers do the card have?

Share this post


Link to post

The OS is PFSense. The NIC is an Intel I350.

 

8086:1521

 

07:00:0

07:00:1

07:00:2

07:00:3

 

<domain type='kvm'>

  <name>PFSense</name>

  <uuid>13ba092b-df1b-cc8a-e2bf-d544dff69a57</uuid>

  <metadata>

    <vmtemplate name="Custom" icon="freebsd.png" os="freebsd"/>

  </metadata>

  <memory unit='KiB'>4194304</memory>

  <currentMemory unit='KiB'>4194304</currentMemory>

  <memoryBacking>

    <nosharepages/>

    <locked/>

  </memoryBacking>

  <vcpu placement='static'>3</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='6'/>

    <vcpupin vcpu='2' cpuset='7'/>

  </cputune>

  <os>

    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='3' threads='1'/>

  </cpu>

  <clock offset='utc'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='no'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>restart</on_crash>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/cache/vdisks/PFSense/vdisk1.img'/>

      <target dev='hdb' bus='virtio'/>

      <boot order='1'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/user/ISOs/pfSense-CE-2.3.1-RELEASE-amd64.iso'/>

      <target dev='hda' bus='sata'/>

      <readonly/>

      <boot order='2'/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <controller type='usb' index='0' model='ich9-ehci1'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci1'>

      <master startport='0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>

    </controller>

    <controller type='sata' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>

    </controller>

    <controller type='pci' index='0' model='pcie-root'/>

    <controller type='pci' index='1' model='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <controller type='virtio-serial' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:d7:76:76'/>

      <source bridge='br0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </interface>

    <serial type='pty'>

      <target port='0'/>

    </serial>

    <console type='pty'>

      <target type='serial' port='0'/>

    </console>

    <channel type='unix'>

      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/PFSense.org.qemu.guest_agent.0'/>

      <target type='virtio' name='org.qemu.guest_agent.0'/>

      <address type='virtio-serial' controller='0' bus='0' port='1'/>

    </channel>

    <input type='tablet' bus='usb'/>

    <input type='mouse' bus='ps2'/>

    <input type='keyboard' bus='ps2'/>

    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'>

      <listen type='address' address='0.0.0.0'/>

    </graphics>

    <video>

      <model type='vmvga' vram='16384' heads='1'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>

    </memballoon>

<hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

      </source>

    </hostdev>

  </devices>

</domain>

 

I want the Intel Quad NIC to be accessible only via PFSense. I followed John's instruction however only one port on the NIC comes through (igb0). Even when I selected PCIe ACS Override.

Share this post


Link to post

The OS is PFSense. The NIC is an Intel I350.

 

8086:1521

 

07:00:0

07:00:1

07:00:2

07:00:3

 

<domain type='kvm'>

  <name>PFSense</name>

  <uuid>13ba092b-df1b-cc8a-e2bf-d544dff69a57</uuid>

  <metadata>

    <vmtemplate name="Custom" icon="freebsd.png" os="freebsd"/>

  </metadata>

  <memory unit='KiB'>4194304</memory>

  <currentMemory unit='KiB'>4194304</currentMemory>

  <memoryBacking>

    <nosharepages/>

    <locked/>

  </memoryBacking>

  <vcpu placement='static'>3</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='6'/>

    <vcpupin vcpu='2' cpuset='7'/>

  </cputune>

  <os>

    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <cpu mode='host-passthrough'>

    <topology sockets='1' cores='3' threads='1'/>

  </cpu>

  <clock offset='utc'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='no'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>restart</on_crash>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/cache/vdisks/PFSense/vdisk1.img'/>

      <target dev='hdb' bus='virtio'/>

      <boot order='1'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/user/ISOs/pfSense-CE-2.3.1-RELEASE-amd64.iso'/>

      <target dev='hda' bus='sata'/>

      <readonly/>

      <boot order='2'/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <controller type='usb' index='0' model='ich9-ehci1'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci1'>

      <master startport='0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>

    </controller>

    <controller type='sata' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>

    </controller>

    <controller type='pci' index='0' model='pcie-root'/>

    <controller type='pci' index='1' model='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <controller type='virtio-serial' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:d7:76:76'/>

      <source bridge='br0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </interface>

    <serial type='pty'>

      <target port='0'/>

    </serial>

    <console type='pty'>

      <target type='serial' port='0'/>

    </console>

    <channel type='unix'>

      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/PFSense.org.qemu.guest_agent.0'/>

      <target type='virtio' name='org.qemu.guest_agent.0'/>

      <address type='virtio-serial' controller='0' bus='0' port='1'/>

    </channel>

    <input type='tablet' bus='usb'/>

    <input type='mouse' bus='ps2'/>

    <input type='keyboard' bus='ps2'/>

    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'>

      <listen type='address' address='0.0.0.0'/>

    </graphics>

    <video>

      <model type='vmvga' vram='16384' heads='1'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>

    </memballoon>

<hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

      </source>

    </hostdev>

  </devices>

</domain>

 

I want the Intel Quad NIC to be accessible only via PFSense. I followed John's instruction however only one port on the NIC comes through (igb0). Even when I selected PCIe ACS Override.

You need to add a hostdev tag for every device you want to pass through. You have only passed through the first port.

Share this post


Link to post
07:00:0

07:00:1

07:00:2

07:00:3

 

...

<hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

      </source>

    </hostdev>

...

You have not loaded the above correctly.  "07" is the bus not the slot and you need to load all of them not just one as saarg said.

 

 

So replace:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      </source>
    </hostdev>

 

 

With this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x1'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x2'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x3'/>
      </source>
    </hostdev>

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.