Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Friday, February 2, 2018

sysadm (8)


sysadm - maintain host


sysadm maintain -s [ -m "message" ]

sysadm maintain -l [-p] [-o field1,...]

sysadm maintain -e

sysadm evacuate [-arnvq]

sysadm evacuate -l [-p] [-o field1,...]


The sysadm utility is used to control maintenance mode for a system and perform evacuation of zones hosted on the system.

Only users and roles that belong to the "Maintenance and Repair" RBAC profile can use the sysadm command.

Starting a maintenance mode will log an audit record and prevent the subsequent attach, boot, or incoming migration of any zones into the system. This can be used to perform administration on a zones host and remove it from service.

Maintenance state is held across host reboots and changes between different boot environments.

To bring zones back into service, maintenance must be ended with the –e option.

Optionally, the host may be evacuated by migrating all solaris-kz and solaris brand zones away from the system. A non-interactive RAD URI of the destination zones host must be given in the evacuation/target property of the zone instance. A default destination host may also be specified on the zone service svc:/system/zones/zone.

Sub Commands

The following subcommands are supported:

sysadm maintain –s [ –m "message" ]

Starts maintenance. An optional free-form message string may be given.

Starting maintenance clears any existing evacuation state.

sysadm maintain –l [–p] [–o field1,...]

Lists maintenance state if any.

–o field[,...], –-output=field[,...]

A case-insensitive, comma-separated list of output fields to display. The field name must be one of the fields listed below, or the special value all to display all fields.


The type of maintenance. Currently, always the value admin.


The user who sets the maintenance mode.


The date when the maintenance mode is set.


Any message associated with the maintenance mode.


Displays using a stable machine-parseable format. The –o option is required with the –p option.

sysadm maintain –e

Ends maintenance mode.

sysadm evacuate –l [–p] [–o field1,...]

Lists any evacuation state. After a partial evacuation, this may show zones evacuated to destination systems, as well as zones that failed to evacuate, along with the reason for the failure.

–o field[,...], –-output=field[,...]

A case-insensitive, comma-separated list of output fields to display. The field name must be one of the fields listed below, or the special value all to display all fields.


Name of the zone.


The state of evacuation for the zone. If EVACUATED, then the zone is evacuated to the location specified by the DEST value. If SKIPPED, then the evacuation is not attempted, and the zone may still be running. If FAILED, then the evacuation failed, and the ERROR field will give more information.


The destination RAD URI that the zone is evacuated to, or the last attempted destination if FAILED.


If the state is either SKIPPED or FAILED, then this gives the relevant error status.


Displays using a stable machine-parseable format. The –o option is required with the –p option.

sysadm evacuate [–arnvq]

Evacuates the host system. Or, with the –r option, returns zones to the host.

For each running zone, evacuation live migrates the zone to the destination configured in its SMF service instance.

If an individual zone is of a brand that does not support live migration, then evacuation is skipped and the state for that zone will be SKIPPED.

If the –a option is specified, then non-running zones are also evacuated by using cold migration.

If an individual zone fails to evacuate, then the state for that zone will be FAILED, and the ERROR value will be filled in with more information.


Evacuates both non-running zones as well as running zones.


Reports evacuation progress verbosely.


Only reports errors.


Dry-run evacuation. Migration is planned, and a dry-run migration to the destination host is performed for each zone.


Returns zones. Each evacuated zone is migrated from its destination, if it is still running there, back to the source host. If the –a option is specified, it is cold migrated back if not running.

Evacuation may be run several times, in case some zones fail to evacuate on the first run. The return status is successful only if the evacuation as a whole is complete. This means that there should be no zones running on the relevant hosts after executing the sysadm command.


Example 1 Starting Maintenance
# sysadm maintain -s -m "doing a pkg update"
# sysadm maintain -l
TYPE  USER       DATE             MESSAGE
admin root       2016-01-25 06:01 doing a pkg update
Example 2 Evacuating a System to a Single Default Destination
# svccfg -s svc:/system/zones/zone        
svc:/system/zones/zone> setprop evacuation/target = astring: "ssh://desthost/"
svc:/system/zones/zone> exit

# sysadm evacuate -nv
sysadm: preparing 2 zone(s) for evacuation ...
       sysadm: initializing migration of kzone1 to desthost ...
       sysadm: initializing migration of kzone2 to desthost ...
sysadm: kzone1: planned evacuation to ssh://desthost/
sysadm: kzone2: planned evacuation to ssh://desthost/
sysadm: dry-run succeeded

# sysadm evacuate    
sysadm: preparing zones for evacuation ... 2/2
sysadm: evacuating zones ... 2/2
sysadm: evacuation completed successfully.
# sysadm evacuate -l -o all
ZONENAME         STATE     DEST                                     ERROR
kzone1          EVACUATED ssh://desthost/                            -
kzone2          EVACUATED ssh://desthost/                            -
Example 3 Clearing Maintenance State and Returning an Evacuation
# sysadm maintain -e
# sysadm evacuate -r
sysadm: preparing zones for return ... 2/2
sysadm: returning zones ... 2/2
sysadm: return completed successfully.

# sysadm evacuate -l
sysadm: no active evacuation

# zoneadm list -civ
  ID NAME             STATUS      PATH                         BRAND      IP    
   0 global           running     /                            solaris    shared
   3 kzone2           running     -                            solaris-kz excl  
   4 kzone1           running     -                            solaris-kz excl  

Exit Status

The following exit values are returned:


Successful completion.

For evacuation, this exit value means that no zones are still running on the source system. For evacuation return, this exit value means that all zones have been migrated back to the source system.


An error occurred.


See attributes(7) for descriptions of the following attributes:

Interface Stability

See Also

zones(7), zones_solaris-kz(7), zones_solaris(7), rad(8), beadm(8), svc.zones(8)