Skip to content

Unable to detect qemu-guest-agent on RockyLinux 10.1 (assumingly RHEL 10 derivatives as well) #256

@areis422

Description

@areis422

Describe the bug
The update script is unable to detect a running QEMU agent on RockyLinux 10.1.

To Reproduce
Steps to reproduce the behavior:

  1. Login to Proxmox host
  2. update VMID (VMID = rockylinux vm)
  3. SSH or QEMU guest agent is not initialized on VM

With debug enabled, fails on qm guest exec VMID test with message:

root@pve2:~# qm guest exec 101 test
Agent error: Command guest-exec has been disabled: the command is not allowed

Looks like qemu-guest-agent v10 disables guest-exec by default:

[areis@adguard ~]$ sudo cat /proc/870/cmdline; echo; echo;
/usr/bin/qemu-ga--method=virtio-serial--path=/dev/virtio-ports/org.qemu.guest_agent.0--allow-rpcs=guest-sync-delimited,guest-sync,guest-ping,guest-get-time,guest-set-time,guest-info,guest-shutdown,guest-fsfreeze-status,guest-fsfreeze-freeze,guest-fsfreeze-freeze-list,guest-fsfreeze-thaw,guest-fstrim,guest-suspend-disk,guest-suspend-ram,guest-suspend-hybrid,guest-network-get-interfaces,guest-get-vcpus,guest-set-vcpus,guest-get-disks,guest-get-fsinfo,guest-set-user-password,guest-get-memory-blocks,guest-set-memory-blocks,guest-get-memory-block-info,guest-get-host-name,guest-get-users,guest-get-timezone,guest-get-osinfo,guest-get-devices,guest-ssh-get-authorized-keys,guest-ssh-add-authorized-keys,guest-ssh-remove-authorized-keys,guest-get-diskstats,guest-get-cpustats,guest-network-get-route,guest-get-load-F/etc/qemu-ga/fsfreeze-hook

Obvious fix is to modify the systemctl service file to allow the usage of the rpc, but that could get burdensome...

Debug output

+ echo -e '\n     https://github.com/BassT23/Proxmox\n'

     https://github.com/BassT23/Proxmox

