Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

q35 Nvida Bus Slot Allocation

Featured Replies

When creating a q35 VM how do I edit the bus and slot in the XML for Nvidia GPU

Edited by PeteyBoPetey
grammar

It is suggested to edit it manually in the xml view, so to be able to set the gpu correctly as multifunction.

As far as the code, take as an example these blocks, referring to my 6900 xt:

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

 

This includes 2 hostdev blocks, one for the video and one for the digital audio.

As far as buses/slots/functions: each hostdev block has 2 lines with "address"; the address line inside <source></source> is the address of the gpu in the host, the address unraid sees, in this case video is at source address 06:00.0 (video), audio is at 06:00.1 (audio). This address depends only the physical slot (it's the output of the lspci command).

The address line outside <source></source> is the address of the gpu you set in the vm: so you can change this as you want; in this case I set it to be at address 03:00.0 (video) and 03:00.1 (audio).

 

In the vm, for a q35 machine type you attach devices usually to pcie-root-port(s), this means that in this example to attach the gpu in the vm at address 03:00.0/1 you need a pcie-root-port defined with index 3 (same number as the target bus number):

    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0xc' hotplug='off'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.