Jump to content

Aika

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Aika

  1. On 8/14/2020 at 9:47 AM, twiikker said:

    Hi.

     

    Here is how i did it with official drivers.

     

    My setup.

    Unraid 6.9.0-beta25

    AMD 3700x / GT1030

     

    Requirements.

    1. Dumped vbios rom with GPUZ and removed nvflash header with hexeditor.

    I had to dump mine even though techpowerup had exact model but i have 2 years newer revision.

    Guide for making that dump: https://www.youtube.com/watch?v=1IP-h9IKof0

     

    2. Having your GPU in own IOMMU group

    Info about that: https://www.youtube.com/watch?v=qQiMMeVNw-o

    My example at Tools>System Devices

    IOMMU group 18: [1022:43ea] 03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea

                             [10de:1d01] 04:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)

                             [10de:0fb8] 04:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)

     

    3. UEFI / BIOS Settings:

    Have virtualizion enabled in bios and other setting to help separating IOMMU groups.

    My example.

     

    Tweaker -> Advanced CPU Settings -> SVM Mode -> Enable

    Settings -> Miscellaneous -> IOMMU -> Enable

    Settings -> AMD CBS -> ACS Enable -> Enable

    Settings -> AMD CBS -> Enable AER Cap -> Enable

    There is also SR-IOV setting somewhere.

     

    There is also PCIe ACS override setting in unraid to help separate IOMMU groups.

    Setting>VM Manager and select advanced view.

     

     

    Installation

     

    Create VM:

    Add VM>Windows 10

     

    CPU Mode: Host Passtrough

    Machine: Q35-5.0

    BIOS: OVMF

    Select OS install ISO. I used Windows 10 1909 version.

    Download and select Virtio ISO. I used virtio-win-0.1.185.iso.

    Select suitable disk size. 50G on mine.

    Graphics as VNC.

     

    Uncheck start VM after creation.

    Create.

     

    Edit and change to xml view.

     

    Add this under <apic/> tag

    <ioapic driver='kvm'/>

     

    Change hyper-V settings to look like this and add kvm setting after it:

      <hyperv>
          <relaxed state='on'/>
          <vapic state='on'/>
          <spinlocks state='on' retries='8191'/>
          <vendor_id state='on' value='1234567890ab'/>
      </hyperv>
        <kvm>
          <hidden state='on'/>
        </kvm>

     

    In my case for ryzen i need to apply fix for bluescreen KERNEL SECURITY CHECK ISSUE.

    Add this to end of xml between   </devices> and </domain>

      <qemu:commandline>
        <qemu:arg value='-cpu'/>
        <qemu:arg value='host,kvm=off,hv_vendor_id=null,topoext=on,invtsc=on,hv-time,hv-relaxed,hv-vapic,hv-spinlocks=0x1fff,hv-vpindex,hv-synic,hv-stimer,hv-reset,hv-frequencies,host-cache-info=on,l3-cache=off,-amd-stibp'/>
        <qemu:arg value='-machine'/>
        <qemu:arg value='q35,kernel_irqchip=on'/>
      </qemu:commandline>

     

    As for others you can try these lines if those are enough.

    <qemu:commandline> 
         <qemu:arg value='-cpu'/> 
         <qemu:arg value='host,kvm=off,hv_vendor_id=null'/>
         <qemu:arg value='-machine'/> 
         <qemu:arg value='q35,kernel_irqchip=on'/> 
       </qemu:commandline>

     

    UPDATE

     

    Start VM and take VNC connection ASAP to be able to press any key.

     

    Select language preferences next and install.

    I don't have product key (set it after install)

    Select your windows version. (My case 10 Pro)

    Accept terms.

    Custon: Install Windows only (advanced)

    Load driver>Browse>virtio-win-0.1.185>amd64>w10

    Red Hat VirtIO SCSI controller>Next

    Load driver>Browse>virtio-win-0.1.185>NetKVM>w10>amd64

    Red Hat VirtIO Ethernet Adapter>Next

    (You can add network later after installation also)

    Select drive and next.

     

    Set your personal account and privacy settings

     

    You should be at your windows 10 desktop now.

    Open start menu and type compmgmt.msc and open.

    Open Device Manager.

    On my case there are 2 devices without drivers.

    Right click on driverless device and select update driver>Browse my computer>select whole virtio disk.

     

    Enable RDP

    Write "This PC" on start menu > right click on it > properties

    From right press "Change settings" > Take note on Full Computer Name > remote tab

    Check "Allow remote connections" > uncheck tab below it > OK.

     

    Test rdp connection to VM.

    If it doesnt work. Fix it before you continue.

    Shutdown VM.

     

    Edit VM in form view.

    Press + on VNC selection to add another graphics card.

    select your GPU and select vbios for your card.

    select nvidia audio controller as sound card if it is in same IOMMU group.

    (Optionally select attached KB+mouse)

    Update

     

    Now go back to edit and change to xml view.

    Add those qemu commandlines again which we did earlier as basic view gets rid of them.

    Disable VNC by removing <graphics> and </graphics> and everything between them.

    Same on <video> and </video>.

    Update.

     

    Start VM

     

    You should see it boot on attached monitor.

    Use RDP or kb+mouse to install gpu drivers.

    I use 399.24 version. Haven't tested on later versions.

    I get error after installation that there drivers are not suitable but seems to work fine.

     

    You should have now Windows 10 VM with gpu passtrough.

     

    Hope this helps!

     

    Twiikker

     

     

    Hi, what motherboard are you using? and what firmware version?

×
×
  • Create New...