Virt-Manager, Intel-GPU-Tools and more Dockers


dee31797

Recommended Posts

19 minutes ago, TDA said:

Hello,

I've installed netcat-openbsd and tried to connect.

Unfortunately when I try to connect I get:

 

If I write YES an error appears saying it can connect.

If I write my root password I get this screen:

 

If I type yes and then OK - I get that it can connect.

 

What I'm doing wrong?

 

EDIT: Probabily isn't possible with my setup ; I've setup that SSH is only possible with a SSHCert.

I'm not sure what SSHCert is, but another user previously setup setup something that didnt require him to use the yes/no prompts:

 

https://forums.unraid.net/topic/77603-virt-manager-intel-gpu-tools-and-more-dockers/?do=findComment&comment=784718

 

Link to comment

Hello @dee31797...

 

Thanks for the updates and new docker applications awesome work! Exactly what I was looking for...

 

One concern though, with the Virt-Manager, after you've entered and used a connection once before, does the connection stay persistent in the list so that when I stop the Virt-Manager docker and/or restart the docker the previous connection is still in the list? I may have setup something incorrectly or missed something and it's probably only a minor thing, but everytime the docker starts up or is restarted, all the previous connections is lost and I would need to re-enter the details again. Just not certain whether that's expected. Thanks...

 

I also had a quick look in the appdata folder, but didn't see any noticeable file that could potentially be edited to add the server details.

 

PS - I've gone through the thread to see if anyone mentioned the same concern and the closest thing mentioned was in saving snapshots persistently and also using SSH keys to eliminate multiple prompts in connect to the server. I also searched the forums, but this didn't seem to be mentioned.

 

Thanks again for the great work...

Link to comment
3 hours ago, niz180sx said:

Hello @dee31797...

 

Thanks for the updates and new docker applications awesome work! Exactly what I was looking for...

 

One concern though, with the Virt-Manager, after you've entered and used a connection once before, does the connection stay persistent in the list so that when I stop the Virt-Manager docker and/or restart the docker the previous connection is still in the list? I may have setup something incorrectly or missed something and it's probably only a minor thing, but everytime the docker starts up or is restarted, all the previous connections is lost and I would need to re-enter the details again. Just not certain whether that's expected. Thanks...

 

I also had a quick look in the appdata folder, but didn't see any noticeable file that could potentially be edited to add the server details.

 

PS - I've gone through the thread to see if anyone mentioned the same concern and the closest thing mentioned was in saving snapshots persistently and also using SSH keys to eliminate multiple prompts in connect to the server. I also searched the forums, but this didn't seem to be mentioned.

 

Thanks again for the great work...

I only use one connection currently, but after adding a connection once it does indeed stay persistent through reboots/docker container rebuilds.  The information for the persistent connections list is in "config/xdg/config/dconf/user" file (this is the container's path, on your server it's probably /mnt/user/appdata/Virt-Manager...).  Check and see if you have this file, and if not, verify that the USER_ID has write permissions to the config folder.

 

From what I can tell this is all handled by the container's base image and Virt-Manager, I've never had to do anything for it to save my connection(s).  Add connection -> QEMU/KVM -> check "connect to remote host over SSH" -> user/pass -> click connect.  After that the connection is saved for me.

Link to comment

Hello @dee31797...

 

Thanks for the quick reply, the way you described is exactly how I would expect it to work, but for some reason my connection(s) are not being saved...

 

You understood what I meant exactly and I've checked for "config/xdg/config/dconf/user" and this (for some reason) does not exist for me. I've manually tried and created the directory structure to see if that would help, but nothing gets saved into that location.

 

I'm guessing when you say "USER_ID", I'm guessing you mean the account that I'm logged in as. I'm currently using my "root" login and checking within the docker it does only recognise the "root" user account as being logged in. But the mentioned directory for some reason doesn't get created by the docker.

 

I also created variables "USER_ID" and "GROUP_ID" as per the Github description of environments to see if that would help, but that hasn't changed anything either.

 

Any hints for where I should look? Must be something to do with my setup, just don't know where to start to look.

 

Thanks.

Link to comment

Hello @dee31797...

 

Was going through the logs and just noticed this:

 

