Oracle Database Appliance (ODA) (MOSC)

MOSC Banner

how does shell scripting get the ODA VM to stop

edited Nov 5, 2014 10:02AM in Oracle Database Appliance (ODA) (MOSC) 1 commentAnswered

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"

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center