Hello,
I'm looking for a script to shutdown all VM and my node when VM 120 and 600 are not running (shutdowned).
Up to date, I'm using a script to shutdown the node, when no vm are active:
#!/bin/bash
qm list | grep running
if [ $? -eq 0 ]
then
shutdown -h now
fi
I guess the "if" commande have to be modified, but I don't know how to write it. Could someone help me ?
Thanks for helping
hervé
I'm looking for a script to shutdown all VM and my node when VM 120 and 600 are not running (shutdowned).
Up to date, I'm using a script to shutdown the node, when no vm are active:
#!/bin/bash
qm list | grep running
if [ $? -eq 0 ]
then
shutdown -h now
fi
I guess the "if" commande have to be modified, but I don't know how to write it. Could someone help me ?
Thanks for helping
hervé