Unofficial updater script for Proxmox VE (HOST / LXC / VM )

Hi @BassT,

First: thanks for sharing your Ultimate Updater Script !

I want to update my LXC containers with it (without the hosts), I have a 3 node cluster and on 2 of the nodes the script runs through the Containers and does what it should, but when it tries to connect to the 3rd node I always get the error message:

Host key verification failed.
scp: Connection closed
Error during Update --- Exit Code: 255

If I try to ssh from the host with the updater Script to node3 it works, also if i try to manually send a file from node1 to node3 with hostname and/or IP address I don't get this "Host key verification failed" Error.

I don't know what the script does differently here than when I run ssh or scp manually, do you have any ideas?
 
  • Like
Reactions: BassT
Hi @a13xde,

thanks for using my script ;)

You need better read the info here ;) The last part is the one you are serching for.
The script run from node1 -> node2 and after that from node2 -> node3

So you must check the ssh connection from node2 to node3 ;)
 
Thanks for the hint @BassT next time I really need to read more carefully ;)
Nevertheless, an ssh and scp from node2 -> node3 also works and does not produce the error message I receive from the script. Can you tell me the exact command I have to test ? I tried "ssh <IP-of-node3>" and "scp <Testfile> <IP-of-node3>:/root/<Testfile>"

/etc/hosts are the same on all nodes and checked the IPs with
awk '/ring0_addr/{print $2}' "/etc/corosync/corosync.conf"
 
@a13xde

with this command you can list the used "hopping"
awk '/ring0_addr/{print $2}' "/etc/corosync/corosync.conf"
Here shout come out:
Code:
<node1 ip>
<node2 ip>
<node3 ip>

You can test if the connection work from node2 with
ssh <node3 ip> uptime
for example
 
@a13xde
You can test if the connection work from node2 with
ssh <node3 ip> uptime
for example

Yeah, this works from each node to each of the the other nodes with hostname and IP adresses listed in /etc/corosync/corosync.conf as ring0_addr.
I had run:
Code:
pvecm updatecerts -f
systemctl restart pvedaemon pveproxy

on each node and doublechecked ssh login again , without the error.

i have no idea anymore. I'm still receiving the error when the script tries to connect from node2 to node3:

--- Finished extra updates ---

--- Check Status for Welcome-Screen ---
--- Finished check ---


[Info] Skipped all VMs by the user

Host key verification failed.
scp: Connection closed
Error during Update --- Exit Code: 255

There are an error during update
Please check Output here or Logfile
no more Log in the Logfile
 
Last edited:
For all those interested in the solution:
my second node in the 3 node cluster did not know his own rsa key and this was the problem for me.

"ssh node2hostname uptime" from node2 with adding key to known hosts resoved the issue for me.

So if you receive an "Host key verification failed" error, it's best to check not only ssh to the other nodes, but also to itself

Many thanks to @BassT helping me to troubleshoot this
 
Last edited:
  • Like
Reactions: BassT
@BassT it would be really great to have possibility to create custom update scripts inside some containers so your update script will execute them instead of cron, keeping entire update procedure in one place.
 
WindowsTerminal_s5IWT6UdUj.png
Extras:
- add symbolic
- add user scripts folder
- add "error hopping option" in config file
- add LXC start delay option in config file
- add "update" command for "Proxmox VE Helper-Scripts" in extra section
- FreeBSD is disabled by default in config file
- modify "update <ID>" - disable skip output
- code cleaning

Fixed:
- fix docker-compose v2 skipping
- fix YUM Update - used now only for centos
- fix VM shutdown errors
 
Last edited:
  • Like
Reactions: NovellGuy
Hi @ll

I have a new update for all of you (beta stage)

Please test if you can and give feedback ;)
Code:
update beta -up

There are a bunch of new design upgrades and features :)

- "only" or "exclude" LXC/VM by ID/TAG/range #thx to @AdamSutch
- add debug mode (can be enabled in config file)
- add check-updates command `update -check`
- add email notification after update
- add better email notification for update-check
- add more symbolic
- add LXC template detection
- check "paused" VMs during update-check and bring them back in pause
- fix #203 Error on apt clean
- fix unsupported neofetch under trixie - change to screenfetch
- fix #201 (abbort after template detection)
- fix VM ID in error-log-file
- fix shell check
- fix typo
- code cleaning
 
Last edited:
!! BETA stage now !!

another cool thing is coming also;

with
Code:
update beta -up
you will become an deb updater also ;)

it can update (ONLY LXC) deb12 to deb13 with
Code:
update -dist-upgrade

It will also respect the "only/exclude" settings.

For now, it is only tested by me, and work.
Feel free to test also and give feedback ;)
 
Last edited:
  • Like
Reactions: matt69
WindowsTerminal_Xy0t429zPt.png

v4.5 released
NEW:
- add LXC debian trixie upgrade (`update -dist-upgrade`)
- "only" or "exclude" LXC/VM by ID/TAG/range #thx to @AdamSutch
- add debug mode (can be enabled in config file)
- add check-updates command `update -check`
- add email notification after update
- add better email notification for update-check
- add more symbolic
- add LXC template detection
- check "paused" VMs during update-check and bring them back in pause

FIX:
- fix #203 Error on apt clean
- fix unsupported neofetch under trixie - change to screenfetch
- fix #201 (abbort after template detection)
- fix VM ID in error-log-file
- fix shell check
- fix typo
- code cleaning
 
  • Like
Reactions: drake06 and matt69
v4.5.2 released

- add Backup when Snapshot is not available #204
- fix fs-trim
- fix "error code 1" on start
- fix #188 error during helper-script update
- fix ssh connection during check
- code cleaning
 
  • Like
Reactions: drake06