First Pass-through attempt--a little lost


gtroyp

Recommended Posts

Okay. So, trying to build a Win7 VM with passthrough. Hardware is totally capable. I have run a test and created a Win7 VM without passthrough and it worked.

 

I have added the append line in my syslinux.cfg. I have a Win7 iso and Virtio iso ready. I have looked at system devices and know where my GPU is located.

 

I think I know how to use vfio-bind 0000:0#:00.0 0000:0#:00.1...

 

So, to build a passthrough VM, can I use the VM manager to build the VM, install the OS and then go back and add the GPU stuff to the xml? If not, what's the right order to do things?

Link to comment

Okay. So, trying to build a Win7 VM with passthrough. Hardware is totally capable. I have run a test and created a Win7 VM without passthrough and it worked.

 

I have added the append line in my syslinux.cfg. I have a Win7 iso and Virtio iso ready. I have looked at system devices and know where my GPU is located.

 

I think I know how to use vfio-bind 0000:0#:00.0 0000:0#:00.1...

 

So, to build a passthrough VM, can I use the VM manager to build the VM, install the OS and then go back and add the GPU stuff to the xml? If not, what's the right order to do things?

You could just edit the xml and paste it in as a new vm.  Just change the uuid by one letter or number and change or increment the name and use the existing image. You could also copy the image to a separate folder and point the new xml to that image. As far as passthrough, I haven't done that yet.

Link to comment

I'd second what the previous poster said. Make a copy of the VM. There are two things you will need to do for passthrough:

a. add vfio-bind to the address - the video and audio

b. Disable VNC passthrough in your xml and add the corresponding qemu lines for passthrough devices.

 

Look in my signature for a link to xml. The thread also has some discussion on what the addresses are for and could help in your understanding of the pci addresses and how to modify the xml file. Give a shout if you need help.

 

Okay. So, trying to build a Win7 VM with passthrough. Hardware is totally capable. I have run a test and created a Win7 VM without passthrough and it worked.

 

I have added the append line in my syslinux.cfg. I have a Win7 iso and Virtio iso ready. I have looked at system devices and know where my GPU is located.

 

I think I know how to use vfio-bind 0000:0#:00.0 0000:0#:00.1...

 

So, to build a passthrough VM, can I use the VM manager to build the VM, install the OS and then go back and add the GPU stuff to the xml? If not, what's the right order to do things?

Link to comment

I don't think I am binding the GPU card to the vfio driver. Let me know if you see anything....

 

the following is my go script in its entirety:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

#automount SNAP disk(s)
/boot/config/plugins/snap/snap.sh -ms dockerdisk
/boot/config/plugins/snap/snap.sh -ms vmdisk

#bindpci
/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1

 

this is the output of lspci

00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 04)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Lynx Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #5 (rev d4)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 04)
01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series]
01:00.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series]
03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

 

I had two other PCI cards plugged in (a usb and a sata controller) that I pulled out so I could focus on the task at hand.

 

Oh, and syslinux.cfg for good measure

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

 

Link to comment

The vfio-bind addresses seem correct but the intel/amd passthrough in syslinux.cfg is missing. You need to have that to enable passthrough. I think for intel board it should be "append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot

"

Also make sure you have the qemu lines in the xml file.

 

 

I don't think I am binding the GPU card to the vfio driver. Let me know if you see anything....

 

the following is my go script in its entirety:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

#automount SNAP disk(s)
/boot/config/plugins/snap/snap.sh -ms dockerdisk
/boot/config/plugins/snap/snap.sh -ms vmdisk

#bindpci
/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1

 

this is the output of lspci

00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 04)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Lynx Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #5 (rev d4)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 04)
01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series]
01:00.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series]
03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

 

I had two other PCI cards plugged in (a usb and a sata controller) that I pulled out so I could focus on the task at hand.

 

Oh, and syslinux.cfg for good measure

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

Link to comment

