[SOLVED] Cannot shutdown VM - acpid installed

Razva

Renowned Member
Dec 3, 2013
250
10
83
Romania
cncted.com
Hello,

Host information:

Code:
# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-4-pve)
pve-manager: 7.1-10 (running version: 7.1-10/6ddebafe)
pve-kernel-helper: 7.1-9
pve-kernel-5.13: 7.1-7
pve-kernel-5.11: 7.0-10
pve-kernel-5.13.19-4-pve: 5.13.19-8
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 15.2.13-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-6
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-2
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.0-15
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-1
proxmox-backup-client: 2.1.5-1
proxmox-backup-file-restore: 2.1.5-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-5
pve-cluster: 7.1-3
pve-container: 4.1-3
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-4
pve-ha-manager: 3.3-3
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.1-1
pve-xtermjs: 4.16.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.2-pve1

Guest:
  • Debian 11
  • Linux 5.10.0-11-cloud-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux
Code:
# apt install acpid
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
acpid is already the newest version (1:2.0.32-1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

# apt remove qemu-guest-agent
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'qemu-guest-agent' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

As you can see ACPID is installed, there's not qemu-guest-agent (and it won't be installed, by request). Unfortunately "Shutdown" doesn't works. Any idea on how to fix this? Some users refuse to install the QEMU Agent, but I need a way to gracefully shutdown the node for PVE kernel upgrades etc.

Any hints?

Thank you
 
  • Like
Reactions: Virginia-jfp
As you can see ACPID is installed, there's not qemu-guest-agent (and it won't be installed, by request). Unfortunately "Shutdown" doesn't works. Any idea on how to fix this? Some users refuse to install the QEMU Agent, but I need a way to gracefully shutdown the node for PVE kernel upgrades etc.
Maybe you should explain them that the qemu guest agent is needed for consistent snapshots/backups. Without it PVE can't fsfreeze the guest and corrupted snapshots/backups might be the result. Without it only "stop" mode backups will be consistent and these are really slow as dirty bitmapping can't be used and shutting down the guests for each backup also isn't great for availability...

The qemu guest agent checkbox in the VMs options is unset? With it unchecked PVE should use ACPI to shutdown which works fine here with a stock Debian 11 VM.
 
Maybe you should explain them that the qemu guest agent is needed for consistent snapshots/backups. Without it PVE can't fsfreeze the guest and corrupted snapshots/backups might be the result. Without it only "stop" mode backups will be consistent and these are really slow as dirty bitmapping can't be used and shutting down the guests for each backup also isn't great for availability...

The qemu guest agent checkbox in the VMs options is unset? With it unchecked PVE should use ACPI to shutdown which works fine here with a stock Debian 11 VM.
The reason why the user wants to disable qemu-guest-agent is the fact that Proxmox is basically crashing the VM each time a fsfreeze-freeze command is issued.

The log (on the guest) shows only qemu-ga: info: guest-fsfreeze called and that's it, the VM is basically getting unresponsive. I've just finished upgrading PVE to the latest kernel, still no luck.

I'm not the only one having this issue, please see here.
 
In my case shutdown has been working as expected.
Code:
debian@test-shutdown:~$ dpkg -l | grep acpi
ii  acpi-support-base             0.143-5                        all          scripts for handling base ACPI events such as the power button
ii  acpid                         1:2.0.32-1                     amd64        Advanced Configuration and Power Interface event daemon
debian@test-shutdown:~$ uname -a
Linux test-shutdown 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux
debian@test-shutdown:~$
The config for the VM is:
Code:
#Debian 11  built on 2022-02-13T16%3A07%3A50Z
agent: 0
boot: order=virtio0;ide2;net0;ide1
cipassword: «redacted»
ciuser: debian
cores: 1
cpu: kvm64
ide0: local-zfs:vm-120-cloudinit,media=cdrom,size=4M
ide1: none,media=cdrom
ide2: none,media=cdrom
ipconfig0: ip=dhcp
kvm: 1
memory: 1024
meta: creation-qemu=6.1.1,ctime=1644768472
name: test-shutdown
net0: virtio=«redacted»,bridge=vmbr0,firewall=0
numa: 0
onboot: 0
ostype: l26
scsihw: virtio-scsi-single
serial0: socket
smbios1: uuid=«redacted»
sockets: 1
sshkeys: «redacted»
vga: type=serial0
virtio0: local-zfs:vm-120-disk-0,iothread=1,size=3G
vmgenid: «redacted»
In my case after removing cloud-guest agent and installing acpid I mad e shutdown and start for the VM
 
Last edited:
I found the solution.

If, for different reasons, your Guest cannot run qemu-guest-agent but you want to have graceful shutdowns you should:
  1. Be sure that acpid is installed on your VM.
  2. Be sure that the Use QEMU Guest Agent option is disabled in Proxmox.
If Use QEMU Guest Agent is checked/enabled in Proxmox and only acpid is installed, the graceful shutdown will not work.

So basically it's:
  • Use QEMU Guest Agent (Host) + acpid + qemu-guest-agent
OR
  • Disable QEMU Guest Agent (Host) + acpid
 
I found the solution.

So basically it's:
  • Use QEMU Guest Agent (Host) + acpid + qemu-guest-agent
OR
  • Disable QEMU Guest Agent (Host) + acpid
When you activate QEMU Guest Agent the power off action is being taken via the guest agent procedure(s). Take note of agent: 0 option de config I shared here.

So, in case you do not have QEMU Guest agent on the VM you should disable the option.

Don forget to mark this thread as solved!

Regards,
 

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!