Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help Setting Up Ubuntu Server To Run TVheadend

Featured Replies

OK, so tried it on a Ubuntu Server setup

 

Following the instructions I've already posted...

 

My Ubuntu server setup in KVM

LONAGoQ.jpg

 

Pasting in

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
    </hostdev>

 

Which the KVM plugin turns to (allocating a PCI domain on the ubuntu VM)

 

    <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='0x07' function='0x0'/>
    </hostdev>

 

Then I installed the ubuntu iso & booted.

Ran

lspci -knn

 

And saw

26L6ex9.jpg

 

Note the address now matches

<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

 

Rather than

02:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02)

        Subsystem: Device [6285:0001]

which was the address on the Unraid host OS.

 

Here's my complete XML file for reference

<domain type='kvm'>
  <name>TVHeadEnd</name>
  <uuid>52c64f2e-ffcd-14e4-0876-824e00c83f65</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-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/disk/KVM/VM/TVHeadEnd/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disk/KVM/Media/ubuntu-14.10-server-amd64.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' 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>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/cache/Recorded TV/'/>
      <target dir='recordings'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:00:4a:ad:2c'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 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' 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='0x07' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

So it's definitely possible.  Give it another go following this guide and see what happens.

 

One other thing, why don't you post us a screenshot/photo of your BIOS setup so we can check that looks good.

 

  • Replies 82
  • Views 18.4k
  • Created
  • Last Reply
  • Author

Thanks again.

 

Here's my xml:

 

<domain type='kvm'>

  <name>Ubuntu</name>

  <uuid>afc90933-cf0c-2277-3751-2611785f5527</uuid>

  <memory unit='KiB'>3145728</memory>

  <currentMemory unit='KiB'>3145728</currentMemory>

  <memoryBacking>

    <nosharepages/>

    <locked/>

  </memoryBacking>

  <vcpu placement='static'>1</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

  </cputune>

  <os>

    <type arch='x86_64' machine='pc-i440fx-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/KVM/VM/Ubuntu/vdisk1.img'/>

      <target dev='hdc' bus='virtio'/>

      <boot order='1'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/user/KVM/Media/ubuntu-14.04.2-server-i386.iso'/>

      <target dev='hda' bus='ide'/>

      <readonly/>

      <boot order='2'/>

      <address type='drive' controller='0' bus='0' 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>

    <filesystem type='mount' accessmode='passthrough'>

      <source dir='/mnt/user/RecordedTV/'/>

      <target dir='Recorded TV'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

    </filesystem>

    <interface type='bridge'>

      <mac address='52:54:00:a3:0d:50'/>

      <source bridge='Bridge'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 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='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='0x03' slot='0x00' function='0x0'/>

      </source>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

    </hostdev>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

    </memballoon>

  </devices>

</domain>

 

  • Author

How do I post screenshots?

  • Author

I changed my syslinux to match yours.  setup the ubuntu VM to match yours.  When I try to run it i get my little friend the green "error" message

  • Author

TVHeadend is completely removed.  Until I go back to 14b, then it comes out to play again!

Just to check you're not copying and pasting my XML are you?

 

I post screenshots by using prntscreen, pasting into MS Paint, editing/saving then I upload to my imgur account.

  • Author

JonP asked me to run this:

 

virsh start "Ubuntu Server"

 

I did and got:

 

Failed to start domain Ubuntu.

 

error: unsupported configuration: host doesn't support VFIO PCI passthrough

 

Which is strange as I believe that my setup shown below should be able

 

 

Right, that makes me think your BIOS isn't setup right.  Take a picture of your BIOS setup and post it. 

  • Author

Ok I'll try

Ok I'll try

 

Use a camera or phone, printscreen isn't going to work for that!  ;)

OK, so post your setup when you can, in the meantime I've checked your MB by downloading the manual and it does support VT-d and your CPU is also VT-d compatible, so that's good.

  • Author

Thanks for that.

 

I've just updated the bios....

 

Next job camera.  I wondered how to get the picture for you!  :)

What do you mean when you said updated the BIOS?

 

Updated the BIOS version or changed a setting?

  • Author

I've updated to ASrock newest bios for the motherboard.

 

This is the link for my motherboard manual:

 

ftp://europe.asrock.com/manual/H81%20Pro%20BTC.pdf

 

In the CPU config section I have the "Intel Virtualization Technology" enabled.  Which I thought would be enough to enable the VM.

 

I think thats what you would see from the photo

 

 

  • Author

Still getting the breen error after the bios upgrade

  • Author

I notice the you are using the AMD64 .iso.  I changed from that to the i386.iso.  I have tried both and no joy there.

I'd already downloaded your manual.

 

On page 52 there is an option called VT-d check that this is enabled in your BIOS.

 

Intel Virtualisation technology isn't enough by itself.  I think that is just plain VT-x you need VT-d enabled for passthrough.

I've updated to ASrock newest bios for the motherboard.

 

This is the link for my motherboard manual:

 

ftp://europe.asrock.com/manual/H81%20Pro%20BTC.pdf

 

In the CPU config section I have the "Intel Virtualization Technology" enabled.  Which I thought would be enough to enable the VM.

 

I think thats what you would see from the photo

You have to activate vt-d in the chipset configuration also for passthrough to work.

I've updated to ASrock newest bios for the motherboard.

 

This is the link for my motherboard manual:

 

ftp://europe.asrock.com/manual/H81%20Pro%20BTC.pdf

 

In the CPU config section I have the "Intel Virtualization Technology" enabled.  Which I thought would be enough to enable the VM.

 

I think thats what you would see from the photo

You have to activate vt-d in the chipset configuration also for passthrough to work.

 

I just said that lol  ;D

  • Author

Looks like progress.  You two are my hero's  ;D

I'll reserve final judgement until you confirm that not enabling VT-d was the issue but if it is I'm not sure whether to hug you or hunt you down and kill you!  ;D

 

I did post on the plugin thread about compiling a new kernal about VT-d...

Looks like progress.  You two are my hero's  ;D

 

Will you let us know!!!

 

Can't keep refreshing this screen all day, the suspense is killing me!  ;)

  • Author

I think I may have been a nugget!

 

Ubuntu now has 1 of the tuners.  Now for the other....

 

Think there is a bottle of wine here with your name on it CHBMB!

 

If you PM me your address< I owe you a drink I think.

 

Thanks again

YES!

 

Got you there in the end, I've got a big smile on my face now! 

 

Don't worry dude, that's what this community is all about, plenty have helped me over the years!

 

If ever you're in Staffordshire let me know and we'll go for a pint.

 

On the plus side I've posted in the sticky on "Easy" PCI passthrough as I think I've written a pretty clear tutorial so hopefully can help others new to KVM in Unraid.

I think I may have been a nugget!

 

Ubuntu now has 1 of the tuners.  Now for the other....

 

Think there is a bottle of wine here with your name on it CHBMB!

 

If you PM me your address< I owe you a drink I think.

 

Thanks again

 

Mark this bad boy - SOLVED and next time RTFM!! LOL  ;D

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.