Anybody running Kodi in LXD?
#1
Well I've just spent the last 2 days figuring out how to get Kodi running in an lxd container with sound/video/input because there is practically very little documentation on it Sad and I finally cracked it, if anybody else is interested in running Kodi this way I will write up a how to.
Reply
#2
please do a write up!
Reply
#3
Yeah I'm about to attempt setting that up now as well.
I'm migrating my FreeBSD server(with ZFS) to Ubuntu 16.04 with ZFS, so I can run Kodi on the Intel GPU(not supported in FreeBSD).
Thought I might was well isolate Kodi in a container so no bad addons can get access to the rest of the system.
Reply
#4
Wouldn't a chroot jail be sufficient?
As you don't run kodi as su it shouldnt be able to break out.
Reply
#5
Sorry I haven't had time to write up a tutorial yet, I am using lxc as opposed to lxd as there is plenty of documentation for it unlike lxd, once you have created an ubuntu container and followed one of the many guides for installing Kodi there is only some slight additional configuration needed, you can download the files I am using here.

All files should be placed on the main host with the exception of /usr/share/X11/xorg.conf.d/10-input.conf which should be placed within the container, the files are pretty much self explanatory for any experienced Linux user, the hooks and dev permissions will need to be modified to suit your system. I was also using a bridged network interface in my lxc container config so that will need changing to suit your system as well.

Code:
[root]@[INTEL-NUC] ~ # lxc-info -n kodi
Name:           kodi
State:          RUNNING
PID:            6807
IP:             192.168.0.41
CPU use:        60.02 seconds
BlkIO use:      164.00 KiB
Memory use:     290.04 MiB
KMem use:       0 bytes
Link:           vethKMDBE9
TX bytes:      21.72 KiB
RX bytes:      102.39 KiB
Total bytes:   124.11 KiB
[root]@[INTEL-NUC] ~ #

Everything works as it should ^_^ GPU acceleration, sound, input etc..

I have to say I'm extremely pleased I can run Kodi practically as a VM with no need for VT-d or an additional GPU.
Reply
#6
(2016-05-11, 01:51)AdamG Wrote: Sorry I haven't had time to write up a tutorial yet, I am using lxc as opposed to lxd as there is plenty of documentation for it unlike lxd, once you have created an ubuntu container and followed one of the many guides for installing Kodi there is only some slight additional configuration needed, you can download the files I am using here.

All files should be placed on the main host with the exception of /usr/share/X11/xorg.conf.d/10-input.conf which should be placed within the container, the files are pretty much self explanatory for any experienced Linux user, the hooks and dev permissions will need to be modified to suit your system. I was also using a bridged network interface in my lxc container config so that will need changing to suit your system as well.

Code:
[root]@[INTEL-NUC] ~ # lxc-info -n kodi
Name:           kodi
State:          RUNNING
PID:            6807
IP:             192.168.0.41
CPU use:        60.02 seconds
BlkIO use:      164.00 KiB
Memory use:     290.04 MiB
KMem use:       0 bytes
Link:           vethKMDBE9
TX bytes:      21.72 KiB
RX bytes:      102.39 KiB
Total bytes:   124.11 KiB
[root]@[INTEL-NUC] ~ #

Everything works as it should ^_^ GPU acceleration, sound, input etc..

I have to say I'm extremely pleased I can run Kodi practically as a VM with no need for VT-d or an additional GPU.

Hello AdamG, I'm trying to achieve the same but with nvidia graphics under proxmox(www.proxmox.com).

Would you mind to share your LXC files again?

Thanks!
Reply
#7
(2016-05-11, 01:51)AdamG Wrote: Sorry I haven't had time to write up a tutorial yet, I am using lxc as opposed to lxd as there is plenty of documentation for it unlike lxd, once you have created an ubuntu container and followed one of the many guides for installing Kodi there is only some slight additional configuration needed, you can download the files I am using here.

All files should be placed on the main host with the exception of /usr/share/X11/xorg.conf.d/10-input.conf which should be placed within the container, the files are pretty much self explanatory for any experienced Linux user, the hooks and dev permissions will need to be modified to suit your system. I was also using a bridged network interface in my lxc container config so that will need changing to suit your system as well.

Code:
[root]@[INTEL-NUC] ~ # lxc-info -n kodi
Name:           kodi
State:          RUNNING
PID:            6807
IP:             192.168.0.41
CPU use:        60.02 seconds
BlkIO use:      164.00 KiB
Memory use:     290.04 MiB
KMem use:       0 bytes
Link:           vethKMDBE9
TX bytes:      21.72 KiB
RX bytes:      102.39 KiB
Total bytes:   124.11 KiB
[root]@[INTEL-NUC] ~ #

Everything works as it should ^_^ GPU acceleration, sound, input etc..

I have to say I'm extremely pleased I can run Kodi practically as a VM with no need for VT-d or an additional GPU.
Trying to achieve the same. Could you please share your configs?
Reply
#8
(2016-05-11, 01:51)AdamG Wrote: Sorry I haven't had time to write up a tutorial yet, I am using lxc as opposed to lxd as there is plenty of documentation for it unlike lxd, once you have created an ubuntu container and followed one of the many guides for installing Kodi there is only some slight additional configuration needed, you can download the files I am using here.

All files should be placed on the main host with the exception of /usr/share/X11/xorg.conf.d/10-input.conf which should be placed within the container, the files are pretty much self explanatory for any experienced Linux user, the hooks and dev permissions will need to be modified to suit your system. I was also using a bridged network interface in my lxc container config so that will need changing to suit your system as well.

Code:
[root]@[INTEL-NUC] ~ # lxc-info -n kodi
Name:           kodi
State:          RUNNING
PID:            6807
IP:             192.168.0.41
CPU use:        60.02 seconds
BlkIO use:      164.00 KiB
Memory use:     290.04 MiB
KMem use:       0 bytes
Link:           vethKMDBE9
TX bytes:      21.72 KiB
RX bytes:      102.39 KiB
Total bytes:   124.11 KiB
[root]@[INTEL-NUC] ~ #

Everything works as it should ^_^ GPU acceleration, sound, input etc..

I have to say I'm extremely pleased I can run Kodi practically as a VM with no need for VT-d or an additional GPU.

Same here - would appreciate it if you could share your files again. So are you using LXC 1.0 now? I'm trying to achieve this in LXC 2.0/LXD - to work alongside my non GUI containers. Did you find that wasn't possible?
Reply
#9
Hi!!

Anyone has the files for making it working. The link is not yet working...

Thanks.
Reply
#10
I would also be really interested in such an setup.

Currently I am running a Proxmox 5.1 Server and I created LXC conatiners for my Plex Server (Ubuntu 14.04 template) and another one for tvheadend (Ubuntu 16.04 template).
Now running Kodi in another conatiner would make it the perfect machine for me. Hope will be able to achive that with your support here.

If someone could give a hint in which direction to go, it would be great, especially regarding mapping/mounting the Intel onboard graphics so Kodi would be able to use it.
@AdamG hope maybe you can give here a hint.

Thanks for the great support here.

Regards
Vlaves
Reply
#11
please someone can write a tutorial ?
Reply
#12
Hi,
not a tutorial but a script for proxmox. Some comments inside if you prefer to DIY instead of just running it:
https://github.com/mrrudy/proxmoxHelper
Reply

Logout Mark Read Team Forum Stats Members Help
Anybody running Kodi in LXD?0