ZONEADM(8) | Maintenance Commands and Procedures | ZONEADM(8) |
zoneadm - administer zones
zoneadm -z zonename [-u uuid-match] subcommand
[subcommand_options]
zoneadm [-R root] [-z zonename] [-u uuid-match] list
[list_options]
zoneadm [-R root] -z zonename [-u uuid-match] mark incomplete
The zoneadm utility is used to administer system zones. A zone is an application container that is maintained by the operating system runtime.
Once a process has been placed in a zone other than zone 0, the process or any of its children cannot change zones.
The following options are supported:
-R root
-u uuid-match
-z zonename
Subcommands which can result in destructive actions or loss of work have a -F flag to force the action. If input is from a terminal device, the user is prompted if such a command is given without the -F flag; otherwise, if such a command is given without the -F 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.
The following subcommands are supported:
attach [-F] [-n path] [brand-specific options]
The -F 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 -n option can be used to run the attach subcommand, without executing the command. It uses the output of the "detach -n" 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 "-", to read the input from standard input.
The zone's brand may include additional options that govern how the zone will be attached. See brands(7) for specific brand information.
The zone being attached must first be configured using the zonecfg (see zonecfg(8)) command. This does not apply when running "attach -n".
Use the following command to attach a zone:
# zoneadm -z my-zone attach
boot [-- boot_options]
The following boot_options are supported:
-i altinit
-m smf_options
Message options determine the type and amount of messages that smf(7) displays during boot. Service options determine the services which are used to boot the system. See kernel(8) for a listing of the -m suboptions.
-s
clone [-m copy] [-s zfs_snapshot] source_zone
-m copy
-s zfs_snapshot
The source zone must be halted before this subcommand can be used.
detach [-n]
Use the following command to detach a zone:
# zoneadm -z my-zone detach
The source zone must be halted before this subcommand can be used.
halt
help [subcommand]
install [-x nodataset] [brand-specific options]
-x nodataset
The zone's brand may include additional options that govern how the software will be installed in the zone. See brands(7) for specific brand information.
list [list_options]
By default, all running zones are listed. If you use this subcommand with the zoneadm -z zonename option, it lists only the specified zone, regardless of its state. In this case, the -i and -c options are disallowed.
If neither the -i, -c, or -n options are given, all running zones are listed.
The following list_options are supported:
-c
-i
-n
-p
zoneid:zonename:state:zonepath:uuid:brand:ip-type:debugid
If the zonepath contains embedded colons, they can be escaped by a backslash (""), which is parsable by using the shell read(1) function with the environmental variable IFS. The uuid value is assigned by libuuid(3LIB) when the zone is installed, and is useful for identifying the same zone when present (or renamed) on alternate boot environments. The debugid value is a constant numeric identifier which is attached to the zone and can be used by tools such as DTrace to track zones across reboots (since zoneid will change). Any software that parses the output of the "zoneadm list -p" command must be able to handle any fields that may be added in the future.
The -v and -p options are mutually exclusive. If neither -v nor -p is used, just the zone name is listed.
-v
The -v and -p options are mutually exclusive. If neither -v nor -p is used, just the zone name is listed.
mark incomplete
move new_zonepath
ready
reboot [-- boot_options]]
shutdown [-r [-- boot_options]]
uninstall [-F]
verify
zonepath
If zonepath does not exist, the verify does not fail, but merely warns that a subsequent install will attempt to create it with proper permissions. A verify subsequent to that might fail should anything go wrong.
zonepath cannot be a symbolic link.
fs
It is an error for the directory to be a relative path.
It is an error for the path specified by raw to be a relative path or if there is no fsck binary for a given filesystem type at /usr/lib/fs/<fstype>/fsck. It is also an error if a corresponding fsck binary exists but a raw path is not specified.
net
The physical interface name is the network interface name.
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.
rctl
Example 1 Using the -m Option
The following command illustrates the use of the -m option.
# zoneadm boot -- -m verbose
Example 2 Using the -i Option
The following command illustrates the use of the -i option.
# zoneadm boot -- -i /sbin/init
Example 3 Using the -s Option
The following command illustrates the use of the -s option.
# zoneadm boot -- -s
The following exit values are returned:
0
1
2
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
read(1), svcs(1), zlogin(1), zonename(1), libuuid(3LIB), attributes(7), brands(7), native(7), smf(7), zones(7), init(8), kernel(8), svc.startd(8), svcadm(8), zonecfg(8)
The zones(7) service is managed by the service management facility, smf(7), under the service identifier:
svc:/system/zones:default
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(8). The service's status can be queried using the svcs(1) command.
February 21, 2023 | OmniOS |