How to use zlogin to Shutdown and Start a zone

  1. Become an administrator.
  2. (optionally) List the zones running on the global zone.
    # zoneadm list -v
    You will see a display that is similar to the following:
    ID  NAME    STATUS      PATH          BRAND    IP
     0  global  running     /             solaris  shared
     1  zone1   running     /zones/zone1  native  excl
     2  zone2   running     /zones/zone2  native  shared
     -  zone3   configured  /zones/zone3  native  shared
     -  zone4   installed   /zones/zone4  native  shared
  3. Use the zoneadm command with the -z option, the name of the zone, for example zone1, and the appropriate subcommand to action on the given zone.
    zoneadm -z <zone> <subcommand>
    For example:
    # zoneadm -z zone1 reboot
        verify     install     ready      boot
        reboot     uninstall   halt       list


In each of the examples below we are using zone1 as our configured zone.

  • To login to a zone from the global zone:
    global# zlogin zone1
  • To cleanly shutdown a zone:
    global# zlogin zone1 shutdown -y -g0 -i 0
  • To reboot a zone:
    global# zoneadm -z zone1 reboot
  • To halt a zone:
    global# zoneadm -z zone1 halt
  • To boot a zone:
    global# zoneadm -z zone1 boot
  • To boot a zone in single-user mode:
    global# zoneadm -z zone1 boot -s
  • To check if a zone is configured to autoboot:
    global# zoneadm -z zone1 info