Glad you got it figured, the key part is done!

 

You can add USB by their vendor and product id's. I don't think it will be plug n play but as long as you don't keep adding and removing devices that need to go to the vm,  it will be okay. Below is a snippet of my xml code when I had the USB devices added. You should be able to get the USB device info from devices tab in unraid gui.

 

 

    <input type='tablet' bus='usb'/>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x046d'/>

        <product id='0x082d'/>

      </source>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x04d8'/>

        <product id='0x003f'/>

      </source>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x0471'/>

        <product id='0x0815'/>

      </source>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x046d'/>

        <product id='0xc713'/>

      </source>

    </hostdev>

 

htpc--you are awesome

 

8)

 

I have passthrough. I have video. Now I just need to pass through some usb so I can interact with it.

 

Can i pass through solitary usb items, or so I need to passthrough a usb card (I have one)

 

 

EDIT: archedraft and I pass the controller for USB. If you can figure that out quickly that's the best option. I would recommend trying the USB device first and having that accomplishment grin before messing with the vfio-bind and rebooting the server multiple times.

Link to comment

Passing through individual items was a failure. Going with a whole card. Should have that up in 5 minutes.

 

Passing through the card is proving complicated. The Card is a PCI card (not PCIe), and it has a PCI-PCIe bridge on the card. If I pass through the bridge (slot 7), the VM boots, and the mouse has power, so the board is passing the card, but no movement on screen.

 

If I pass the USB Controller(s) (slot 8.0, 8.1, and 8.2) in any combination, the VM won't boot and says

vfio: Error: Failed to setup INTx fd: Device or resource busy

 

Now, I have been incrementing the "addr=" number in my XML for the VM with each passed through item, is that right?

 

here is relevent xml at the moment:

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=02:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=07:00.0,bus=root.1,addr=00.2'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=08:00.0,bus=root.1,addr=00.3'/>
  </qemu:commandline>

 

Slot 2 is Video-working, Slot 5 is NIC-working, Slot 7 is PCI-PCIe bridge-assume working, Slot 8.x are USB Controllers; all showing vfio on lspci -k.

 

Tried passing through the USB Slots first, got same error, which is how I found the bridge....

 

Have checked the card, and it is functional in unraid's console, so I am assuming it works. Also tried passing USB with

    <input type='tablet' bus='usb'/>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x1002'/>
      </source>
    </hostdev>

 

to no avail. Giving in for the night. At least I was able to get the GPU passed through and Win to boot. Small Victories....

 

 

 

 

 

 

Link to comment

Passing through individual items was a failure. Going with a whole card. Should have that up in 5 minutes.

 

Passing through the card is proving complicated. The Card is a PCI card (not PCIe), and it has a PCI-PCIe bridge on the card. If I pass through the bridge (slot 7), the VM boots, and the mouse has power, so the board is passing the card, but no movement on screen.

 

If I pass the USB Controller(s) (slot 8.0, 8.1, and 8.2) in any combination, the VM won't boot and says

vfio: Error: Failed to setup INTx fd: Device or resource busy

 

Now, I have been incrementing the "addr=" number in my XML for the VM with each passed through item, is that right?

 

here is relevent xml at the moment:

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=02:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=05:00.0,bus=root.1,addr=00.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=07:00.0,bus=root.1,addr=00.2'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=08:00.0,bus=root.1,addr=00.3'/>
  </qemu:commandline>

 

Slot 2 is Video-working, Slot 5 is NIC-working, Slot 7 is PCI-PCIe bridge-assume working, Slot 8.x are USB Controllers; all showing vfio on lspci -k.

 

Tried passing through the USB Slots first, got same error, which is how I found the bridge....

 

Have checked the card, and it is functional in unraid's console, so I am assuming it works. Also tried passing USB with

    <input type='tablet' bus='usb'/>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x1002'/>
      </source>
    </hostdev>

 

