Passing through a single Ethernet port while using the second for Unraid


majo23

Recommended Posts

HI, 

sry for beeing stupid, but all tutroials and posts are talking about using a networkcard or passing through ALL onboard Ports...

but i only need to passthrough a single one (of my two ports) to a vm.



I have a Asus P8B-M which has 2 Ethernet ports. One is in use for unraid the other one isn`t in use and i want to pass it through to VMs....

I managed to get them in separate IOMMU Groups but what now? 2021-10-15_23h25_08.thumb.png.5f95c0dd283f414252f9bc4ab97d7b67.png

 

Using append vfio-pci.ids=8086:10d3 would mean unraid loses both, right? So this would be quite bad^^ How to make only one free?

 

 

 

Here is my network config for port 2 (eth1) that i want to passthrough....

2021-10-15_23h31_26.thumb.png.a0e023f8f254d2af631a5595ee280c73.png

i tried to "Port Down" it, but didnt helped...

 

Maybe changing the VM XML? But i have no clue where to start, guides always refer to Networkcards but not to a single onBoardPort....

 <interface type='bridge'>
      <mac address='52:54:00:3f:fd:d9'/>
      <source bridge='br1'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x01' function='0x0'/>
    </interface>



any ideas?

 

Edited by majo23
Link to comment
12 hours ago, majo23 said:

One is in use for unraid the other one isn`t in use

The other one IS in use (I assume ethernet at 5:00.0 is eth1).

Any reason you are trying to passthrough the ethernet?Could you consider using the virtual bridged network br1 (the xml snippet does so..)?

So either passthrough the ethernet by attaching to vfio, or use a bridge: the difference is the vm in the first case will see the real ethernet card, in the other case it will create a virtual controller that will use the bridge connectivity.

 

Passthrough case:

Quote

Using append vfio-pci.ids=8086:10d3 would mean unraid loses both, right?

 

Correct, but starting from unraid 6.9, the setup in System devices page will bind the device both on vendor/device ids and domain:bus:slot.function, so in your case it will be setup like:

BIND=0000:05:00.0|8086:10d3

 

The issue here is that the ethernet will always be grabbed by unraid even if it's inactive.

And apparently you cannot isolate from the gui.

If I were you I woud:

1. backup the unraid usb, so to restore if something goes wrong

2. open config/vfio-pci.cfg with a text editor in the unraid usb stick

3. Add BIND=0000:05:00.0|8086:10d3

If you have multiple devices isolated just append them, for example:

BIND=0000:05:00.0|8086:10d3 0000:04:00.0|10de:100c 0000:04:00.1|10de:0e1a

 

Save and reboot, and your eth1 should now be isolated, without loosing eth0 connectivity for unraid.

Edited by ghost82
  • Like 1
Link to comment

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.