"(virt-manager:812): dconf-WARNING **: 14:16:30.348: failed to commit changes to dconf: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file “/var/lib/dbus/machine-id”: No such file or directory"

 

I'm guessing since it's related to dconf (part of the directory structure you previously mentioned), that this message is related to why my connections are not being saved. But am not sure where to start to fix this?

 

Any ideas definitely appreciated.

 

Thanks...

Link to comment

Have gone through the the container and the "machine-id" file doesn't exist at those locations, not sure when it is supposed to be created. I've also tried reinstalling the docker and that file certainly doesn't get created.

 

I did some Googling on how to create the "machine-id" file and I've been able to temporarily add the file with the following lines at the bash prompt:

dbus-uuidgen --ensure=/etc/machine-id

dbus-uuidgen --ensure

 

And this fixes the error in the logs and allows the directory structure and file (that was previously described) to be created. I also tested and the connections are able to be saved now.

 

This is only temporary though, as when I reinstall the docker or "force update" the docker, the file becomes missing.

 

Not sure what else I should do on this end... Can you please help to check and let me know how I could make this more permanent?

 

Many thanks...

  • Thanks 1
Link to comment
4 hours ago, niz180sx said:

Have gone through the the container and the "machine-id" file doesn't exist at those locations, not sure when it is supposed to be created. I've also tried reinstalling the docker and that file certainly doesn't get created.

 

I did some Googling on how to create the "machine-id" file and I've been able to temporarily add the file with the following lines at the bash prompt:

dbus-uuidgen --ensure=/etc/machine-id

dbus-uuidgen --ensure

 

And this fixes the error in the logs and allows the directory structure and file (that was previously described) to be created. I also tested and the connections are able to be saved now.

 

This is only temporary though, as when I reinstall the docker or "force update" the docker, the file becomes missing.

 

Not sure what else I should do on this end... Can you please help to check and let me know how I could make this more permanent?

 

Many thanks...

Sure I'd like to help. Lets confirm a bit of info.

