Proxmox

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Proxmox

Post by solarboy »

I am moving from rpi3b to an Intel NUC 6i3SYK i3 6100U as the pi is starting to stress out with all the services I am running. I have read extensively about proxmox and I like the idea of running domoticz and all my home automation services in a VM for the complete setup backup and snapshot capability. Up till now I have only found the "sdcard copier" in raspbian to provide a reliable backup.
I currently have everything running in dockers except domoticz which I intend to move to docker. Am I on the right path for improved reliability or are the layers of virtualisation excessive ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
HvdW
Posts: 535
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Proxmox

Post by HvdW »

I'm using rpi-clone?
Here is a script to let it run smoothly.

Code: Select all

#!/bin/bash

# rpi-clone.sh
# https://github.com/billw2/rpi-clone
# command to find attached drives
# sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL
# df -h
# command sh -x rpi-clone.sh

sudo service cron stop
sudo service domoticz stop
sudo service lighttpd stop
#sudo service pihole-FTL stop
#sudo service unifi stop
sudo service unattended-upgrades stop
sudo service unbound stop
#sudo service fail2ban stop
sudo systemctl stop SBFspotUpload

# first setup
# -f is force initialise -U is unattended
#sudo ~/rpi-clone/rpi-clone -f -v -U mmcblk0 for cloning from sd to rpi
sudo ~/rpi-clone/rpi-clone -v -f sda

# all following
#sudo rpi-clone -v -u sdx

# to install as a cronjob: crontab -e
# # m h  dom mon dow   command
#6 6 * * 6 sudo rpi-clone -u sdx

sudo service cron start
sudo service domoticz start
sudo service lighttpd start
#sudo service unifi start
#sudo service pihole-FTL start
sudo service unattended-upgrades start
sudo service unbound start
#sudo service fail2ban start
sudo systemctl start SBFspotUpload
Bugs bug me.
User avatar
waltervl
Posts: 5394
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Proxmox

Post by waltervl »

Did you do a search on proxmox on this forum?
If you like Docker I would install Ubuntu server on your new Nuc and continue using docker, also for Domoticz.

For backup copy a daily backup of your userdata of all your Docker containers to a safe location.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Proxmox

Post by Egregius »

I'm running Domoticz without Docker on Debian in a Proxmox CT. Runs perfectly. No hassle at all to restore a backup if needed.
Because CT uses a LXC container there's practically no overhead at all.
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Proxmox

Post by gizmocuz »

Just use Domoticz (and your other services) with Docker Compose.
Create separate folders for each of your projects, and use folders inside these folders as volumes

./my_folder:/opt/docker-project/folder

Use a rsync job to backup the dockers folders, I install all my dockers in /opt, so I only need to backup the /opt folder and done.

These nucs are fast, I am also an old (5 year?) intel i5 nuc, and these days the price of a m.2 drive is very interesting as well
Quality outlives Quantity!
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox

Post by solarboy »

HvdW wrote: Friday 29 November 2024 0:32 I'm using rpi-clone?
Here is a script to let it run smoothly.

Code: Select all

#!/bin/bash

# rpi-clone.sh
# https://github.com/billw2/rpi-clone
# command to find attached drives
# sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL
# df -h
# command sh -x rpi-clone.sh

sudo service cron stop
sudo service domoticz stop
sudo service lighttpd stop
#sudo service pihole-FTL stop
#sudo service unifi stop
sudo service unattended-upgrades stop
sudo service unbound stop
#sudo service fail2ban stop
sudo systemctl stop SBFspotUpload

# first setup
# -f is force initialise -U is unattended
#sudo ~/rpi-clone/rpi-clone -f -v -U mmcblk0 for cloning from sd to rpi
sudo ~/rpi-clone/rpi-clone -v -f sda

# all following
#sudo rpi-clone -v -u sdx

# to install as a cronjob: crontab -e
# # m h  dom mon dow   command
#6 6 * * 6 sudo rpi-clone -u sdx

sudo service cron start
sudo service domoticz start
sudo service lighttpd start
#sudo service unifi start
#sudo service pihole-FTL start
sudo service unattended-upgrades start
sudo service unbound start
#sudo service fail2ban start
sudo systemctl start SBFspotUpload
That's a great script. I did try to use rpi-clone a few years back but ran into issues with the system rebooting into the cloned drive instead of the main drive so I went with a monthly sd-card-copier back up, booting into that, and another sd-card-copier backup to another SSD, that way always keeping an SSD ready to go. The 2 SSD's were identical and I think that was why I ran into problems doing direct clones. Thanks for your suggestion.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox

Post by solarboy »

Egregius wrote: Friday 29 November 2024 6:57 I'm running Domoticz without Docker on Debian in a Proxmox CT. Runs perfectly. No hassle at all to restore a backup if needed.
Because CT uses a LXC container there's practically no overhead at all.
Am I right in thinking that you are running the docker containers in Proxmox without using a VM ? I hadn't considered this. Thanks for the suggestion.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox

Post by solarboy »

gizmocuz wrote: Friday 29 November 2024 9:03 Just use Domoticz (and your other services) with Docker Compose.
Create separate folders for each of your projects, and use folders inside these folders as volumes

./my_folder:/opt/docker-project/folder

Use a rsync job to backup the dockers folders, I install all my dockers in /opt, so I only need to backup the /opt folder and done.

These nucs are fast, I am also an old (5 year?) intel i5 nuc, and these days the price of a m.2 drive is very interesting as well
Thanks for this suggestion, another option to consider. I currently run everything in dockers (docker-compose) except domoticz as I needed time to study how to make ports available and if I needed a custom start up script to install python modules etc inside the container but I will now be moving Domoticz into a container at least. I do like the idea of a virtual machine though, simply for the ease of just rolling back everything in one swift and easy command as often when I update zigbee/zwave/domoticz and something goes wrong I find myself with hours of work to fix the issue and sometimes I don't have the time to spare. This is where a full system backup is useful, but my method was very hands on and took about half a day to complete.

Obviously a VM will add some overhead but it seems the NUC is powerful enough without using too much extra energy.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Proxmox

Post by Egregius »

solarboy wrote: Friday 29 November 2024 18:48
Egregius wrote: Friday 29 November 2024 6:57 I'm running Domoticz without Docker on Debian in a Proxmox CT. Runs perfectly. No hassle at all to restore a backup if needed.
Because CT uses a LXC container there's practically no overhead at all.
Am I right in thinking that you are running the docker containers in Proxmox without using a VM ? I hadn't considered this. Thanks for the suggestion.
I don't use Docker, don't see the advantage of that and don't understand it.
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox

Post by solarboy »

I was under the impression that LXC containers are quite similar to Docker containers, at least in their use of the underlying kernel. Docker originally used LXC apparantly.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests