Jump to content

Edit XML for VM to supply GPU ROM manually, how is this in 6.2 beta21?


rabbe

Recommended Posts

Hi

 

I have a lot of problems with my VMs. I can start a VM with Radeon R9 270X but when i use my Geforce GTX570 i get major problems. And the VM with GTX570 allso make my other VM crash..

 

At the moment I try to only have 1 VM running. The GTX570.

After revomeing a trubling usb-hub I made the VM boot and installed windows. But if i reboot the system it does not come up again. Black screen. The only way to get it back up is to reboot unRAID.

 

I read that this is a GPU problem and not a unRAID problem. So i have to set it to boot a .rom file manually. I did follow this guide: http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Edit_XML_for_VM_to_supply_GPU_ROM_manually

I see there has been some changes in the 6.2beta21 vs 6.1.9 at this point. I'm a noob at this and i dunno what to do when its not looking the same as the guide.

 

Please help me edit the XML to load the .rom file (6.2beta21).

 

An other question; Can i have passthrough on a Nvidia GPU to one VM and a Radeon GPU to an other VM at the same time? I cant get this to work, but it might be something els causing it to freeze.

 

Edit:

My current XML file:

<domain type='kvm'>
  <name>GamerPC2</name>
  <uuid>471e2244-9b69-28b9-04fc-7309791acf24</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 7" icon="windows7.png" os="windows7"/>
  </metadata>
  <memory unit='KiB'>13107200</memory>
  <currentMemory unit='KiB'>13107200</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </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/Vdisk/GamerPC2/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/ISOs/Windows 7 Pro 64bit English.iso'/>
      <target dev='hda' bus='ide'/>
      <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.117.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:22:81:97'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='connect'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x04b3'/>
        <product id='0x3025'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

tower-diagnostics-20160529-1017.zip

Link to comment

I can now run the two VMs at the same time with no issue so far. (I think the freeze was caused by some USB problem when using USB-hub)

 

But i stil need to restart the entire unRAID every time i try to restart the VM with GTX570 GPU. Because the VM goes black.

I see this error in the log:

Domain id=1 is tainted: high-privileges
Domain id=1 is tainted: host-cpu

 

Please help me modify XML to so i can load the GPU .rom file manually.

Thanks! :)

Link to comment

In the above linked thread, jonp states to use something like...

 

<rom bar='on' file='/etc/fake/boot.bin'/>

 

Since moving to this beta version, I've been using this...

 

<address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</source>
<alias name='hostdev0'/>
<rom file='/boot/vbios.rom'/>

 

What does the bar='on' segment do?

Link to comment

What does the bar='on' segment do?

 

Found the answer at https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/Virtualization_Deployment_and_Administration_Guide/sub-section-libvirt-dom-xml-devices-host-device-assignment.html.

 

TL;DR - The optional bar attribute can be set to on or off, and determines whether or not the device's ROM will be visible in the guest's memory map. (In PCI documentation, the rombar setting controls the presence of the Base Address Register for the ROM). If no rom bar is specified, the default setting will be used.

 

Since jonp purposefully inserted the bar='on' attribute noted in the above thread, would it be safe to assume that the rombar default setting is off? Should we all be explicitly adding the bar attribute?  As the wiki http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Edit_XML_for_VM_to_supply_GPU_ROM_manually doesn't have the bar attribute noted, I'd like to verify this before making an addition to the wiki page.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...