Jumbo_Erdnuesse

Members
  • Posts

    28
  • Joined

  • Last visited

Community Answers

  1. Jumbo_Erdnuesse's post in Unraid 6.11.5 Windows 10 VM Video is slow was marked as the answer   
    I 'solved' the problem by switching from PCIe Soundcard to USB Soundcard.
  2. Jumbo_Erdnuesse's post in I don't have IOMMU? was marked as the answer   
    Your system does not support IOMMU. It was in the cpus from AMD since the Athlon Processor ermerged. Intel only had that feature in their Xeon processors. For consumers IOMMU was available from Intel since 2011. The Core I7 2600 has IOMMU the Core I7 2600K did not support it. Not all mainboards had options in their BIOS to turn that on. Since the Core 4000 series it became part of all Intel platform chipsets and cpus.
  3. Jumbo_Erdnuesse's post in Gaming VM wont output video was marked as the answer   
    I installed Windows 11 on a vm yesterday. It worked but i get error code 43 during the installation process. This error solved itself on a reboot of the vm prior to installation of the video card driver. I used the same method i described in my post linked above for installing the windows 10 vm.
     
    That is my Windows 11 VM XML file:
     
    <?xml version='1.0' encoding='UTF-8'?>
    <domain type='kvm'>
      <name>Windows 11</name>
      <uuid>UUID</uuid>
      <metadata>
        <vmtemplate xmlns="unraid" name="Windows 11" icon="windows11.png" os="windowstpm"/>
      </metadata>
      <memory unit='KiB'>33554432</memory>
      <currentMemory unit='KiB'>33554432</currentMemory>
      <memoryBacking>
        <nosharepages/>
      </memoryBacking>
      <vcpu placement='static'>16</vcpu>
      <cputune>
        <vcpupin vcpu='0' cpuset='4'/>
        <vcpupin vcpu='1' cpuset='16'/>
        <vcpupin vcpu='2' cpuset='5'/>
        <vcpupin vcpu='3' cpuset='17'/>
        <vcpupin vcpu='4' cpuset='6'/>
        <vcpupin vcpu='5' cpuset='18'/>
        <vcpupin vcpu='6' cpuset='7'/>
        <vcpupin vcpu='7' cpuset='19'/>
        <vcpupin vcpu='8' cpuset='8'/>
        <vcpupin vcpu='9' cpuset='20'/>
        <vcpupin vcpu='10' cpuset='9'/>
        <vcpupin vcpu='11' cpuset='21'/>
        <vcpupin vcpu='12' cpuset='10'/>
        <vcpupin vcpu='13' cpuset='22'/>
        <vcpupin vcpu='14' cpuset='11'/>
        <vcpupin vcpu='15' cpuset='23'/>
      </cputune>
      <os>
        <type arch='x86_64' machine='pc-q35-7.1'>hvm</type>                        <- machine type
        <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader>
        <nvram>/etc/libvirt/qemu/nvram/UUID_VARS-pure-efi-tpm.fd</nvram>
      </os>
      <features>
        <acpi/>
        <apic/>
        <hyperv mode='custom'>
          <relaxed state='on'/>
          <vapic state='on'/>
          <spinlocks state='on' retries='8191'/>
          <vendor_id state='on' value='1234567890ab'/>                                       <- modified features section to prevent error 43
        </hyperv>
        <kvm>
          <hidden state='on'/>
        </kvm>
      </features>
      <cpu mode='host-passthrough' check='none' migratable='on'>
        <topology sockets='1' dies='1' cores='8' threads='2'/>
        <cache mode='passthrough'/>
        <feature policy='require' name='topoext'/>
      </cpu>
      <clock offset='localtime'>
        <timer name='hypervclock' present='yes'/>
        <timer name='hpet' present='no'/>
      </clock>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>restart</on_crash>
      <devices>
        <emulator>/usr/local/sbin/qemu</emulator>
        <disk type='file' device='disk'>
          <driver name='qemu' type='raw' cache='writeback'/>
          <source file='/mnt/user/domains/Windows 11/vdisk1.img'/>
          <target dev='hdc' bus='virtio'/>
          <boot order='1'/>
          <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
        </disk>
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <source file='/mnt/user/isos/windows11.iso'/>
          <target dev='hda' bus='sata'/>
          <readonly/>
          <boot order='2'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <source file='/mnt/user/isos/virtio-win-0.1.225-2.iso'/>
          <target dev='hdb' bus='sata'/>
          <readonly/>
          <address type='drive' controller='0' bus='0' target='0' unit='1'/>
        </disk>
        <controller type='pci' index='0' model='pcie-root'/>
        <controller type='pci' index='1' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='1' port='0x10'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
        </controller>
        <controller type='pci' index='2' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='2' port='0x11'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
        </controller>
        <controller type='pci' index='3' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='3' port='0x12'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
        </controller>
        <controller type='pci' index='4' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='4' port='0x13'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
        </controller>
        <controller type='pci' index='5' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='5' port='0x14'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
        </controller>
        <controller type='pci' index='6' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='6' port='0x8'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
        </controller>
        <controller type='pci' index='7' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='7' port='0x9'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
        </controller>
        <controller type='virtio-serial' index='0'>
          <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
        </controller>
        <controller type='sata' index='0'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
        </controller>
        <controller type='usb' index='0' model='qemu-xhci' ports='15'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
        </controller>
        <interface type='bridge'>
          <mac address='52:54:00:b2:e4:ed'/>
          <source bridge='br0'/>
          <model type='virtio-net'/>
          <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
        </interface>
        <serial type='pty'>
          <target type='isa-serial' port='0'>
            <model name='isa-serial'/>
          </target>
        </serial>
        <console type='pty'>
          <target type='serial' port='0'/>
        </console>
        <channel type='unix'>
          <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'>
          <address type='usb' bus='0' port='1'/>
        </input>
        <input type='mouse' bus='ps2'/>
        <input type='keyboard' bus='ps2'/>
        <tpm model='tpm-tis'>
          <backend type='emulator' version='2.0' persistent_state='yes'/>                      <- tpm emulation needed for Windows 11
        </tpm>
        <audio id='1' type='none'/>
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
          </source>
          <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0' multifunction='on'/>         <- gpu passthrough
        </hostdev>
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x0c' slot='0x00' function='0x1'/>
          </source>
          <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
        </hostdev>
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x0e' slot='0x00' function='0x4'/>
          </source>
          <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>             <- onboard soundcard passthrough
        </hostdev>
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
          </source>
          <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>           <- m.2 drive passthrough
        </hostdev>
        <hostdev mode='subsystem' type='usb' managed='no'>
          <source>
            <vendor id='0x0951'/>
            <product id='0x16be'/>
          </source>
          <address type='usb' bus='0' port='2'/>
        </hostdev>
        <hostdev mode='subsystem' type='usb' managed='no'>                      < usb mouse and keyboard passthrough
          <source>
            <vendor id='0x1532'/>
            <product id='0x000c'/>
          </source>
          <address type='usb' bus='0' port='3'/>
        </hostdev>
        <memballoon model='none'/>
      </devices>
    </domain>
     
     
    There is one thing i came across with the  Windows 11 VM that is not working. I cannot switch the video driver to another version. That worked on my Windows 10 VMs but not on the Windows 11 VM.
     
    Edit: forget the above statement. It seems i made an error in the procedure. Tried it with an new VM and it is working.
  4. Jumbo_Erdnuesse's post in Multiple GPUs connecting to Multiple VMs - Issues Running Simultaneously was marked as the answer   
    The other thing i see in your config is that you did set different min and max values for your memory. Both should be the same value.
     
    Do you have any cpu pinning configured?
     
    What does your system log look like?
  5. Jumbo_Erdnuesse's post in 5700XT Code 43 on Windows VM was marked as the answer   
    For Radeon cards you do not have to use a VBIOS file.
     
    First Steps: Set your machine in UEFI to CSM mode "enabled". Set your Unraid to Legacy mode. In "Main" klick on "Flash" right next to the Unraid usb drive this will bring you to Unraid settings, in the settings uncheck "Allow UEFI boot". Open "Settings", "VM Manger" and set "PCI ACS Override" to "Both", set "Allow unsafe interrupts" to "Yes", reboot Unraid, go to "Tools" "System devices" and set the VFIO passthrough devices, then click "Bind selected devices to VFIO", click "Done", install the AMD Vendor reset plugin. Go to "Main", "Flash", "Syslinux Configuration", the section "Unraid OS" should look something like this:
     
    kernel /bzimage
    append pcie_acs_override=downstream,multifunction vfio_iommu_type1.allow_unsafe_interrupts=1 initrd=/bzroot
     
    after "append" add this: video=efifb:off,vesafb:off
     
    it should now look like this:
     
    kernel /bzimage
    append video=efifb:off,vesafb:off pcie_acs_override=downstream,multifunction vfio_iommu_type1.allow_unsafe_interrupts=1 initrd=/bzroot
     
    Reboot again.
     
    Create a VM. Edit the VM in GUI, the first gpu should be "Virtual" for the VNC card, the second GPU should be your Radeon card. As first soundcard set Radeon HDMI passthrough, click "Update", then edit the VM again in XML.
     
    In the XML File go to <features> and edit
     
    <features>
        <acpi/>
        <apic/>
        <hyperv mode='custom'>
          <relaxed state='on'/>
          <vapic state='on'/>
          <spinlocks state='on' retries='8191'/>
          <vendor_id state='on' value='1234567890ab'/>       <----  with Vendor ID set to 'none' you get error 43
        </hyperv>
        <kvm>
          <hidden state='on'/>     <--- set this for kvm, if you do not do it, you get error 43
        </kvm>
      </features>
    .
    .
    For the graphics card edit the following lines:
     
    <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
          </source>
         <alias name='hostdev0'/> remove the vbios
          <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0' multifunction='on'/>
        </hostdev>
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x0a' slot='0x00' function='0x1'/>     
          </source>                                                                                               
          <alias name='hostdev1'/>                                                                    
          <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
        </hostdev>
    .
    .
    .
    After you set everthing, you have to set your VM to autoboot and reboot Unraid. Don´t forget do pass through a keyboard for pressing the any key to boot from the Windows Image. During the reboot process Unraid will launch the VM at start and you will not be able to get any screen output. Just keep pressing the space bar when the keyboard lights up a second time during VM boot.
     
    When the VM starts you can install Windows, reboot, install VirtIO drivers, reboot, then configure Windows using the vnc connection. Usually when i am in the process of configuring Windows the video card will get installed in the background after some minutes of runnig the VM. A second "Microsoft Basic Dispay Adapter" will appear in the windows device manger, reporting Code 31, which means you did not install drivers yet. At this point your screen connected to the Radeon card should light up.
     
    A critical step will be preventing Windows from loading driver updates through Windows Update. If that happens, your VM will be borked and you have to reinstall it again because the standard Windows Update driver for Radeon does not work.
     
    BEFORE you install the VIRTIO drivers you have to configure Windows Update. Run "gpedit.msc" and select "Computer configuration", "Administrative templates", "Windows components", "Windows Update", "Do not allow driver updates through Windows Update" and set this rule to "Active". ALSO check System Properties, Hardware, Device installation settings, set it to "No, do not download apps and device symbols". There will be a warning wich can be accepted clicking "OK".
     
    During the whole process do NOT shutdown your VM through the Unraid GUI. The VM should be working and you should reboot the VM using the Windows start menu every time you have to manually reboot the guest.
     
    Do not install the latest video drivers. Install WHQL 22.5.1 drivers. I tried latest drivers wich resulted in slow video performance and black screen.
     
    For some reason the installation of the virtio drivers fails everytime in a Windows 10 VM when i run the setup for the first time. Just rerun  the installer and it will work the second time. Then open the virtio driver folder on the virtio driver disk and navigate to "qemu system agent" and install that on top of the drivers. Do not install anything else from the virtio drivers disk. I tried installing the guest agent using the "virtio-win-guest-tools.exe" in the main folder and that borked my vm. Do not use that.
     
    A lot of errors in dealing with VM are solved when you realise that when you make changes to the VM template in the GUI all former changes you made in the XML template get discarded. As soon as you click the "Update" button in the GUI the current XML gets overwritten by a standard template and you have to edit your XML setting again.