Listing 6. Zone Administration # By default a zone will *not* auto boot when the system boots g-zone# zonecfg -z red-zone set autoboot=true # Reboot/stop a zone gracefully g-zone# zlogin -C -e '#' red-zone # Login, then use a normal Linux command (examples) r-zone# reboot r-zone# shutdown -r now r-zone# telinit 6 r-zone# telinit 0 (once halted boot it from global zone) # Bring down a zone hard (stop all execution now!) g-zone# zoneadm -z red-zone halt # Same as halt and boot (hard stop then boot) g-zone# zoneadm -z red-zone reboot # Uninstall the OS from a zone (still defined) g-zone# zoneadm -z red-zone halt g-zone# zoneadm -z red-zone uninstall [ -F ] # Clone an installed zone's OS into another defined zone # (when the source is on ZFS the clone takes seconds to # install the new zone, otherwise may take many minutes!) g-zone# zonecfg -z red-eye create -t red-zone g-zone# zonecfg -z red-eye set zonepath=/zpool01/zones/red-eye g-zone# zonecfg -z red-eye zonecfg:red-eye> select net address=192.168.1.10 zonecfg:red-eye:net> set address=192.168.1.11 zonecfg:red-eye:net> end zonecfg:red-eye> exit g-zone# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - red-zone installed /zpool01/zones/red-zone lx shared - red-eye configured /zpool01/zones/red-eye lx shared g-zone# zoneadm -z red-eye clone red-zone Cloning zonepath /zpool01/zones/red-zone... g-zone# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - red-zone installed /zpool01/zones/red-zone lx shared - red-eye installed /zpool01/zones/red-eye lx shared # Remove a zone (No undo) g-zone# zoneadm -z red-eye halt g-zone# zoneadm -z red-eye uninstall -F g-zone# zonecfg -z red-eye delete -F