Shutdown a VM that has no QEMU agent

jchasan

New Member
Dec 5, 2024
4
1
1
Hey all, new to proxmox, and i do like it. in the process of moving VM's off of vmware and testing each.
one OS i have is Xinuos OpenServer. though they had vmware tools, they do not have QEMU.

Everything runs fine under proxmox, but I cannot shutdown (or pause/hibernate/stop/reboot) from the proxmox menus (or command line via 'qm'.

Is there any way to bypass qemu for a particular VM and customize my own shutdown/reboot/stop commands particular to the OS in question (OpenServer)?

Something like executing as root os commands like 'shutdown -g0 -y', 'shutdown -g0 -y -i6', or 'haltsys'?

I tried downloading the qemu source, but compiling it was too difficult due to multiple missing pieces.
 
I'm sure i could cobble together an ssh script to login & do what I need, but how could I trigger it anyway except manually from shell prompt?
 
I'm sure i could cobble together an ssh script to login & do what I need, but how could I trigger it anyway except manually from shell prompt?
Maybe use a hookscript and do it in the pre-stop phase? Your hookscipt does not need to be written in Perl, a Bash script also works.

If the QEMU Guest Agent is not enabled in the VM Options then an ACPI shutdown event is send to the VM. Can't the OS inside the VM act on that?
 
Last edited:
qemu is disabled in options already, yes, and ACPI support is set to Yes, ACPI is enabled also in the guest OS. Guess will have to dig deeper....
 
Correct, there is currently no Qemu guest agent for SCO/Xinuos Openserver 6 (I've asked for this when their recent "KVM Platform License" and updated installer came out 3rd quarter of 2024.)

The only way I would expect to do this is how a colleague setup a "monitoring VM" to shutdown other VM's when their battery backup indicated a power loss.... and it would perform a "rcmd" to the desired Openserver VM's to run a "shutdown -g0 -y" command... The "control VM" would need to be either SSH-Key'd or .rhosts setup to be able to run remote commands using "rcmd"... But, this worked. The "monitoring VM" monitored the battery backup signaling... and when it indicated a loss of house current power, it would execute a shutdown of the configured systems (VM's) well before the battery died completely... and in their case... also perform a VMWare shutdown of the host system(s) as well.

This monitoring VM could be any type of system.... linux usually... and the script could be written in any scripting language. In your case, you could login to the monitoring VM and signal a shutdown of the configured VM's.... or setup a secure web-login on that system to do it through a web browser... although, security would be a concern).

(Note: I also was hoping that I could learn "Ansible" to do this... but, I'm told that Openserver doesn't have Ansible support. But, that's another option... some of the basics in Ansible doesn't necessarily need support from the guest O/S)
 
The scripting method used by that colleague is neither portable nor easy to automate

I would like to verify somehow if the SCO/Xinuos guest VM is receiving and/or ignoring ACPI requests from the Proxmox host. Can't find it in any logs. Fixing that would be the easiest path until a QEMU agent is made available (if that ever happens).
 
  • Like
Reactions: Kingneutron

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!