How to run a QDevice in Docker

baron164

New Member
Jan 16, 2024
25
3
3
I'm looking into running a QDevice for my proxmox cluster within docker on my Synology nas. I've never used docker before so this is still new to me. I've downloaded a few "images' from the registry but while I can get at least one of them to build and run I can't seem to connect to it. I'm wondering if anyone here has experience running a qdevice in docker and may be able to point me in the right direction.

I've had the most success running this image: https://hub.docker.com/r/bcleonard/proxmox-qdevice/
This is the YAML config I've been using.
YAML:
version: "3.5"
services:
  qdevice:
    container_name: qdevice
    image: 'bcleonard/proxmox-qdevice'
    build:
      context: ./context
      dockerfile: ./Dockerfile
    hostname: qdevice
    restart: unless-stopped
    volumes:
     - /volume1/docker/qdevice/qnetd/corosync-data:/etc/corosync
     - /sys/fs/cgroup:/sys/fs/cgroup:ro
    ports:
      - '2222:22'
      - '5403-5412:5403-5412/udp'
    networks:
     - qdevice-net
    environment:
     - NEW_ROOT_PASSWORD=Password1
networks:
  qdevice-net:
    name: qdevice-net
    driver: bridge

I can ping the 2222 port but I can't connect to it using ssh. No data is being written in the corosync-data folder either so while the container is running I don't think it's doing anything. Any help would be greatly appreciated.
 
qnetd is 5403 TCP (not UDP)

(NB I have no idea what's in the docker container by a stranger and myself would not want to run it that way.)
 
qnetd is 5403 TCP (not UDP)

(NB I have no idea what's in the docker container by a stranger and myself would not want to run it that way.)
I checked that and from what I was reading TCP is supposedly implied and doesn't need to be specifically called out in the config file. So the way it's written "should" allow for both TCP and UDP.

This is my first time messing with docker and I haven't figured out how to build something like this entirely from scratch yet. Though that looks like it's going to be how I need to proceed. My other option was to install the VMM component on the Synology and run a full VM for Proxmox in order to add a third host. I figured running just a qdevice in docker would be the more streamlined approach so I'm just giving it a try.
 
I've had the most success running this image: https://hub.docker.com/r/bcleonard/proxmox-qdevice/
I wonder why you haven't used the author provided docker-compose.yml.


This is my first time messing with docker and I haven't figured out how to build something like this entirely from scratch yet.
As it looks, you technically built the image yourself. The Dockerfile looks OK, yet a little long / unecessarly multistepped for my taste.
 
@baron164 , did you ever get this to work without using port 22? I am not getting my proxmox to connect to it on port 2222 even though I can connect to it.
 
@baron164 , did you ever get this to work without using port 22? I am not getting my proxmox to connect to it on port 2222 even though I can connect to it.
Have you tried configuring the setup on the PVE side with ~/.ssh/config so that you have a default configuration setup for the QDevice?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!