This commit is contained in:
lseys 2020-12-09 09:56:39 +01:00
commit e4360d0a8f
2 changed files with 20 additions and 0 deletions

20
oenvm-resume.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#init variable
VMSTAT=poff
# boucle pour poff uniquement.
# on affiche l'id et le statut, on controle si le statut =poff
# si oui on fait un resume sur l'id de la vm concerné
for l in $(onevm list -l ID,STAT --csv | sed -e "/ID/d");
do
echo $l
echo ${l%%,$VMSTAT}
onevm show ${l%%,$VMSTAT}
if [[ "$l" =~ "$VMSTAT" ]];
then
onevm resume ${l%%,$VMSTAT}
fi
done
exit 0

0
readme.md Normal file
View File