to no avail. Giving in for the night. At least I was able to get the GPU passed through and Win to boot. Small Victories....

Troy, I'll review this post in the morning and see if I can't help you out...

Link to comment

I was attempting to do the same thing (passing the GPU) and tried to follow along with the conversation modifying as I thought I needed to.  What I ended up with was UNRAID booting up find but the VM fails to start.  Attached are my go, xml, syslinux. Any thoughts on what I am doing wrong would be much appreciated.  I really thought I was following along really well ;)

 

this is the output of lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation B75 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
02:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)

 

xml

<domain type='kvm'>
  <name>Windows</name>
  <uuid>a73bc503-28bb-7805-4a67-ef262dab5818</uuid>
  <memory unit='KiB'>5242880</memory>
  <currentMemory unit='KiB'>5242880</currentMemory>
  <vcpu placement='static'>3</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/vm/Windows/Windows.qcow2'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF610MH3DUM6K'/>
      <target dev='hdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/vm/virtio-win-0.1-94.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 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>
    <interface type='bridge'>
      <mac address='52:54:00:b2:c4:af'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:02.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
  </qemu:commandline>
</domain>

 

go file

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#mount VM HDD
mkdir /mnt/vm
mount /dev/disk/by-id/ata-Corsair_Force_LS_SSD_14428168000101670551 /mnt/vm
#For KVM videocard video
/usr/local/sbin/vfio-bind 0000:00:02.0
smbcontrol smbd reload-config

 

syslinux

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

Link to comment

I was attempting to do the same thing (passing the GPU) and tried to follow along with the conversation modifying as I thought I needed to.  What I ended up with was UNRAID booting up find but the VM fails to start.  Attached are my go, xml, syslinux. Any thoughts on what I am doing wrong would be much appreciated.  I really thought I was following along really well ;)

 

I'm pretty new to all this myself but have spent a long time poring over a lot of the xmls posted in this forum and elsewhere trying to figure things out, so I might be wrong but I think that you're trying to passthrough the integrated GPU, which as I understand it, isn't working at the moment.  I think the current advice is to buy a discrete PCI GPU if you want to passthrough graphics.

 

But like I said I'm new so I might be completely wrong and I'm sure someone with a bit more knowledge will post here if that's the case.  :)

 

Here's a quote from jonp, who definitely knows what he's talking about in this thread here

We haven't gotten iGPU pass through to work yet

Not saying this is impossible, but we haven't been able to get this to work on any of our test systems as of yet.  For those wondering, iGPU means integrated graphics or "on-board" graphics as in the graphics device is not installed into a PCI/e slot on the server, but a part of the motherboard itself.

 

The challenges relating to iGPU pass through are not easy to solve, but some may be able to get this to work.  We can confirm that none of our test systems have had success with this yet.  We have tried numerous patches of various types into our kernel with no success.  Even Alex Williamson of Red Hat who wrote the patches even said there is limited success in using them at this time.

 

If anyone gets this working on their system, please share!

Link to comment

thanks for the reply.  Yes I was attempting to pass through the onboard gpu, I didn't realise there was that limitation in place.

 

Knowing why it failed now, do the changes made to my files look correct?  Did I deduce the proper information to make it work? (assuming I get a graphics card, modify the address based on what lspci tells me)

Link to comment

thanks for the reply.  Yes I was attempting to pass through the onboard gpu, I didn't realise there was that limitation in place.

 

Knowing why it failed now, do the changes made to my files look correct?  Did I deduce the proper information to make it work? (assuming I get a graphics card, modify the address based on what lspci tells me)

 

A few things from my experience.  Anyone feel free to correct me if I'm wrong.

 

First off, the very first line of your xml needs to be:

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

 

If you don't have the xmlns part, the qemu:commandline section will get stripped out automatically.

 

Secondly, in the qemu:commandline section, I believe you need the following:

 

    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>

 

Not exactly sure what it does, but I've seen it in every xml that uses passthrough.  I think it's a necessary piece for other items to get passed through.

 

