script
This commit is contained in:
commit
e4360d0a8f
20
oenvm-resume.sh
Normal file
20
oenvm-resume.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user