[mythtv-users] running mythtv-backend in a VM?

James Abernathy jfabernathy at gmail.com
Wed May 10 20:04:45 UTC 2023


On Tue, May 9, 2023 at 3:04 AM Karl Buckland <buckland.karl at gmail.com>
wrote:

> On Tue, 9 May 2023 at 00:03, Phill Edwards <philledwards at gmail.com> wrote:
> >>
> >> While playing around I have discovered that in some distros it can be
> complicated to get mythtv running.  So I was wondering if you have a
> requirement to run a distro that is not Mythtv friendly. What about using a
> VM?
> >>
> >> I setup KVM/QEMU and created a VM of Ubuntu 22.04 LTS. I setup a share
> directory between the host and Ubuntu guest machine using virtiofs and
> mount that via /etc/fstab.
> >>
> >> So Installing mythtv on Ubuntu is relatively easy.  Since my PC is uses
> a network bridge, the VM is on the same subnet as the home network and can
> see the HDHR tuners.
> >>
> >> This works without any noticeable performance impact on the  PC.  So to
> me keeping Mythtv simple by running it in a Ubuntu VM seems to be a perfect
> solution if you are required to run another Distro and want Mythtv?
> >>
> >> What am I missing?
> >
> >
> > I run a mythbackend VM on Proxmox which is a great virtualisation
> solution with a web browser admin UI. HDHR tuners. Works great.
>
>
> I too am running mythtv backend on Proxmox (container/lxc) and passing
> through a USB TV tuner. It runs very well - containers run with very
> little overhead. I can therefore easily do backups, snapshots and try
> out upgrades without much hassle - or transfer across to new hardware
> easily, which I did last year.
>
>
Thought I'd summarize  what I ended up testing and got working. I learned a
lot about networking and KVM/QEMU.

My big test was putting an Archlinux based Distro called Endeavour OS on
the NUC with 2 SSDs. 1 is the boot drive and is formatted BTRFS; the other
is EXT4 and that is where all the VM images are stored. Something about COW
which BTRFS uses and VMs. I got this working originally with Linux Mint as
host and the VM running Mythtv was Ubuntu 22.04. I was able to import that
VM into my Endeavour OS's KVM with little extra work except setting up the
mythtv storage groups which are all on the host with the VM using them as a
shared directory via virtiofs.

Since my VM images are on the ext4 drive instead of the boot drive I can
save the recordings from the Host and blow away the host and put something
else on without having to do much to get Mythtv back up and working.

My biggest issue was getting the VM to boot when the Host boots.  It turns
out that if you don't set up the default network even if you don't use it,
it affects the way the libvirtd service starts up and creates a race
condition between my br0 bridge coming up and libvirtd starting the VMs.
Once that was resolved, it all worked pretty nice.

Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230510/dac40e9a/attachment.htm>


More information about the mythtv-users mailing list