Third, you need to remove the VNC section, as you can't have VNC and Passthrough working at the same time.  Your VM will fail to boot.

 

    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

 

While not required, as I understand it, it is recommended to use pc-q35-2.1 emulation.  So change this in your os section from:

    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>

to:

    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>

 

I think that may break current installations, so I'd only make the change if you're doing a fresh install.

 

I wouldn't put this part in your go script until after testing it.  You can simply run the vfio-bind command from the cli.

/usr/local/sbin/vfio-bind 0000:00:02.0

 

You can add it to the go script once you have a working VM.

 

For your syslinux.cfg, I merely added:

  append pcie_acs_override=downstream initrd=/bzroot

 

I don't think you need this:

append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot

 

Although I think that's hardware dependent.  I'm using an intel i7 4790.

 

If you still continue to have problems with it booting at that time, you may need to mess with the <controller> sections.  I'd probably remove all of your controllers and try adding some that other people have said are working.  This is what I have.

 

    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
    </controller>

 

 

 

 

Link to comment

I updated the plugin xml editor so if you forget to change the first line and qemu: commandline is present it will add the namespace line automatically.  I have read mixed reviews on which machine type works better. Here most say q35 but I have read elsewhere problems with q35 and they recommend i440fx. The i440fx will create everything for you.  But like you said you have to add controllers for q-35 because it doesn't.  The Create section does add a few controllers.  I find removing the address lines and letting them be automatically created helps sometimes.

Link to comment

I updated the plugin xml editor so if you forget to change the first line and qemu: commandline is present it will add the namespace line automatically.

 

Thanks for the update, and your work in general. I've been swamped at work and haven't had a chance to futz about with the server, but this weekend I should have a chance to pull away at it.

Link to comment

I'm kind of starting over with Windows 10. First problem--I can't get it to accept the VirtIO drivers for the network adapter—I am using the Win8-64 bit versions, or trying to.

 

Is there a trick? Something special to add? Or should I change the xml and give it an e1000 or something similar?

Link to comment

I'm kind of starting over with Windows 10. First problem--I can't get it to accept the VirtIO drivers for the network adapter—I am using the Win8-64 bit versions, or trying to.

 

Is there a trick? Something special to add? Or should I change the xml and give it an e1000 or something similar?

What version of virtio drivers? I had a similar problem on a recent version 94. However version 100  worked. You might also try the stable version http://alt.fedoraproject.org/pub/alt/virtio-win/stable/

 

Also in case you didn't know you can change the cdrom image while the vm is running. You just click on the vm name then click on the cd image name then click the text box and browse the file tree and click on a new image.

Link to comment

What version of virtio drivers? I had a similar problem on a recent version 94. However version 100  worked. You might also try the stable version http://alt.fedoraproject.org/pub/alt/virtio-win/stable/

 

Also in case you didn't know you can change the cdrom image while the vm is running. You just click on the vm name then click on the cd image name then click the text box and browse the file tree and click on a new image.

 

I updated the virtIO driver version and that fixed the issue. I have a Win10 VM up now to try a GPU pass, and then go back to figuring out how to make a USB device go through.

 

The CD trick is very cool, thanks for pointing that out.

Link to comment

 

 

What version of virtio drivers? I had a similar problem on a recent version 94. However version 100  worked. You might also try the stable version http://alt.fedoraproject.org/pub/alt/virtio-win/stable/

 

Also in case you didn't know you can change the cdrom image while the vm is running. You just click on the vm name then click on the cd image name then click the text box and browse the file tree and click on a new image.

 

I updated the virtIO driver version and that fixed the issue. I have a Win10 VM up now to try a GPU pass, and then go back to figuring out how to make a USB device go through.

 

The CD trick is very cool, thanks for pointing that out.

 

Glad you got it working.  Can't help much with the pass. One of these days I'll get a vid card.

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.