How to run so script when the HOST is going to shutdown?

why-be-banned

New Member
Apr 4, 2023
28
3
3
Hello,

How to execute some bash script when the HOST is going to shutdown, click the shutdown button on the WEB UI, or enter "shutdown" on ssh console.

I want to hibernate all VMs instead of shutdown VMs.
 
Last edited:
you'd need to write a custom systemd unit and put it in the appropriate place in the shutdown sequence.
 
  • 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!