'\" te .\" Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. .TH zoneadm 1M "18 May 2016" "SunOS 5.11" "System Administration Commands" .SH NAME zoneadm \- administer zones .SH SYNOPSIS .LP .nf \fBzoneadm\fR \fB-z\fR \fIzonename\fR [\fB-u\fR \fIuuid-match\fR] \fIsubcommand\fR [\fIsubcommand_options\fR] .fi .LP .nf \fBzoneadm\fR [\fB-R\fR \fIroot\fR] [\fB-z\fR \fIzonename\fR] [\fB-u\fR \fIuuid-match\fR] list [\fIlist_options\fR] .fi .LP .nf \fBzoneadm\fR [\fB-R\fR \fIroot\fR] \fB-z\fR \fIzonename\fR [\fB-u\fR \fIuuid-match\fR] mark incomplete .fi .SH DESCRIPTION .sp .LP The \fBzoneadm\fR utility is used to administer system zones. A zone is an application container that is maintained by the operating system runtime. .SH SECURITY .sp .LP Once a process has been placed in a zone other than zone \fB0\fR, the process or any of its children cannot change zones. .SH SECURITY .sp .LP Except for simple listing and help functions, only a user operating in the global system zone can use \fBzoneadm\fR, and it must be executed with an effective user ID of root. In addition, the user must be authorized to execute specific subcommands. .sp .LP \fBzoneadm\fR checks for authorization strings that optionally include the specified \fIzonename\fR as a suffix, preceded by the slash character. When omitted, the authorization matches any zone. .sp .LP Subcommands that only provide information, for example, \fBhelp\fR or \fBlist\fR, do not require any authorizations. All other subcommands require the authorization \fBsolaris.zone.manage/\fR\fIzonename\fR. .sp .LP Once a process has been placed in a zone other than zone 0, neither that process nor any of its children can change zones. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-R\fR \fIroot\fR\fR .ad .sp .6 .RS 4n Specify an alternate root (boot environment). This option can only be used in conjunction with the "\fBlist\fR" and "\fBmark\fR" subcommands. .RE .sp .ne 2 .mk .na \fB\fB-u\fR \fIuuid-match\fR\fR .ad .sp .6 .RS 4n Unique identifier for a zone, as assigned by \fBlibuuid\fR(3LIB). If this option is present and the argument is a non-empty string, then the zone matching the \fBUUID\fR is selected instead of the one named by the \fB-z\fR option, if such a zone is present. .RE .sp .ne 2 .mk .na \fB\fB-z\fR \fIzonename\fR\fR .ad .sp .6 .RS 4n String identifier for a zone. .RE .SH SUBCOMMANDS .sp .LP Subcommands which can result in destructive actions or loss of work have a \fB-F\fR flag to force the action. If input is from a terminal device, the user is prompted if such a command is given without the \fB-F\fR flag; otherwise, if such a command is given without the \fB-F\fR flag, the action is disallowed, with a diagnostic message written to standard error. If a zone installation or uninstallation is interrupted, the zone is left in the incomplete state. Use uninstall to reset such a zone back to the configured state. .sp .LP The following subcommands are supported: .sp .ne 2 .mk .na \fB\fBattach\fR [\fB-u\fR] [\fB-F\fR] [\fB-x\fR \fIextended_options\fR] [\fB-n\fR \fIpath\fR] [\fIbrand-specific options\fR]\fR .ad .sp .6 .RS 4n The \fBattach\fR subcommand takes a zone that has been detached from one system and attaches the zone onto a new system. Therefore, it is advised (though not required) that the \fBdetach\fR subcommand should be run before the "attach" takes place. Once you have the new zone in the configured state, use the \fBattach\fR subcommand to set up the zone root instead of installing the zone as a new zone. .sp The \fBattach\fR subcommand is also used to transition a zone from the \fBunavailable\fR state to the \fBinstalled\fR state. If the \fBattach\fR subcommand is unable to perform such a transition, the zone will remain in the unavailable state. .sp The \fB-F\fR option can be used to force the zone into the "installed" state with no validation. This option should be used with care since it can leave the zone in an unsupportable state if it was moved from a source system to a target system that is unable to properly host the zone. The \fB-n\fR option can be used to perform a "dry run" of the \fBattach\fR subcommand. It uses the output of the "\fBdetach\fR \fB-n\fR" subcommand as input and is useful to identify any conflicting issues, such as the network device being incompatible, and can also determine whether the host is capable of supporting the zone. The path can be "\fB-\fR", to read the input from standard input. .sp The zone's brand may include additional options that govern how the zone will be attached. See \fBbrands\fR(5) for specific brand information. .sp The zone being attached must first be configured using the \fBzonecfg\fR (see \fBzonecfg\fR(1M)) command. This does not apply when running "\fBattach\fR \fB-n\fR". .sp Use the following command to attach a zone: .sp .in +2 .nf # \fBzoneadm -z my-zone attach\fR .fi .in -2 .sp Use the following command to attach and update a zone: .sp .in +2 .nf # \fBzoneadm -z my-zone attach -u\fR .fi .in -2 .sp In the absence of \fB-n\fR (as above), the source zone must be halted before this subcommand can be used. .sp .ne 2 .mk .na \fB\fB-n\fR \fIpath\fR\fR .ad .sp .6 .RS 4n Read the zone manifest and verify that the target machine has the correct configuration to host the zone without actually performing an attach. The zone on the target system does not have to be configured on the new host before doing a trial-run attach. .RE .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .sp .6 .RS 4n Update the attached zone. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-import\fR\fR .ad .sp .6 .RS 4n Specify this option to forcibly reuse existing \fBzpool\fR resources that may appear to be in in-use. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-create\fR\fR .ad .br .na \fB\fB-x\fR \fBforce-zpool-create-all\fR\fR .ad .sp .6 .RS 4n Specify \fB-x\fR with \fBforce-zpool-create-all\fR to forcibly create all \fBzpool\fR resources. .sp Use \fB-x\fR with \fBforce-zpool-create\fR, with the syntax: .sp .in +2 .nf -x force-zpool-create=\fIzpoolname\fR{,\fIzpoolname\fR,\fIzpoolname\fR,...} .fi .in -2 .sp \&...to limit this option to a specific set of \fBzpool\fR resources. To name a \fBrootzpool\fR \fBzpool\fR resource, use \fBrpool\fR. For a \fBzpool\fR resource, use the name specified in the corresponding zone config \fBname\fR property. .sp These options are only available for archive-based attach usage. See \fBbrands\fR(5) for the information which brands support archive-based attach. .RE .RE .sp .ne 2 .mk .na \fB\fBboot\fR [\fB-R\fR][\fB-w\fR|\fB-W\fR] [\fB-x\fR \fIextended_options\fR] [\fB--\fR \fIboot_options\fR]\fR .ad .sp .6 .RS 4n Boot (or activate) the specified zones. .sp The \fBboot\fR subcommand has the following mutually exclusive options: .sp .ne 2 .mk .na \fB\fB-R\fR\fR .ad .sp .6 .RS 4n If the zone has been suspended, this option will force a new boot rather than a resume of the suspended zone state. This should be used carefully, as a suspended zone may contain intermediate file system state and so on, that could cause issues if abandoned. .RE .sp .ne 2 .mk .na \fB\fB-w\fR\fR .ad .sp .6 .RS 4n Boots the zone with a writable root, effectively overriding the \fBfile-mac-profile\fR setting in the zone's configuration. This option is in effect for this boot-cycle only: a subsequent reboot will boot the zone with a \fBfile-mac-profile\fR in effect again. .RE .sp .ne 2 .mk .na \fB\fB-W\fR\fR .ad .sp .6 .RS 4n Boots the zone in transient r/w mode; when the zone completes self-assembly, the zone will reboot in read-only mode. Has no effect non-read only root zones. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .sp .6 .RS 4n Specify this option to create storage, if needed. .RE The following \fIboot_options\fR are supported: .sp .ne 2 .mk .na \fB\fB-m\fR \fIsmf_options\fR\fR .ad .sp .6 .RS 4n The \fIsmf_options\fR include two categories of options to control booting behavior of the service management facility: recovery options and messages options. .sp Message options determine the type and amount of messages that \fBsmf\fR(5) displays during boot. Service options determine the services which are used to boot the system. See \fBkernel\fR(1M) for a listing of the \fB-m\fR suboptions. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .sp .6 .RS 4n Boots only to milestone \fBsvc:/milestone/single-user:default\fR. This milestone is equivalent to init level \fBs\fR. See \fBsvc.startd\fR(1M) and \fBinit\fR(1M). .RE .RE .sp .ne 2 .mk .na \fB\fBclone\fR [\fB-m\fR \fIcopy\fR] [\fB-s\fR \fIzfs_snapshot\fR] [-x \fIextended_options\fR] [\fIbrand-specific options\fR] \fIsource_zone\fR\fR .ad .sp .6 .RS 4n Install a zone by copying an existing installed zone. This subcommand is an alternative way to install the zone. .sp .ne 2 .mk .na \fB\fB-m\fR \fIcopy\fR\fR .ad .sp .6 .RS 4n Force the clone to be a copy, even if a "\fBZFS\fR clone" is possible. .sp Note, this is the default (and only supported) clone method for zones that have a \fBrootzpool\fR resource configured. .RE .sp .ne 2 .mk .na \fB\fB-s\fR \fIzfs_snapshot\fR\fR .ad .sp .6 .RS 4n Specify the name of a \fBZFS\fR snapshot to use as the source of the clone. The \fIsnapshot\fR must be a \fIsnapshot\fR of the source zone taken from a previous "\fBzoneadm\fR clone" installation. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-import\fR\fR .ad .sp .6 .RS 4n Specify the \fB-x\fR option with \fBforce-zpool-import\fR to forcibly reuse existing \fBzpool\fR resources that may appear to be in use. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-create\fR\fR .ad .br .na \fB\fB-x\fR \fBforce-zpool-create-all\fR\fR .ad .sp .6 .RS 4n Specify the \fB-x\fR option with \fBforce-zpool-create-all\fR to forcibly create all \fBzpool\fR resources. .sp Use \fB-x\fR with \fBforce-zpool-create\fR, with the syntax: .sp .in +2 .nf -x force-zpool-create=\fIzpoolname\fR{,\fIzpoolname\fR,\fIzpoolname\fR,...} .fi .in -2 .sp \&...to limit this option to a specific set of \fBzpool\fR resources. To name a \fBrootzpool\fR \fBzpool\fR resource, use \fBrpool\fR. For a \fBzpool\fR resource, use the name specified in the corresponding zone config \fBname\fR property. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .sp .6 .RS 4n Specify this option to create storage, if needed. .RE The source zone must be halted before this subcommand can be used. .sp For force creation of the root zpool of a kernel zone use \fB-x force-zpool-create=\fR command, where \fIroot_pool_name\fR is the name of the root zpool in the source zone. Kernel zones do not support \fB-x force-zpool-create-all\fR. .RE .sp .ne 2 .mk .na \fB\fBdetach\fR [\fB-F\fR | \fB-n\fR]\fR .ad .sp .6 .RS 4n Detach the specified zone. Detaching a zone is the first step in moving a zone from one system to another. The full procedure to migrate a zone is that the zone is detached, the \fIzonepath\fR directory is moved to the new host, and then the zone is attached on the new host. Once the zone is detached, it is left in the configured state. If you try to install or clone to a configured zone that has been detached, you will receive an error message and the \fBinstall\fR or \fBclone\fR subcommand will not be allowed to proceed. The \fB-n\fR option can be used to perform a "dry run" of the \fBdetach\fR subcommand. This generates the information needed for running the "\fBattach\fR \fB-n\fR" subcommand, which is useful to identify any conflicting issues, such as the network device being incompatible or if the host is capable of supporting the zone. The information is sent to standard output and can be saved to a file or piped to the "\fBattach\fR \fB-n\fR" subcommand. The \fB-F\fR option can be used to forcefully detach the zone without performing verification checks on the existing \fIzonepath\fR. .sp Use the following command to detach a zone: .sp .in +2 .nf # \fBzoneadm -z my-zone detach\fR .fi .in -2 .sp Unless the \fB-n\fR option is used, the source zone must be halted before this subcommand can be used. .sp .ne 2 .mk .na \fB\fB-F\fR\fR .ad .sp .6 .RS 4n Forcefully detach the zone without performing verification checks on the zone's storage. This option is typically used if the storage for the \fIzonepath\fR is no longer accessible to this host. Such a scenario is normally encountered when the zone's storage has been failed over to an alternate host, either manually or as part of a cluster. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .sp .6 .RS 4n Generate a zone manifest on a running zone without actually detaching the zone. The state of the zone on the originating system is not changed. The zone manifest is sent to \fBstdout\fR. The global administrator can direct this output to a file or pipe it to a remote command to be immediately validated on the target host. .RE .RE .sp .ne 2 .mk .na \fB\fBget-prom\fR [\fIvariable\fR]\fR .ad .sp .6 .RS 4n The \fBget-prom\fR subcommand displays OpenBoot configuration variables. If no variable is specified, all configuration variables and their values are displayed in \fBvariable=value\fR form. If a variable is specified, only the value of that variable is displayed. .sp The \fBget-prom\fR subcommand is only supported by the \fBsolaris-kz\fR(5) brand on SPARC. .RE .sp .ne 2 .mk .na \fB\fBset-prom\fR \fIvariable\fR=[\fIvalue\fR]\fR .ad .br .na \fB\fBset-prom\fR \fB-c\fR \fIvariable\fR\fR .ad .sp .6 .RS 4n In the first form, the \fBset-prom\fR subcommand sets the specified OpenBoot configuration variable to the specified value. If value is not specified (that is, it is a zero-length string) the \fIvariable\fR is set to a zero-length string. In the second form, the \fB-c\fR option indicates that the \fIvariable\fR should be cleared, allowing OpenBoot's default value to take effect. .sp The \fBset-prom\fR subcommand is only supported by the \fBsolaris-kz\fR(5) brand on SPARC. It may only be used when the zone is in the installed state. .RE .sp .ne 2 .mk .na \fB\fBhalt\fR\fR .ad .sp .6 .RS 4n Halt the specified zones. \fBhalt\fR bypasses running the shutdown scripts inside the zone. It also removes run time resources of the zone. .sp See also the \fBshutdown\fR subcommand, below. .RE .sp .ne 2 .mk .na \fB\fBhelp\fR [\fIsubcommand\fR]\fR .ad .sp .6 .RS 4n Display general help. If you specify \fIsubcommand\fR, displays help on \fIsubcommand\fR. .RE .sp .ne 2 .mk .na \fB\fBinstall\fR [\fB-x\fR \fIextended_options\fR] [\fIbrand-specific options\fR]\fR .ad .sp .6 .RS 4n Install the specified zone on the system. This subcommand automatically attempts to verify first. It refuses to install if the verify step fails. See the \fBverify\fR subcommand. .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-import\fR\fR .ad .sp .6 .RS 4n Specify the \fB-x\fR option with \fBforce-zpool-import\fR to forcibly reuse existing \fBzpool\fR resources that may appear to be in use. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-create\fR\fR .ad .br .na \fB\fB-x\fR \fBforce-zpool-create-all\fR\fR .ad .sp .6 .RS 4n Specify the \fB-x\fR option with \fBforce-zpool-create-all\fR to forcibly create all \fBzpool\fR resources. .sp Use \fB-x\fR with \fBforce-zpool-create\fR, with the syntax: .sp .in +2 .nf -x force-zpool-create=\fIzpoolname\fR{,\fIzpoolname\fR,\fIzpoolname\fR,...} .fi .in -2 .sp \&...to limit this option to a specific set of \fBzpool\fR resources. To name a \fBrootzpool\fR \fBzpool\fR resource, use \fBrpool\fR. For a \fBzpool\fR resource, use the name specified in the corresponding zone config \fBname\fR property. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .sp .6 .RS 4n Specify this option to create storage, if needed. .RE The zone's brand may include additional options that govern how the software will be installed in the zone. See \fBbrands\fR(5) for specific brand information. .sp For force creation of the root zpool of a kernel zone use \fB-x force-zpool-create=\fR command, where \fIroot_pool_name\fR is the name of the root zpool specified in the AI manifest, or "rpool" if no AI manifest is provided. Kernel zones do not support \fB-x force-zpool-create-all\fR. .RE .sp .ne 2 .mk .na \fB\fBlist\fR [\fIlist_options\fR]\fR .ad .sp .6 .RS 4n Display the name of the current zones, or the specified zone if indicated. .sp By default, all running zones are listed. If you use this subcommand with the \fBzoneadm\fR \fB-z\fR \fIzonename\fR option, it lists only the specified zone, regardless of its state. In this case, the \fB-i\fR and \fB-c\fR options are disallowed. .sp If neither the \fB-i\fR or \fB-c\fR options are given, all running zones are listed. .sp The following \fIlist_options\fR are supported: .sp .ne 2 .mk .na \fB\fB-c\fR\fR .ad .sp .6 .RS 4n Display all configured zones. This option overides the \fB-i\fR option. .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .sp .6 .RS 4n Expand the display to all installed zones. .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .sp .6 .RS 4n Request machine parsable output. The output format is a list of lines, one per zone, with colon-delimited fields. These fields are: .sp .in +2 .nf zoneid:zonename:state:zonepath:uuid:brand:ip-type:\e r/w:file-mac-profile .fi .in -2 .sp If the \fIzonepath\fR contains embedded colons, they can be escaped by a backslash ("\e:"), which is parsable by using the shell \fBread\fR(1) function with the environmental variable \fBIFS\fR. The \fIuuid\fR value is assigned by \fBlibuuid\fR(3LIB) when the zone is installed, and is useful for identifying the same zone when present (or renamed) on alternate boot environments. Any software that parses the output of the "\fBzoneadm list -p\fR" command must be able to handle any fields that may be added in the future. .sp The \fB-v\fR and \fB-p\fR options are mutually exclusive. If neither \fB-v\fR nor \fB-p\fR is used, just the zone name is listed. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .sp .6 .RS 4n Display verbose information, including zone name, id, current state, root directory, brand type, ip-type, and options. .sp The \fB-v\fR and \fB-p\fR options are mutually exclusive. If neither \fB-v\fR nor \fB-p\fR is used, just the zone name is listed. .RE .RE .sp .ne 2 .mk .na \fB\fBapply\fR [\fB-n\fR] [\fB-q\fR] [\fB-x\fR \fIextended_options\fR]\fR .ad .sp .6 .RS 4n The \fBapply\fR subcommand reconfigures a running zone to match persistent configuration of a zone maintained through \fBzonecfg\fR(1M) and prints out performed actions. Applied configuration takes effect immediately and does not require reboot of the zone. The \fBapply\fR command is available only for running zones. See respective brand man page for details on resources supported by the live zone reconfiguration. .sp The following options are supported: .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 29n .rt Runs the reconfiguration in a dry run mode that does not change the configuration of a running zone. The dry run mode acts the same way as the real reconfiguration, but leaves the running zone intact. Use the dry run mode to review actions that would be performed by the real reconfiguration. .RE .sp .ne 2 .mk .na \fB\fB-q\fR\fR .ad .RS 29n .rt Quiet mode. Suppresses all messages and returns a status code only. .RE .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .RS 29n .rt Specify this option to create storage, if needed. .sp In case of the global zone, no options are allowed. The \fBapply\fR subcommand reconfigures resource controls, pools, and sets the \fBfile-mac-profile\fR. If the global zone is configured as an immutable global zone, it immediately makes the zone immutable. .RE .RE .sp .ne 2 .mk .na \fB\fBmark\fR \fIstate\fR\fR .ad .sp .6 .RS 4n Change the state of a zone. Only a subset of the zone states are supported, as described below. .sp .ne 2 .mk .na \fB\fBincomplete\fR\fR .ad .sp .6 .RS 4n Change the state of an installed zone to \fBincomplete\fR. This command can be useful in cases where administrative changes on the system have rendered a zone permanently unusable or inconsistent. This change cannot be undone, except by uninstalling the zone. .RE .sp .ne 2 .mk .na \fB\fBunavailable\fR\fR .ad .sp .6 .RS 4n Change the state of an installed zone to \fBunavailable\fR. This command can be useful in cases where administrative changes or failures on the system have rendered a zone temporarily unusable. This change can be undone with the attach subcommand. .RE .RE .sp .ne 2 .mk .na \fB\fBmigrate\fR [\fB-nq\fR] [\fB-c\fR \fIcipher\fR] [\fBssh:\fR//|\fBrads:\fR//|\fBrad:\fR//][\fIuser@]host\fR[:\fIport\fR]\fR .ad .sp .6 .RS 4n Live-migrate the zone to the given destination host. The zone will continue running on the source host until the final stage of migration. After a migration, any zlogin sessions will be terminated. However, network connections to the zone are maintained. .sp The zone configuration must be compatible with the destination host's environment, as if you were detaching then attaching the zone. For example, any storage references should use a storage URI (see \fBzonecfg\fR(1M)) that is accessible by both hosts. .sp The zone can be configured on the destination host prior to migration; in this case, that configuration is used to start the zone on the destination host. If the configuration is incompatible with the current zone configuration (for example, a virtual disk is missing), an error will be returned. .sp If the zone is not configured on the destination, live migration will configure it based on the current zone configuration. .sp After migration, the zone will be detached from the source zone, but left in a configured state. .sp The destination host is defined by the given RAD URI (see \fBrad\fR(1M)). The scheme defaults to 'rads', 'user' defaults to the current user, and 'port' defaults to the standard RAD port. .sp To receive migrating zones, the RAD service mentioned must be running. In addition, the '\fBkz-migr\fR' service under inetd must be enabled. With the default configuration, therefore, ports 8102 and 12302 must be accessible. .sp \fBzoneadm migrate\fR takes the following options: .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 13n .rt Do a dry-run: checks if the zone could be live migrated to the destination host, but leave it running. .RE .sp .ne 2 .mk .na \fB\fB-q\fR\fR .ad .RS 13n .rt Quiet: does not report status during migration. .RE .sp .ne 2 .mk .na \fB\fB-c\fR \fBcipher\fR\fR .ad .RS 13n .rt Use the specified cipher to encrypt memory transfer. The value "none" disables encryption. The value "list" may be used to list supported ciphers. If not specified, a cipher will be automatically chosen based on the source and destination capabilities. .RE .RE .sp .ne 2 .mk .na \fB\fBmove\fR \fInew_zonepath\fR\fR .ad .sp .6 .RS 4n Move the \fIzonepath\fR to \fInew_zonepath\fR. The zone must be halted before this subcommand can be used. The \fInew_zonepath\fR must be a local file system and normal restrictions for \fIzonepath\fR apply. .sp Note, for zones configured with a \fBrootzpool\fR resource only the \fIzonepath\fR will be renamed but the zone itself will not move out of its containing \fBzpool\fR. .RE .sp .ne 2 .mk .na \fB\fBready\fR [\fB-x\fR \fIextended_options\fR]\fR .ad .sp .6 .RS 4n Prepares a zone for running applications but does not start any user processes in the zone. .sp The following option is supported: .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .RS 29n .rt Specify this option to create storage, if needed. .RE .RE .sp .ne 2 .mk .na \fB\fBreboot\fR [\fB-x\fR \fIextended_options\fR] [\fB--\fR \fIboot_options\fR]\fR .ad .sp .6 .RS 4n Restart the zone. This is equivalent to a \fBhalt\fR \fB boot\fR sequence (shutdown scripts are not run). .sp The following option is supported: .sp .ne 2 .mk .na \fB\fB-x\fR \fIstorage-create-missing\fR\fR .ad .RS 29n .rt Specify this option to create storage, if needed. .RE See the \fBboot\fR subcommand for supported boot options. .RE .sp .ne 2 .mk .na \fB\fBrename\fR \fInew_zonename\fR\fR .ad .sp .6 .RS 4n Rename the zone. This subcommand may be used for configured and installed zones. The installed zone must be halted before this subcommand can be used. Use the following command to rename a zone: .sp .in +2 .nf # \fBzoneadm -z my-zone rename new-zone\fR .fi .in -2 .sp The \fBrename\fR support for zone configurations using templates with the \fB%{zonename}\fR token is limited to the \fBzonename\fR property and zpool resource name property. The \fBrename\fR subcommand is not supported for the solaris-kz brand. .LP Note - .sp .RS 2 Any console for an installed zone is detached by the \fBrename\fR subcommand. .RE .RE .sp .ne 2 .mk .na \fB\fBshutdown\fR [\fB-k\fR] [\fB-r\fR [\fB-\(em\fR \fIboot_options\fR]]\fR .ad .sp .6 .RS 4n Cleanly shut down the zone (equivalent to running \fB/usr/sbin/init 0\fR in the zone). The \fBshutdown\fR subcommand waits until the zone is successfully shut down; a \fBzoneadm\fR \fBhalt\fR can be used to forcibly halt the zone, if the shutdown process takes a long time. .sp If \fB-r\fR is specified, reboot the zone. See the \fBboot\fR subcommand for supported boot options. .RE .sp .ne 2 .mk .na \fB\fBsavecore\fR [\fB-L\fR] [\fB-f\fR \fIdumpfile\fR]\fR .ad .sp .6 .RS 4n Save a core dump of a running \fBsolaris-kz\fR brand to the global zone (by default, \fBkzcore.X\fR in the current directory). This core dump file can be debugged through \fBmdb\fR(1). .sp If \fB-L\fR is specified, the zone is not paused during the dump operation. .sp If \fB-k\fR is specified then the core dump is placed in the location configured by \fBcoreadm\fR(1M) for kernel zone core dumps. .RE .sp .ne 2 .mk .na \fB\fBsuspend\fR\fR .ad .sp .6 .RS 4n Suspend a running \fBsolaris-kz\fR brand zone to disk. The zone is suspended to an image file contained within the zone path. The zone can be resumed through \fBzoneadm boot\fR. .RE .sp .ne 2 .mk .na \fB\fBuninstall [\fR\fB-F\fR] [\fB-x\fR \fIextended_options\fR]\fR .ad .sp .6 .RS 4n Uninstall the specified zone from the system. Use this subcommand with caution. It removes all of the files under the \fIzonepath\fR of the zone in question. You can use the \fB-F\fR flag to force the action. .sp .ne 2 .mk .na \fB\fB-x\fR \fBforce-zpool-destroy\fR\fR .ad .br .na \fB\fB-x\fR \fBforce-zpool-destroy-all\fR\fR .ad .sp .6 .RS 4n The \fB-x\fR option with \fBforce-zpool-destroy-all\fR option can be used to destroy all zpools. .sp Use \fB-x\fR with \fBforce-zpool-destroy\fR, with the syntax: .sp .in +2 .nf -x force-zpool-destroy=\fIzpoolname\fR{,\fIzpoolname\fR,\fIzpoolname\fR,...} .fi .in -2 .sp \&...to limit this option to a specific set of \fBzpool\fR resources. To name a \fBrootzpool\fR \fBzpool\fR resource, use \fBrpool\fR. For a \fBzpool\fR resource, use the name specified in the corresponding zone config \fBname\fR property. .RE .RE .sp .ne 2 .mk .na \fB\fBverify\fR\fR .ad .sp .6 .RS 4n Check to make sure the configuration of the specified zone can safely be installed on the machine. Following is a breakdown of the checks by \fBresource/property\fR type: .sp .ne 2 .mk .na \fB\fIzonepath\fR\fR .ad .sp .6 .RS 4n \fIzonepath\fR and its parent directory exist and are owned by root with appropriate modes . The appropriate modes are that \fIzonepath\fR is \fB700\fR, its parent is not \fBgroup\fR or \fBworld-writable\fR and so forth. \fIzonepath\fR is not over an NFS mount. A sub-directory of the \fIzonepath\fR named "root" does not exist. .sp If \fIzonepath\fR does not exist, the \fBverify\fR does not fail, but merely warns that a subsequent install will attempt to create it with proper permissions. A \fBverify\fR subsequent to that might fail should anything go wrong. .sp \fIzonepath\fR cannot be a symbolic link. .RE .sp .ne 2 .mk .na \fB\fBfs\fR\fR .ad .sp .6 .RS 4n Any \fBfs\fR resources have their \fItype\fR value checked. An error is reported if the value is one of \fBproc\fR, \fBmntfs\fR, \fBautofs\fR, or \fBnfs\fR or the filesystem does not have an associated mount binary at \fB/usr/lib/fs/\fI\fR/mount\fR. .sp It is an error for the \fIdirectory\fR to be a relative path. .sp It is an error for the path specified by \fBraw\fR to be a relative path or if there is no \fBfsck\fR binary for a given filesystem type at \fB/usr/lib/fs/\fI\fR/fsck\fR. It is also an error if a corresponding \fBfsck\fR binary exists but a \fBraw\fR path is not specified. .RE .sp .ne 2 .mk .na \fB\fBnet\fR\fR .ad .sp .6 .RS 4n All physical network interfaces exist. All network address resources are one of: .RS +4 .TP .ie t \(bu .el o a valid IPv4 address, optionally followed by "\fB/\fR" and a prefix length; .RE .RS +4 .TP .ie t \(bu .el o a valid IPv6 address, which must be followed by "\fB/\fR" and a prefix length; .RE .RS +4 .TP .ie t \(bu .el o a host name which resolves to an IPv4 address. .RE Note that hostnames that resolve to IPv6 addresses are not supported. .sp The physical interface name is the network interface name. .sp A zone can be configured to be either exclusive-IP or shared-IP. For a shared-IP zone, both the physical and address properties must be set. For an exclusive-IP zone, the physical property must be set and the address property cannot be set. .RE .sp .ne 2 .mk .na \fB\fBanet\fR\fR .ad .sp .6 .RS 4n It verifies that the lower-link, over which the VNIC will be automatically created, exists. .RE .sp .ne 2 .mk .na \fB\fBrctl\fR\fR .ad .sp .6 .RS 4n It also verifies that any defined resource control values are valid on the current machine. This means that the privilege level is \fBprivileged\fR, the limit is lower than the currently defined system value, and that the defined action agrees with the actions that are valid for the given resource control. .RE .sp .ne 2 .mk .na \fB\fBrootzpool\fR, \fBzpool\fR\fR .ad .sp .6 .RS 4n All \fBzpool\fRs configured are online on the system for a zone in the \fBinstalled\fR state. .sp For a zone in configured state, it verifies that none of the configured \fBzpool\fR resources are already online on the system. .RE .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing the \fB-m\fR Option .sp .LP The following command illustrates the use of the \fB-m\fR option. .sp .in +2 .nf # \fBzoneadm -z myzone boot -- -m verbose\fR .fi .in -2 .sp .LP \fBExample 2 \fRUsing the \fB-s\fR Option .sp .LP The following command illustrates the use of the \fB-s\fR option. .sp .in +2 .nf # \fBzoneadm -z myzone boot -- -s\fR .fi .in -2 .sp .LP \fBExample 3 \fRModifying an OpenBoot Configuration Variable .sp .LP The following commands illustrate setting, getting, and clearing an OpenBoot configuration variable. .sp .in +2 .nf # \fBzoneadm -z zone1 get-prom\fR # \fBzoneadm -z zone1 set-prom\fR auto-boot?=false # \fBzoneadm -z zone1 get-prom\fR auto-boot?=false # \fBzoneadm -z zone1 set-prom -c auto-boot?\fR # \fBzoneadm -z zone1 get-prom auto-boot?\fR auto-boot?: not set .fi .in -2 .sp .sp .LP The output of the last command, is printed to \fBstderr\fR, and the exit value from \fBzoneadm\fR is \fBnon-zero\fR. .LP \fBExample 4 \fRLive Migrating to a New Host .sp .LP The following command illustrates how to migrate to a new host. .sp .in +2 .nf # \fBzoneadm -z myzone migrate ssh://destinationhost\fR zoneadm: zone 'myzone': Using zone configuration on destination. zoneadm: zone 'myzone': Attaching zone. zoneadm: zone 'myzone': Booting zone in 'migrating-in' mode. zoneadm: zone 'myzone': Checking migration compatibility. zoneadm: zone 'myzone': Starting migration. zoneadm: zone 'myzone': Waiting for migration to complete. zoneadm: zone 'myzone': Migration successful. zoneadm: zone 'myzone': Halting and detaching zone. .fi .in -2 .sp .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .sp .6 .RS 4n Successful completion. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .sp .6 .RS 4n An error occurred. .RE .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .sp .6 .RS 4n Invalid usage. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/zones _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBread\fR(1), \fBsvcs\fR(1), \fBzlogin\fR(1), \fBzonename\fR(1), \fBinit\fR(1M), \fBkernel\fR(1M), \fBsvcadm\fR(1M), \fBzpool\fR(1M), \fBsvc.startd\fR(1M), \fBsvc.startd\fR(1M), \fBzonecfg\fR(1M), \fBlibuuid\fR(3LIB), \fBattributes\fR(5), \fBbrands\fR(5), \fBmwac\fR(5), \fBsmf\fR(5), \fBzones\fR(5), \fBzfs\fR(7FS), \fBsuri\fR(5), \fBsolaris-kz\fR(5), \fBrad\fR(1M) .sp .LP OpenBoot 4.x Command Reference Manual .SH NOTES .sp .LP The \fBzones\fR(5) service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/system/zones:default .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). The service's status can be queried using the \fBsvcs\fR(1) command. .sp .LP For the first boot after a read-only zone is installed or upgraded, or when the zone is booted with \fB-w\fR/\fB-W\fR, the write-only protection is disabled. Care must be taken that the zone is otherwise protected.