Are you using Unraid? (its docker so shouldn't matter, just in case)

What values did you assign to the variables "USER_ID" and "GROUP_ID" ?

Link to comment

Thanks dee31797...

 

Yes, am using Unraid version 6.8.3 and Docker version 19.03.5.

 

I tried with USER_ID = 0 and GROUP_ID = 0, which correlated to the root user when I checked in the container.

 

Feel free to let me know if any further info is needed.

Edited by niz180sx
Added docker version
Link to comment
26 minutes ago, niz180sx said:

Thanks dee31797...

 

Yes, am using Unraid, version 6.8.3.

 

I tried with USER_ID = 0 and GROUP_ID = 0, which correlated to the root user when I checked in the container.

 

Feel free to let me know any further info is needed.

I added that dbus command to the container to run at startup.  Force an update to the container and let me know if that helps, and thanks for bringing this to my attention.

Link to comment

Awesome...!

 

Forced an update and it kept the previous connection. I additionally removed the docker completely and removed the appdata folder and started afresh. The connections are now able to be successfully retained through a restart and a stop/start of the container.

 

Many thanks @dee31797, all is working well now.

Link to comment

Hi @dee31797

 

I have been using your handbrake docker but seem to have an issue with AC-3 audio.

 

Although I have AC-3 audio ticked for passthrough whenever a file contains AC3 audio it is stripped completely from the output so I get picture with no sound?

 

Is this something you have come accross before? and can you help me fix it.

 

 

And Thanks for the containers

 

dgs2001

Edited by dgs2001
spelling
Link to comment
28 minutes ago, dgs2001 said:

Hi @dee31797

 

I have been using your handbrake docker but seem to have an issue with AC-3 audio.

 

Although I have AC-3 audio ticked for passthrough whenever a file contains AC3 audio it is stripped completely from the output so I get picture with no sound?

 

Is this something you have come accross before? and can you help me fix it.

 

 

And Thanks for the containers

 

dgs2001

No sorry I haven't run into that issue.  I did a test on a video with AC3 and it worked.  Please check the handbrake log in the appdata folder log/hb/conversion.log and that should give some insight into what's going wrong.  Here's mine from my test I did.

...
[11:48:05]  * audio track 1
[11:48:05]    + decoder: English (AC3) (5.1 ch) (384 kbps) (track 1, id 0x101)
...
[11:49:04] ac3-decoder done: 4676 frames, 0 decoder errors
...

 

Edited by dee31797
correct log folder path
Link to comment

@dee31797

 

Thanks for the suggestion. 

 

Looking at the log I see the following

[15:53:08] libhb: scan thread found 1 valid title(s)
+ Using preset: 265AUTOpass
+ title 1:
  + stream: /watch/series/Some Episode to Encode.S07E20.720p.HEVC.x265-MeGusta/82070f.mkv
  + duration: 00:43:31
  + size: 1280x718, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:43:31
  + audio tracks:
    + 1, Unknown (AC3) (5.1 ch) (384 kbps) (iso639-2: und), 48000Hz, 384000bps
  + subtitle tracks:
[15:53:08] Starting work at: Mon Apr  6 15:53:08 2020

So the audio is there nut it's Unknown.

 

Further on I see

[15:53:08] json job:
{
    "Audio": {
        "AudioList": [],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dts",
            "copy:dtshd",
            "copy:eac3",
            "copy:truehd"
        ],
        "FallbackEncoder": "fdk_aac"
    }

So I think the setup is all good.

 

But then the audio is not copied through to the output file.

It only happens intermittently, but I'm guessing HB is ignoring audio marked as "Unknown".

 

I will go and check the Audio settings for track selection.

 

Thanks dgs2001 

Link to comment
14 minutes ago, dgs2001 said:

@dee31797

 

Thanks for the suggestion. 

 

Looking at the log I see the following


[15:53:08] libhb: scan thread found 1 valid title(s)
+ Using preset: 265AUTOpass
+ title 1:
  + stream: /watch/series/Some Episode to Encode.S07E20.720p.HEVC.x265-MeGusta/82070f.mkv
  + duration: 00:43:31
  + size: 1280x718, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:43:31
  + audio tracks:
    + 1, Unknown (AC3) (5.1 ch) (384 kbps) (iso639-2: und), 48000Hz, 384000bps
  + subtitle tracks:
[15:53:08] Starting work at: Mon Apr  6 15:53:08 2020

So the audio is there nut it's Unknown.

 

Further on I see

So I think the setup is all good.

 

But then the audio is not copied through to the output file.

It only happens intermittently, but I'm guessing HB is ignoring audio marked as "Unknown".

 

I will go and check the Audio settings for track selection.

 

Thanks dgs2001 

If it's happening intermittently my guess is the audio settings as well.  On the audio tab there's a little pencil to the right of the audio selection that you can check and make changes in.

 

I package the software up in a docker image, but I'm not that knowledgeable about the Handbrake software itself.

Link to comment

OK

 

Problem Solved.

 

To recap it seems even though I selected passthrough for just about all the audio formats, the audio is not passed through if it is marked as Unknown unless unknown is selected in the track behavior window.

 

I had not realised this before. 

 

Thanks again for the help and the excellent container.

 

dgs2001 

Link to comment
  • 2 weeks later...

Evening All, I'm trying to get Motion eye to publish an mqtt event when it detection motion, but it looks like Mosquitto isn't included, could someone tell me how i might be able to add this in please.

The command i'm trying run on motion is:

mosquitto_pub -h MQTTADDRESS -p 1883 -u MQTTUSERNAME -P MQTTPASSWORD -t cameras/cam1/motion -m "On"

 

and motion stop:

mosquitto_pub -h MQTTADDRESS -p 1883 -u MQTTUSERNAME -P MQTTPASSWORD -t cameras/cam1/motion -m "Off"

 

I believe that mosquitto_pub is missing as if I run the this from the command I get an error 

sh: mosquitto_pub: not found

 

Link to comment
1 minute ago, karldonteljames said:

Evening All, I'm trying to get Motion eye to publish an mqtt event when it detection motion, but it looks like Mosquitto isn't included, could someone tell me how i might be able to add this in please.

The command i'm trying run on motion is:


mosquitto_pub -h MQTTADDRESS -p 1883 -u MQTTUSERNAME -P MQTTPASSWORD -t cameras/cam1/motion -m "On"

 

and motion stop:


mosquitto_pub -h MQTTADDRESS -p 1883 -u MQTTUSERNAME -P MQTTPASSWORD -t cameras/cam1/motion -m "Off"

 

I believe that mosquitto_pub is missing as if I run the this from the command I get an error 


sh: mosquitto_pub: not found

 

Hello @karldonteljames

Unfortunately, the MotionEye Docker does not include any MQTT/Mosquitto software.  It only contains the necessary software for the base image and MotionEye to function.

 

Not sure if it helps, but an alternative to using mosquitto_pub is using curl.  I've used it in the past with this MotionEye Docker and Home Assistant to send a command when there's motion.

Link to comment
1 minute ago, dee31797 said:

Hello @karldonteljames

Unfortunately, the MotionEye Docker does not include any MQTT/Mosquitto software.  It only contains the necessary software for the base image and MotionEye to function.

 

Not sure if it helps, but an alternative to using mosquitto_pub is using curl.  I've used it in the past with this MotionEye Docker and Home Assistant to send a command when there's motion.

Man that really sucks, could you help me out with how you used curl please?

I'm trying to use it for home assistant integration, i'm happy to install the mqtt in the docker if required, just not sure how to do it.

Link to comment
Just now, karldonteljames said:

Man that really sucks, could you help me out with how you used curl please?

I'm trying to use it for home assistant integration, i'm happy to install the mqtt in the docker if required, just not sure how to do it.

Sure!

 

This is what I did, could be a better way but it does work.

 

First, in Home Assistant create an input boolean, more info here: https://www.home-assistant.io/integrations/input_boolean/

 

After that, use the curl command to turn that input boolean on and off based on motion on or off. More info here: https://community.home-assistant.io/t/motioneye-home-assistant-camera-motion-automation/41712/87

 

Now that the input boolean is being controlled by MotionEye, you can write an automation or whatever you need to trigger based on that input boolean.  Hope that helps.

 

 

 

Link to comment
13 minutes ago, karldonteljames said:

Thank you.
Out of interest, do you know where we can request docker containers? I think something like this would be great to integrate in HA, but i have no idea how to build a container in unraid.
https://github.com/blakeblackshear/frigate

Thanks again.

 

I'll take a look at that now.

I believe you can request a docker container here:

 

 

Since that docker container exists on Docker Hub, you can install it on Unraid through CA Apps, but you would have to manually add the necessary volumes, ports, etc. 

 

Link to comment
8 minutes ago, karldonteljames said:

Thanks, I'm not sure how i find out what the volumes/paths would be?

It depends on the docker container and it's creator.  For your specific request frigate, he mentions the required volumes, paths, etc in that github link. 

 

Its a bit advanced to convert to Unraid, and this isn't the right forum thread to work that out, but here's the info you need:

docker run --rm \
--privileged \
--shm-size=512m \ # should work for a 2-3 cameras
-v /dev/bus/usb:/dev/bus/usb \
-v <path_to_config_dir>:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-p 5000:5000 \
-e FRIGATE_RTSP_PASSWORD='password' \
blakeblackshear/frigate:stable

 

Link to comment
2 minutes ago, dee31797 said:

It depends on the docker container and it's creator.  For your specific request frigate, he mentions the required volumes, paths, etc in that github link. 

 

Its a bit advanced to convert to Unraid, and this isn't the right forum thread to work that out, but here's the info you need:


docker run --rm \
--privileged \
--shm-size=512m \ # should work for a 2-3 cameras
-v /dev/bus/usb:/dev/bus/usb \
-v <path_to_config_dir>:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-p 5000:5000 \
-e FRIGATE_RTSP_PASSWORD='password' \
blakeblackshear/frigate:stable

 

Thanks, Really sorry, but do i just run that in a command window? (obviously changing the path to appdata folder.) I've only ever added added docker containers via the apps tab!

Link to comment
22 minutes ago, karldonteljames said:

Thanks, Really sorry, but do i just run that in a command window? (obviously changing the path to appdata folder.) I've only ever added added docker containers via the apps tab!

yes you can run that in a command window, but the downside is it won't show up in Unraid's docker tab the way you're use too.  '

 

You can add this from the apps tab as well.  Here's a blog post on how: https://synaptiklabs.com/posts/setup-unraid-to-pull-from-docker-hub/

 

It's not straightforward, you will have to do a lot of google'ing to get it going.  

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.