[mythtv-users] Porting mythtv backend to a LXD container

Stephen Worthington stephen_agent at jsw.gen.nz
Sat May 19 10:45:00 UTC 2018


On Fri, 18 May 2018 22:48:57 -0500, you wrote:

>On 05/18/2018 09:27 PM, Rajil Saraswat wrote:
>> I have a mysql server running in an LXD container which hosts the mythtv
>> database. The mythv-backend is itself running on the host. My plan is to
>> move the backend to a separate LXD container as well.
>> 
>> I setup a new container, and made sure that the tv tuners devices and
>> 'Storage Group directories' are available inside the container. However,
>> when i run mythtv-setup in the container, the  Capture card list comes
>> up empty. Also, the 'Storage Groups' come up empty as well. I have a
>> sneaking suspicion, that since the container has a different ip address
>> than the host, myth is trying to set up a new profile. Is that correct?
>> Is there any way i can reuse the old profile with a new ip address?
>
>I'd guess that the tuners and Storage Groups appear to be missing because
>the hostname has changed.
>
>There is a way to change the hostname (which is used as a profile ID.) Look
>in the config.xml that the backend uses for a line like:
>
>     <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
>
>and change it to the original hostname used when the DB was created.
>Typically the output of the command: hostname. You may have frontends
>on the same host that need the same change.
>
>If you choose this solution, then you're responsible for maintaining it,
>for example if config.xml ever gets deleted/unlinked/corrupt, remember
>to restore the LocalHostName. It's a quick test to prove the reason for the
>missing DB info.
>
>Or, you can go to the Wiki for instructions on changing the hostname in
>the DB. https://www.mythtv.org/wiki/Database_Backup_and_Restore#Change_the_hostname_of_a_MythTV_frontend_or_backend
>which is a better/safer solution.

The tuners do not use the hostname.  Tuners are in the capturecard
table, which does not have a hostname field.  The storage groups are
in the storagegroup table, which does have a hostname field.

Are you able to access the database from the container?


More information about the mythtv-users mailing list