+ cat
 The __  ______  _                 __
    / / / / / /_(_)___ ___  ____ _/ /____
   / / / / / __/ / __ `__ \/ __ `/ __/ _ \
  / /_/ / / /_/ / / / / / / /_/ / /_/  __/
  \____/_/\__/_/_/ /_/ /_/\____/\__/\___/
     __  __          __      __
    / / / /___  ____/ /___ _/ /____  ____
   / / / / __ \/ __  / __ `/ __/ _ \/ __/
  / /_/ / /_/ / /_/ / /_/ / /_/  __/ /
  \____/ ____/\____/\____/\__/\___/_/
      /_/     for Proxmox VE
+ [[ '' != false ]]
+ echo -e '\n           ***  Mode:  Single ***'

           ***  Mode:  Single ***
+ [[ '' == true ]]
+ echo -e '           ***   Interactive  ***'
           ***   Interactive  ***
+ CHECK_ROOT
+ [[ '' != true ]]
+ [[ 0 -ne 0 ]]
+ CHECK_INTERNET
+ ping -q -c1 google.com
+ [[ '' != false ]]
+ [[ true == true ]]
+ VERSION_CHECK
+ curl -s https://raw.githubusercontent.com/BassT23/Proxmox/master/update.sh
+ curl -s https://raw.githubusercontent.com/BassT23/Proxmox/beta/update.sh
+ curl -s https://raw.githubusercontent.com/BassT23/Proxmox/develop/update.sh
++ awk '-F"' '/^VERSION=/ {print $2}' /etc/ultimate-updater/temp/update_master.sh
+ MASTER_VERSION=4.5.2
++ awk '-F"' '/^VERSION=/ {print $2}' /etc/ultimate-updater/temp/update_beta.sh
+ BETA_VERSION=4.5
++ awk '-F"' '/^VERSION=/ {print $2}' /etc/ultimate-updater/temp/update_develop.sh
+ DEVELOP_VERSION=4.5.3
++ awk '-F"' '/^VERSION=/ {print $2}' /etc/ultimate-updater/update.sh
+ LOCAL_VERSION=4.5.2
+ [[ master == develop ]]
+ [[ master == beta ]]
+ [[ master == master ]]
+ [[ 4.5.2 < 4.5.2 ]]
+ echo -e '\n              \e[1;92mScript is UpToDate\e[0m'

              Script is UpToDate
+ [[ '' != true ]]
+ echo -e '                 Version: 4.5.2'
                 Version: 4.5.2
+ rm -rf /etc/ultimate-updater/temp/update_master.sh
+ rm -rf /etc/ultimate-updater/temp/update_beta.sh
+ rm -rf /etc/ultimate-updater/temp/update_develop.sh
+ rm -rf /etc/ultimate-updater/temp/update.sh
+ echo

+ [[ '' == \t\r\u\e ]]
+ true
+ [[ false == false ]]
+ echo -e 'ℹ \e[1;33m Exit, if error come up, is disabled\e[0m\n'
ℹ  Exit, if error come up, is disabled

+ echo -e 'ℹ \e[1;33m Update only LXC/VM 101 - work only on main host!\e[0m\n'
ℹ  Update only LXC/VM 101 - work only on main host!

+ CONTAINER_UPDATE_START
++ pct list
++ tail -n +2
++ cut -f1 '-d '
+ CONTAINERS='102
200
201'
+ for CONTAINER in $CONTAINERS
+ ERROR_CODE=
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 102 ]]
+ [[ true != true ]]
+ continue
+ for CONTAINER in $CONTAINERS
+ ERROR_CODE=
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 200 ]]
+ [[ true != true ]]
+ continue
+ for CONTAINER in $CONTAINERS
+ ERROR_CODE=
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 201 ]]
+ [[ true != true ]]
+ continue
+ rm -rf /etc/ultimate-updater/temp/temp
+ VM_UPDATE_START
++ qm list
++ tail -n +2
++ cut -c -10
+ VMS='       100
       101
       103
       104'
+ for VM in $VMS
++ grep ostype
++ qm config 100
+ PRE_OS='ostype: l26'
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 100 ]]
+ [[ true != true ]]
+ continue
+ for VM in $VMS
++ grep ostype
++ qm config 101
+ PRE_OS='ostype: l26'
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 101 ]]
+ grep template
+ qm config 101
+ [[ ostype: l26 =~ w ]]
++ qm status 101
+ STATUS='status: running'
+ [[ status: running == \s\t\a\t\u\s\:\ \s\t\o\p\p\e\d ]]
+ [[ status: running == \s\t\a\t\u\s\:\ \s\t\o\p\p\e\d ]]
+ [[ status: running == \s\t\a\t\u\s\:\ \r\u\n\n\i\n\g ]]
+ [[ true == true ]]
+ UPDATE_VM 101
+ VM=101
++ grep name:
++ qm config 101
++ sed 's/name:\s*//'
+ NAME=adguard
+ CVM=true
+ echo 'VM="101"'
+ echo -e '🔄\e[1;92m Updating VM \e[36m101\e[0m : \e[1;92madguard\e[0m\n'
🔄 Updating VM 101 : adguard

+ echo -e '💾\e[1;33m Start Snapshot and/or Backup\e[0m'
💾 Start Snapshot and/or Backup
+ VM_BACKUP
+ [[ true == true ]]
+ [[ true == true ]]
++ date +%Y%m%d_%H%M%S
+ qm snapshot 101 Update_20251222_231053
+ echo -e '✅\e[1;92m Snapshot created\e[0m'
✅ Snapshot created
+ echo -e 'ℹ \e[1;92m Delete old snapshot(s)\e[0m'
ℹ  Delete old snapshot(s)
++ qm listsnapshot 101
++ sed -n 's/^.*Update\s*\(\S*\).*$/\1/p'
++ head -n -3
+ LIST=_20251222_230318
+ for SNAPSHOTS in $LIST
+ qm delsnapshot 101 Update_20251222_230318
+ echo -e '✅\e[1;92m Done\e[0m'
✅ Done
+ [[ false == true ]]
+ echo

+ [[ -f /etc/ultimate-updater/VMs/101 ]]
+ UPDATE_VM_QEMU
+ echo -e ' ▶\e[1;92m Try to connect via QEMU\e[0m'
 ▶ Try to connect via QEMU
+ [[ '' == true ]]
+ qm guest exec 101 test
+ echo -e '\e[1;91m  ❌ SSH or QEMU guest agent is not initialized on VM \e[0m\n  \e[1;33mIf you want to update VMs, you must set up it by yourself!\e[0m\n  For ssh (harder, but nicer output), check this: <https://github.com/BassT23/Proxmox/blob/master/ssh.md>\n  For QEMU (easy connection), check this: <https://pve.proxmox.com/wiki/Qemu-guest-agent>\n'
  ❌ SSH or QEMU guest agent is not initialized on VM 
  If you want to update VMs, you must set up it by yourself!
  For ssh (harder, but nicer output), check this: <https://github.com/BassT23/Proxmox/blob/master/ssh.md>
  For QEMU (easy connection), check this: <https://pve.proxmox.com/wiki/Qemu-guest-agent>

+ CVM=
+ for VM in $VMS
++ grep ostype
++ qm config 103
+ PRE_OS='ostype: l26'
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 103 ]]
+ [[ true != true ]]
+ continue
+ for VM in $VMS
++ qm config 104
++ grep ostype
+ PRE_OS='ostype: win11'
+ [[ 101 == '' ]]
+ [[ 101 != '' ]]
+ [[ 101 =~ 104 ]]
+ [[ true != true ]]
+ continue
+ shift
+ [[ 0 -gt 0 ]]
+ [[ true != true ]]
+ exit 0
+ EXIT
+ EXIT_CODE=0
+ [[ -f /etc/ultimate-updater/temp/exec_host ]]
++ awk '-F"' '/^EXEC_HOST=/ {print $2}' /etc/ultimate-updater/temp/exec_host
+ EXEC_HOST=pve2
+ [[ true == true ]]
+ scp /etc/ultimate-updater/check-output pve2:/etc/ultimate-updater/check-output
+ [[ 0 == 2 ]]
+ [[ 0 == 0 ]]
+ [[ '' != true ]]
+ [[ -f /var/log/ultimate-updater-error.log ]]
+ [[ -s /var/log/ultimate-updater-error.log ]]
+ echo -e '\e[1;92m✅ Finished, all updates done.\e[0m\n'
✅ Finished, all updates done.

+ /etc/ultimate-updater/exit/passed.sh
🎉 All fine, have a nice day

+ CLEAN_LOGFILE
+ [[ '' != true ]]
+ tail -n +2 /var/log/ultimate-updater.log
+ mv tmp.log /var/log/ultimate-updater.log
+ cat /var/log/ultimate-updater.log
+ sed -r 's/\x1B\[([0-9]{1,3}(;[0-9]{1,3})*)?[mGK]//g'
+ tee /var/log/ultimate-updater.log
+ chmod 640 /var/log/ultimate-updater.log
+ [[ -f ./tmp.log ]]
+ echo 'Finished, all updates done. No errors'
+ mail -s 'Ultimate Updater' root
+ sleep 3
+ rm -rf /etc/ultimate-updater/temp/var
+ rm -rf /etc/ultimate-updater/update
+ [[ -f /etc/ultimate-updater/temp/exec_host ]]
+ [[ pve2 != \p\v\e\2 ]]

Expected behavior
The update on the container succeeds

VM/LXC (please complete the following information):

  • OS: RockyLinux 10.1 (assuming all RHEL 10 derivatives as well)
  • Version 10.1
[areis@adguard ~]$ cat /etc/os-release
NAME="Rocky Linux"
VERSION="10.1 (Red Quartz)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="10.1"
PLATFORM_ID="platform:el10"
PRETTY_NAME="Rocky Linux 10.1 (Red Quartz)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:10::baseos"
HOME_URL="https://rockylinux.org/"
VENDOR_NAME="RESF"
VENDOR_URL="https://resf.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2035-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-10"
ROCKY_SUPPORT_PRODUCT_VERSION="10.1"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="10.1"

[areis@adguard ~]$ rpm -qa | grep qemu
qemu-guest-agent-10.0.0-14.el10_1.x86_64

Used Version

     https://github.com/BassT23/Proxmox

 The __  ______  _                 __
    / / / / / /_(_)___ ___  ____ _/ /____
   / / / / / __/ / __ `__ \/ __ `/ __/ _ \
  / /_/ / / /_/ / / / / / / /_/ / /_/  __/
  \____/_/\__/_/_/ /_/ /_/\____/\__/\___/
     __  __          __      __
    / / / /___  ____/ /___ _/ /____  ____
   / / / / __ \/ __  / __ `/ __/ _ \/ __/
  / /_/ / /_/ / /_/ / /_/ / /_/  __/ /
  \____/ ____/\____/\____/\__/\___/_/
      /_/     for Proxmox VE

Last modification (on GitHub): 2025-12-14T15:46:33Z

  Version overview
           Local / Server

  Updater: 4.5.2
  Extras:  2.2
  Config:  1.8.8
  Welcome: 1.9
  Check:   1.7.9

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfeature-requestNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions