qm shutdown vs qm stopall

Hello,

I'm using Proxmox for 6 months now, with a very good experience so far, hosting 6 Linux (Ubuntu Server and CentOS 5.5) and 1 Windows Server 2008 guests (KVM only).

I've a (small) issue with qm stopall and a Windows Server 2008 guest.

When I use qm stopall, all guests but the W2008 one stop as expected. It seems the W2008 guest doesn't receive the ACPI signal. On Proxmox host shutdown, this W2008 guest is then abruptly stopped. Stopping or restarting host from the Web UI gives the same result (it's consistent, I suppose it's using qm stopall on shutdown).

Using qm shutdown <vid of W2008> makes the guest receiving the ACPI signal and shutdown as expected. I created a small shell script that stops all guest using qm shutdown as a workaround. I stop my host using this script instead of using shutdown directly. So it's really not a big deal.

But I'm curious and I want to understand ;) Is it something wrong in my config ? A known issue ? A feature ?

Thank you in advance for any advise.

Here is my current Proxmox environment :

# pveversion -v
pve-manager: 1.7-10 (pve-manager/1.7/5323)
running kernel: 2.6.35-1-pve
proxmox-ve-2.6.35: 1.7-8
pve-kernel-2.6.32-3-pve: 2.6.32-18
pve-kernel-2.6.35-1-pve: 2.6.35-8
pve-kernel-2.6.18-2-pve: 2.6.18-5
qemu-server: 1.1-27
pve-firmware: 1.0-9
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-10
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.13.0-3
ksm-control-daemon: 1.0-4
 
stopall works here (maybe you need to give more time than the default 30 seconds before the system sends the stop). can you test with a new plain win2008 installation?
 
Thank you for your comment :)

Don't focus on the "qm stopall 30", I use this in my shutdown script after "qm shutdown"ing all the VMs and the maximum sleep of 5 mn, after what I may use qm stopall 0 if I want (already slept for 5 mn, I don't have to wait more to "hard" reboot the remaining guests). This is used as workaround, it works, period.

If I use traditional "qm stopall", the default 3 mn delay is used, and my Windows 2008 doesn't receive the ACPI event. The default delay of 3 mn is sufficient because when I "qm shutdown" the Windows 2008 guest, it stops in less than 30 s.

The trouble is the guest receives ACPI event with "qm shutdown", but not with "qm stopall".

I could install a fresh Windows 2008 server to make some tests on it, but I still have to understand why "qm shutdown" works and not "qm stopall" on the existing Windows 2008 guest...

Here is my script to understand what I do :

Code:
WAIT=5	# waiting 5 mn max before hard stopping remaining guests

VMLIST=$(qm list | grep running | tr -s " " "#" | cut -d\# -f2)
for i in $VMLIST; do
	qm shutdown $i
done

while [ $WAIT -gt 0 ]; do
	VMLIST=$(qm list | grep running | tr -s " " "#" | cut -d\# -f2)
	[ x"$VMLIST" = "x" ] && break
	WAIT=$((WAIT-1))
	sleep 60
done
[ $WAIT -eq 0 ] && qm stopall 30
shutdown -h now

I use it successfully to stop the Proxmox server at night (Bios restarts the server when needed). No more complaint from Windows about unattended shutdown this way.
 
Last edited:
I've just finished testing a fresh install of Windows 2008 Server. dm stopall works for it :confused:

I still don't have explanation why the older one doesn't react to qm stopall, but does react from qm shutdown...

It makes sense to believe something is wrong in the older guest, but what ? Maybe I mistakenly assume stopall and shutdown send the same ACPI event ?
 
Last edited:
any windows policy preventing anonymous shutdown?
 
maybe you were logged in during one test? make sure that you are logged out and test again.
 
I did a lot of tests these past few days, and everything is ok now.

qm stopall or qm shutdown, logged in guest or not, guest screen locked or not, are working like a charm. It wasn't the case when I opened the thread. I did nothing but installing a new Windows 2008 Server guest since.

Strange.
 

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!