PVE Shuts down after boot up

Robkd4

Member
Jan 7, 2021
21
2
8
45
Hi all,

is there any way to stop PVE to shut down after boot up? Its immediately shutting down after login screen comes up.

I have a Script to creacefully shutdown all VM´s and Container for Shutting down after PowerOutage triggert from USV. Looks like i dont have tested enough because all my tests are working fine, looks like when no VM´s CT´s are running PVE is shuttung down also.

Code:
#!/bin/bash

# Script for shutting down all VMs and containers on Proxmox

echo "Starting shutdown process for all VMs and Containers..."

# Shutdown all virtual machines (VMs)
for vmid in $(qm list | awk '{if ($1 > 100) print $1}'); do
    echo "Shutting down VM $vmid..."
    qm shutdown $vmid --force
done

# Shutdown all containers (LXC)
for ctid in $(pct list | awk '{if ($1 > 100) print $1}'); do
    echo "Shutting down container $ctid..."
    pct shutdown $ctid
done

echo "Shutdown process completed."

# Optional: Shut down the host system after all VMs and containers are off
# Uncomment the next line if you want the host to shut down automatically
# shutdown -h now

Also NUT client is installed on this host.

Looks like i have to reinstall PVE on this host.

Cheers
 

Attachments

  • PVEsnipp.JPG
    PVEsnipp.JPG
    82.4 KB · Views: 10

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!