@ wrote... (1 month, 1 week ago)

Here's a crappy little script that automates the steps in Fix proxmox containers that won't start

#!/bin/bash

containers=`pct list | grep stopped | awk '{print $1 " "}'`

echo "restarting containers: $containers"

for m in $containers; do
    lxc-start -n $m &
    echo "force started $m"
done

echo "sleeping for 2 minutes while containers start"
sleep 120

for m in $containers; do
    echo "shutting down $m"
    pct shutdown $m;
    echo "starting $m"
    pct start $m &
done
Category: tech, Tags: lxc, proxmox
Comments: 0
Click here to add a comment