Shutting down Zones for Solaris

(imported topic written by rpedregon)

Hello,

Our solaris server admin group would like us to shutdown any zones (virtual systems) running on a Solaris system prior to deploying patches. I’ve created a task that runs the following command to shut down the zones:

wait shutdown -g 0 -I 5 -y

The action script completes however the zones are not shutdown. I realize that completion of action script only indicates that the actionscript was successful in running and not that the command actually worked.

Has anyone dealt with this in the Solaris environment?

thank you,

Raul

(imported comment written by cglimson)

Hi Raul,

Try this, please:

wait bash -c “shutdown -g 0 -I 5 -y”

Regards.

(imported comment written by rpedregon)

Hi Cglimson,

I’m sorry I never responded, This project got put on the backburner and we just picked it back up. Thank you very much for your response. I tried what you suggested, but I get an exit code of 1. Any other suggestions?

thank you,

Raul

(imported comment written by cglimson)

Hi Raul,

You may want to have a look at this:
http://docs.oracle.com/cd/E23824_01/html/821-1460/z.inst.task-23.html.

Hope this helps.

Regards,

Malaine

(imported comment written by rpedregon)

hi Malaine,

thank you for the great link. I switch my command to work with the one that oracle suggested and I was successful.

wait zoneadm -z halt

thank you for hanging in there with me to get a result!

Raul