how does shell scripting get the ODA VM to stop
We have the following shell scripting and when oakcli stop vm * is executed, then VM goes into Stopping state. But when background job finishes the VM goes back into the ONLINE state. How do I execute the commands to make sure VM of OFFLINE
second_wait=120
#
vmnames='inb1 inb3 ssb1 ssb3 djob desm'
#
for vmservername in $( echo $vmnames )
do
case $vmservername in
inb1) vmrepo=inb1repo;;
inb3) vmrepo=inb3repo;;
ssb1) vmrepo=ssb1repo;;
ssb3) vmrepo=ssb3repo;;
djob) vmrepo=jobrepo;;
desm) vmrepo=esmrepo;;
esac
#
vmsts=$( oakcli show vm |grep -i $vmservername |grep ONLINE )
stsvm=$( echo $? )
if [ "$stsvm" = "0" ]
then
echo "Stopping $vmservername"