CHBMB Posted January 21, 2015 Share Posted January 21, 2015 Hi, can't believe the progress made in UnRAID since I migrated to WHS2011 about a year ago. Am looking to migrate back Yeah, I know, grass is always greener.... Apart from some messing around with VirtualBox in Windows I'm new to all this virtualisation business so please forgive the wall of text as I wanted to put all my steps down so I others could follow the ramblings of my disturbed mind! Managed to get a Win7VM up and running using dmacias' excellent plugin, here is the xml file that was created. <domain type='kvm' id='3'> <name>Win7VM</name> <uuid>16423bf2-47b7-0c00-2cb3-0c000b16ea8a</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> </features> <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/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/KVM/VM/Win7VM/Win7VM.qcow2'/> <backingStore/> <target dev='hda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/KVM/Media/Win7AIO.iso'/> <backingStore/> <target dev='hdc' bus='sata'/> <readonly/> <alias name='sata0-0-2'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <alias name='sata0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:40:3f:e1'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/0'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/0'> <source path='/dev/pts/0'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> </domain> I want to passthough my PCI-E Quad Tuner DVB-T2 card which is a TBS6285, the alternative is to use the TVHeadEnd plugin which I used before but it is a bit of a pain bothering piotrasd for media builds with TBS drivers every time there's a new release! Here's the output of lspci -knn without my TV Card installed in the machine. 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) Subsystem: ASRock Incorporation Device [1849:0150] 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09) Subsystem: ASRock Incorporation Device [1849:0152] 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e31] Kernel driver in use: xhci_hcd 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e3a] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: ASRock Incorporation Device [1849:8892] 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 [8086:1e1e] (rev c4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e26] Kernel driver in use: ehci-pci 00:1f.0 ISA bridge [0601]: Intel Corporation H77 Express Chipset LPC Controller [8086:1e4a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e4a] 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e22] Kernel modules: i2c_i801 01:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] [1000:0072] (rev 03) Subsystem: LSI Logic / Symbios Logic Device [1000:3020] Kernel driver in use: mpt2sas Kernel modules: mpt2sas 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169 Kernel modules: r8169 03:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci Once installed I get this output. 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) Subsystem: ASRock Incorporation Device [1849:0150] 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09) Subsystem: ASRock Incorporation Device [1849:0152] 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e31] Kernel driver in use: xhci_hcd 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e3a] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: ASRock Incorporation Device [1849:8892] 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) Kernel driver in use: pcieport 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 [8086:1e1e] (rev c4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e26] Kernel driver in use: ehci-pci 00:1f.0 ISA bridge [0601]: Intel Corporation H77 Express Chipset LPC Controller [8086:1e4a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e4a] 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e22] Kernel modules: i2c_i801 01:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] [1000:0072] (rev 03) Subsystem: LSI Logic / Symbios Logic Device [1000:3020] Kernel driver in use: mpt2sas Kernel modules: mpt2sas 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169 Kernel modules: r8169 04:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci So if I'm correct in my assumptions that means that these two entries are the ones I need to be looking at. 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: pcieport 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] Editing my go file to this should allow for passthrough of the slot right? #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #bindpci /usr/local/sbin/vfio-bind 0000:00:1c.4 This then give me these lines when I run lspci -knn so my PCI-E slot is using the virtuo driver right? 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: vfio-pci 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] Now am I correct in thinking I now need to add something along the lines of this to my VM xml file? <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1c.4,bus=pcie.0'/> </qemu:commandline> However once I've done all that, (I edited the xml file for the VM I'd already created rather than create a new one - if that's relevant) but nothing appears in device manager within Windows to indicate that my Tuner card is present. If someone could point out whereabouts I'm going wrong I'd be most grateful. EDIT: It would appear that when I edit the xml file with the VM stopped the changes aren't being saved. Quote Link to comment
Mettbrot Posted January 21, 2015 Share Posted January 21, 2015 Just on a sidenote: If you want tvheadend you could also setup an ubuntu VM and install tvheadends repository. Should be more compatible than windows. Quote Link to comment
CHBMB Posted January 21, 2015 Author Share Posted January 21, 2015 Just on a sidenote: If you want tvheadend you could also setup an ubuntu VM and install tvheadends repository. Should be more compatible than windows. I'm not really too bothered what OS or TV Backend I run, from reading around I think my TV card has a few problems in Linux depending on the kernel as the drivers aren't built in, what I intend to do is get a VM up and running then start playing around with different options. Have to say though the Argus TV tuner is rock solid, keep coming back to it since around 2009 I think. (Was previously called For The Record) Quote Link to comment
dmacias Posted January 21, 2015 Share Posted January 21, 2015 Hi, can't believe the progress made in UnRAID since I migrated to WHS2011 about a year ago. Am looking to migrate back Yeah, I know, grass is always greener.... Apart from some messing around with VirtualBox in Windows I'm new to all this virtualisation business so please forgive the wall of text as I wanted to put all my steps down so I others could follow the ramblings of my disturbed mind! Managed to get a Win7VM up and running using dmacias' excellent plugin, here is the xml file that was created. <domain type='kvm' id='3'> <name>Win7VM</name> <uuid>16423bf2-47b7-0c00-2cb3-0c000b16ea8a</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> </features> <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/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/KVM/VM/Win7VM/Win7VM.qcow2'/> <backingStore/> <target dev='hda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/KVM/Media/Win7AIO.iso'/> <backingStore/> <target dev='hdc' bus='sata'/> <readonly/> <alias name='sata0-0-2'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <alias name='sata0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:40:3f:e1'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/0'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/0'> <source path='/dev/pts/0'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> </domain> I want to passthough my PCI-E Quad Tuner DVB-T2 card which is a TBS6285, the alternative is to use the TVHeadEnd plugin which I used before but it is a bit of a pain bothering piotrasd for media builds with TBS drivers every time there's a new release! Here's the output of lspci -knn without my TV Card installed in the machine. 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) Subsystem: ASRock Incorporation Device [1849:0150] 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09) Subsystem: ASRock Incorporation Device [1849:0152] 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e31] Kernel driver in use: xhci_hcd 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e3a] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: ASRock Incorporation Device [1849:8892] 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 [8086:1e1e] (rev c4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e26] Kernel driver in use: ehci-pci 00:1f.0 ISA bridge [0601]: Intel Corporation H77 Express Chipset LPC Controller [8086:1e4a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e4a] 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e22] Kernel modules: i2c_i801 01:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] [1000:0072] (rev 03) Subsystem: LSI Logic / Symbios Logic Device [1000:3020] Kernel driver in use: mpt2sas Kernel modules: mpt2sas 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169 Kernel modules: r8169 03:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci Once installed I get this output. 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) Subsystem: ASRock Incorporation Device [1849:0150] 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09) Subsystem: ASRock Incorporation Device [1849:0152] 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e31] Kernel driver in use: xhci_hcd 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e3a] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: ASRock Incorporation Device [1849:8892] 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) Kernel driver in use: pcieport 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 [8086:1e1e] (rev c4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e26] Kernel driver in use: ehci-pci 00:1f.0 ISA bridge [0601]: Intel Corporation H77 Express Chipset LPC Controller [8086:1e4a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e4a] 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e22] Kernel modules: i2c_i801 01:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] [1000:0072] (rev 03) Subsystem: LSI Logic / Symbios Logic Device [1000:3020] Kernel driver in use: mpt2sas Kernel modules: mpt2sas 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169 Kernel modules: r8169 04:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci So if I'm correct in my assumptions that means that these two entries are the ones I need to be looking at. 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: pcieport 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] Editing my go file to this should allow for passthrough of the slot right? #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #bindpci /usr/local/sbin/vfio-bind 0000:00:1c.4 This then give me these lines when I run lspci -knn so my PCI-E slot is using the virtuo driver right? 00:1c.4 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 [8086:1e18] (rev c4) Kernel driver in use: vfio-pci 02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Device [6285:0001] Now am I correct in thinking I now need to add something along the lines of this to my VM xml file? <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1c.4,bus=pcie.0'/> </qemu:commandline> However once I've done all that, (I edited the xml file for the VM I'd already created rather than create a new one - if that's relevant) but nothing appears in device manager within Windows to indicate that my Tuner card is present. If someone could point out whereabouts I'm going wrong I'd be most grateful. EDIT: It would appear that when I edit the xml file with the VM stopped the changes aren't being saved. You also need to add this to the top of your xml <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> Your xml is being saved but libvirt removes invalid syntax. Quote Link to comment
CHBMB Posted January 21, 2015 Author Share Posted January 21, 2015 You also need to add this to the top of your xml <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> Your xml is being saved but libvirt removes invalid syntax. Thanks, I'll give it a try as soon as the wife stops watching TV. Never would have got there without that pointer. Much appreciated for the help and all your work with the plugin dmacias. Quote Link to comment
CHBMB Posted January 21, 2015 Author Share Posted January 21, 2015 Tried the above suggestion and this was my xml file, couldn't get it to work so tried from scratch <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win7VMTest</name> <uuid>e2624501-9cf5-2767-fdbb-b3b5510bb166</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> </features> <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/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/KVM/VM/Win7VMTest/Win7VMTest.qcow2'/> <target dev='hda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/KVM/Media/Win7AIO.iso'/> <target dev='hdc' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:76:f1:13'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' 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='0x01' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1c.4,bus=pcie.0'/> </qemu:commandline> </domain> With debugging running got the following error code: Warning: libvirt_domain_create(): internal error: early end of file from monitor: possible problem: 2015-01-21T22:44:01.402946Z qemu-system-x86_64: -device vfio-pci,host=00:1c.4,bus=pcie.0: vfio: Assignment of PCIe type 0x4 devices is not currently supported 2015-01-21T22:44:01.402989Z qemu-system-x86_64: -device vfio-pci,host=00:1c.4,bus=pcie.0: vfio: 0000:00:1c.4 Error adding PCI capability 0x10[0x40]@0x40: -22 2015-01-21T22:44:01.635794Z qemu-system-x86_64: -device vfio-pci,host=00:1c.4,bus=pcie.0: Device initialization failed. 2015-01-21T22:44:01.635823Z qemu-system-x86_64: -device vfio-pci,host=00:1c.4,bus=pcie.0: Device 'vfio-pci' could not be initialized in /usr/local/emhttp/plugins/dynamix.kvm.manager/classes/libvirt.php on line 896 Any ideas? Still finding my feet here a bit... EDIT: Do I need to add some lines to my syslinux.cfg Tried append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot Same error thrown up Quote Link to comment
dmacias Posted January 22, 2015 Share Posted January 22, 2015 Sorry I'm not much use on passthrough Quote Link to comment
CHBMB Posted January 22, 2015 Author Share Posted January 22, 2015 Sorry I'm not much use on passthrough No need to apologise, you're the only reason people like me can get this far! Quote Link to comment
CHBMB Posted January 26, 2015 Author Share Posted January 26, 2015 OK, so like the title said I'm a novice, Tried a few things to sort this out, changing a variable at a time and finally managed to see my card in Windows 7. I think where I was going wrong was in a couple of areas. Turns out this was the config that managed to get the card seen in Windows for anyone else who is trying to achieve a similar thing. My go file #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #bindpci /usr/local/sbin/vfio-bind 0000:00:1c.4 /usr/local/sbin/vfio-bind 0000:02:00.0 My syslinux.cfg {Relevant bit only) label unRAID OS menu default kernel /bzimage append intel_iommu=on pcie_acs_override=downstream initrd=/bzroot My XML file <domain type='kvm' id='12' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win7VM</name> <uuid>2287f5d8-6c0d-b595-4cb2-43eba3234d99</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>3</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <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/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/KVM/VM/Win7VM/Win7VM.qcow2'/> <backingStore/> <target dev='hda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/KVM/Media/Win7AIO.iso'/> <backingStore/> <target dev='hdc' bus='sata'/> <readonly/> <alias name='sata0-0-2'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <alias name='sata0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:04:f1:33'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=02:00.0,bus=pcie.0'/> </qemu:commandline> </domain> Haven't yet tried it for stability but at least I can see it in Windows! I think I was trying to pass the pci-e slot through to windows not the actual device, then I tried with both the slot and device, which also didn't work. In the end loading the vfio-pci driver to both slot and device and then only passing through the device in the xml seemed to crack it. Quote Link to comment
CHBMB Posted January 26, 2015 Author Share Posted January 26, 2015 Successfully got my TBS 6285 drivers installed and Argus TV setup, connected to Needo's MariaDB Docker and recorded and streamed live TV to a client on the LAN using a Kodi Frontend. Very impressed with this KVM virtualisation indeed. Will have to set it up and run for longer to test for stability properly but so far so good. Quote Link to comment
Recommended Posts
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.