Real GPU drivers in VM


J05u

Recommended Posts

I have small question

Do i need to install GPU drivers like NVIDIA or Adrenalin for AMD at my VM, or if GPU detected is enough.

I installed Adrenalin 2020 drivers for my RX580 and VM not booting now, stucks on black screen or gives me error that windows failed to boot

Link to comment
3 hours ago, J05u said:

Do i need to install GPU drivers like NVIDIA or Adrenalin for AMD at my VM

If you don't install your own driver it will use windows default drivers. Some AMD users reported issues with newer drivers like you did. There are a couple things you can do. First of all check your xml from your VM and adjust the following

 

example from my xml with a Nvidia card, yours might look slightly different:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x43' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/Backup/vbios/Strix1080ti/AsusStrix1080TI_dump_edit.rom'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </hostdev>

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

First part is the GPU second part is the HDMI audio of the card. As you can see in my example, Unraid on default puts them both on different buses in the VM. Adjust the audio device so it sits on the same bus and set a different function for it. For my example I have to change the following for the audio device

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

to

      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>

So the bus "0x04" matches the GPU device and add +1 to the function of the GPU. For some people that fixed the driver issues with AMD. For other users they had to setup their VMs as Q35 machine type. I guess you use the default i440fx machine type. Might be worth a try.

Link to comment
46 minutes ago, bastl said:

If you don't install your own driver it will use windows default drivers. Some AMD users reported issues with newer drivers like you did. There are a couple things you can do. First of all check your xml from your VM and adjust the following

Thanks, i done things from suggestion above, but after this by some reason my Unraid server freeze and i have to reboot it manually, something strange happening with this VM :(

Link to comment

@J05u Make sure you edit the correct line in the XML! You can easily passing the wrong device to the VM which can cause the whole server to freeze. Maybe try to setup a new VM as Q35 for testing purpose. It's safer this way I think. Maybe posting some error logs and the XML and some more infos might be useful for people to help you.

  • Thanks 1
Link to comment

@bastl From 3rd attempt it work. At 2nd try i installed q35 machine, redhat drivers and tried GPU driver - failure. 

After searching a bit with error which i was getting i find out the right way.

So i installed Windows, Only network driver for VM and after went back to vm, passed though GPU and it's sound part (without XML editing), Started and connected to VM using RDP and installed driver, everything went fine, finally this machine is working

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