Monkeyair Posted April 21, 2015 Share Posted April 21, 2015 Ive checked my hardware and ensured that the bios is configured for VM. I could do with a friendly steer to put me on the right track please. I am running: ASRock H81 Pro BTC Motherboard Intel i5 4440 3.1ghz 8GB RAM Digital Devices Cine S2 x 4 DVB-S tuners DVBSky T9580 DVB-S / T2 tuners Syba SATA III 8 Port PCI-E 2.0 Controller Card 240gb SSD cache I have managed to install Ubuntu server initially, but have not got past the initial install due to not knowing how to passthrough the tuner cards. This VM option seems perfect for me from what I can see, due to the potential driver support by using Ubuntu. At the moment I have been unable to get my DVBSky tuner working due to lack of driver support and my lack of kernel compiling knowledge. I don't see the option to passthrough the TV cards in the VM gui. Any further advice? Quote Link to comment
Monkeyair Posted April 21, 2015 Author Share Posted April 21, 2015 I have managed to get TVHeadend working now, but with no adapters showing. I need to now passthrough the TV Tuner cards I think. Do I also need to install drivers on Ubuntu? Is there any way that I can copy over my TVHeadend config from the old TVHeadend plugin that I was using over to the new VM? Quote Link to comment
CHBMB Posted April 21, 2015 Share Posted April 21, 2015 Your tuner cards are using what interface? USB? PCIe? PCI? If it's PCI or PCIe then remove the cards from your system reboot and run the command (in telnet) lspci -knn Here's my example with no tuners. 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 And copy the output. Then add in the first card and repeat. lspci -knn The differences will tell you what the card is and which PCI bridge it's on. Here's the output I get with my card installed 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 I can deduce that this is my tuner card. 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] So then I paste in this code below specifying the device I want to passthrough. <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> </hostdev> That'll get the ball rolling for now. If your tuners are USB then I'm the wrong bloke to be asking as I've yet to pass through any USB devices. Quote Link to comment
CHBMB Posted April 21, 2015 Share Posted April 21, 2015 I have managed to get TVHeadend working now, but with no adapters showing. I need to now passthrough the TV Tuner cards I think. Do I also need to install drivers on Ubuntu? Is there any way that I can copy over my TVHeadend config from the old TVHeadend plugin that I was using over to the new VM? Get the cards passed through first and then it'd probably be best to head over to a Ubuntu forum to ask about drivers as you'll be running Ubuntu As for the TVHeadEnd config you may be able to copy it over but it might be easier to setup everything again.. Also think about where you want recordings to be stored. Probably best to store them on a network share on the Unraid host rather than the VM disk image file. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 Actually, before you tear your build apart, I've just realised that passthrough is easier now. Don't remove anything and post the output you get from lspci -knn Might not need to remove anything.. Sorry if you've already started! Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 My tuner cards are PCI-e. The output of lspci -knn shows my 2 cards: 02:00.0 Multimedia controller [0480]: Digital Devices GmbH Octopus DVB Adapter [dd01:0003] Subsystem: Digital Devices GmbH Cine S2 V6 DVB adapter [dd01:0020] 03:00.0 Multimedia video controller [0400]: Spin Master Ltd. Device [1ade:3038] (rev 01) Subsystem: DVBSky Device [4254:5580] I have TVHeadend working with the VM now using a ststic ip address for the Ubuntuserver. All I need to do now is passthrough the cards. todays mission! Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Here's acopy of my XML file prior to any passthrough: <domain type='kvm' id='2'> <name>Ubuntu Server</name> <uuid>1f92d0f3-c368-d1d5-44da-1a0d84ee79e1</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>1</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> </cputune> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.2'>hvm</type> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='1' threads='1'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <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='raw' cache='none' io='native'/> <source file='/mnt/cache/Ubuntu Server/vdisk1.img'/> <backingStore/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <alias name='virtio-disk2'/> <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/Installation Media/ubuntu-14.04.2-server-amd64.iso'/> <backingStore/> <target dev='hda' bus='sata'/> <readonly/> <boot order='2'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </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:a7:c7:21'/> <source bridge='Ubuntu'/> <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='16384' 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> Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 I also believe that I have managed to install all of the DVB drivers for Ubuntu. So I'm hoping that once the cards are passed through, TVheadened will see the adapters and allow me to configure as normal. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 OK try <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> </hostdev> Paste this into your XML file just above the last two lines. If that works we'll try the next card. Always best to change one variable at a time. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 If you're not sure if Ubuntu is seeing your card then run lspci -knn on your Ubuntu VM. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 Just realised, what machine type have you setup as q35? Not sure this type of passthrough works with q35, it's detailed in one of the stickies at the top of the forum. Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Thanks again for your help. After pasting in the commands throught the VM gui and update this is what i see: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> After doing this I am no longer able to start the domain. I changed to i440fx. Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Do I need to add 0480 int the domain? Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> The type of passthrough I use requires the PC type of machine not q35. And I don't think it requires the code above. Give me a minute and I'll post my XML so you can have a look. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 <domain type='kvm'> <name>Argus-TV</name> <uuid>3636cc23-f4b0-1313-3390-1be034fc6f0c</uuid> <memory unit='KiB'>8388608</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-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/disk/KVM/VM/Argus-TV/Argus-TV.qcow2'/> <target dev='hda' bus='virtio'/> <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/disk/KVM/Media/Win7AIO.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/disk/KVM/Media/virtio-win-0.1-100.iso'/> <target dev='hdd' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='1'/> </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:01:66:f9'/> <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='5700' listen='0.0.0.0' keymap='en-gb'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> So yes you need to change machine type I think. I remember having problems when I tried and ending up having to start from scratch. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 You could keep your existing VM and setup a new one to test with until you get it working. Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Ok, Im starting from scratch here we go.... Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Great idea. Too late though Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Fresh install, but no joy. When I'm updating the XML file, I am unable to start the VM. If I delete the XML additions, it starts fine. I am getting lock-ups and am not able to access Unraid by the gui. I'm going to take out 1 of the TV cards and try it with just 1 for now. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 Can you turn on debugging and get some errors? Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 Can you turn on debugging and get some error reports? Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Do you mean post the sys log results? I cant find debugging in unraid Quote Link to comment
trurl Posted April 22, 2015 Share Posted April 22, 2015 Do you mean post the sys log results? I cant find debugging in unraid Don't know about this specific case, but if you are trying to debug a VM or an app in a VM then you will likely need to provide debugging info from the VM or the app, not unRAID. Quote Link to comment
CHBMB Posted April 22, 2015 Share Posted April 22, 2015 In the KVM tab, I'm still on beta14b so the option may no longer be there. Any errors at the bottom in the coloured bar? Quote Link to comment
Monkeyair Posted April 22, 2015 Author Share Posted April 22, 2015 Just says error in green when I try to start the VM 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.