Linux VM not possible to power off

Mrt12

Well-Known Member
May 19, 2019
144
11
58
44
CH
Good day,

I have a problem with this VM that originates from a very old Linux machine that I have cloned to Proxmox already a couple years ago.
Personally I would prefer to get rid of it, but unfortunately, a couple colleagues are still depending on it but this VM is a nightmare, it contains one single 6TB mysql database that takes almost one day to backup and, unfortunately, in the past, before I was caring for this (physical) machine, nobody ever did an apt-update on this Ubuntu system, so therefore it is so old now that it has become impossible to update etc.

I believe I will need to run this monster for another couple years before I can get rid of it, but it f*cks up my Proxmox server quite a bit. For example when I want to reboot Proxmox or reboot the VM for maintenance purposes, it shuts down properly until the point is reached where it says "System halted.". And then, it stays in this status forever. Also when I click in Proxmox on "Reboot" or "Shutdown", I have the running "shutdown" or "reboot" task in the task list, that never completes, because the VM hangs in this "System halted." state. So I wonder is there any possibility to fix this, such that this VM can be orderly rebooted or shut down? how can I fix the hang in the "system halted" ? when I click "VM Stop" or "Reset" this works of course properly. But I don't want to do this manually each time.

1700727703029.png
 
Hi,
it seems that your guest system misinterprets the acpi shutdown signal as a halt, which instructs the system to stop all cpu activity, but to not shut down. What guest system is currently running? Is SysVinit or systemd used as a init system?
 
Hi Mrt12,
it contains one single 6TB mysql database that takes almost one day to backup
I expect this database not only takes long to backup, but also ages to shut down (depending on usage and storage speed).

Seeing you do have backups, would it be an option to decouple this database from the rest of the system, and import it into another container that you can upgrade? Or is this database exactly the reason your colleagues can't let go of the installation yet?

nobody ever did an apt-update on this Ubuntu system

Pre-empting your reply about the init system, I guess that would be Upstart, which was used in Ubuntu until a couple of years ago?
 
Hi all,
the operating System used is Ubuntu 12.04.2.
A couple years ago I managed to install qemu-guest-agent on it, so actually the machine should power off when the Shutdown command is sent, as Proxmox seems to have a proper connection to the qemu guest agent.

The shutdown of the database is not so critical, as there are only writes to that database once per day, but it is read quite frequently.

Further, I can observe that the machine also hangs in the "system halted" state when I use the "shutdown now" command via SSH, so it seems to be a problem with the VM itself?
 
the machine also hangs in the "system halted" state when I use the "shutdown now" command
I habitually type shutdown -hP now, but now that I check on a current Debian installation, I see that --poweroff is the default. I don't type extra letters because they come for free, I recall there being a different default previously that necessitated the -hP options.

What is the default behaviour of shutdown on your version of Ubuntu?
 
Okay, I got ubuntu 12.04 running on a recent version of pve. shutdown -hP now does what it should and shuts down the machine. The only way to reproduce the behavior you are seeing was by running halt.

Could you check what the content of /etc/default/halt is? In my test system it's set to poweroff

Edit: Setting it to halt seems to reproduce the exact behavior that you are seeing
 
Last edited:
Okay, I got ubuntu 12.04 running on a recent version of pve. shutdown -hP now does what it should and shuts down the machine. The only way to reproduce the behavior you are seeing was by running halt.

Could you check what the content of /etc/default/halt is? In my test system it's set to poweroff

Edit: Setting it to halt seems to reproduce the exact behavior that you are seeing

I have mine like so:

1700750331426.png

so looks good to me i would say?

but also with `shutdown -hP now` it does not switch off after "system halted". This is why I don't understand what the problem is :-/
 
Last edited:

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!