Unless otherwise noted, articles © 2005-2008 Doug Spencer, SecurityBulletins.com. Linking to articles is welcomed. Articles on this site are general information and are NOT GUARANTEED to work for your specific needs. I offer paid professional consulting services and will be happy to develop custom solutions for your specific needs. View the consulting page for more information.


Deleting a Solaris 10 Zone

From SecurityBulletins.com

Jump to: navigation, search

I developed the following script to delete a Solaris 10 zone. Note that in the spirit of other UNIX utilities, this script assumes you know what you're doing and just does the delete. Save it as "zonedel" or something. Run it as "zonedel ZONE_NAME" where ZONE_NAME is the zone you want to shutdown and delete.

#!/bin/bash

zoneadm -z $1 halt
zoneadm -z $1 uninstall -F
printf "delete -F\nexit\n" | zonecfg -z $1

This script is available for download at zonedelete.gz

Personal tools