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 [-u] [-b patchid]... [-F] [-n path]
For native zones, zoneadm checks package and patch levels on the machine to which the zone is to be attached. If the packages/patches that the zone depends on from the global zone are different (have different revision numbers) from the dependent packages/patches on the source machine, zoneadm reports these conflicts and does not perform the attach. If the destination system has only newer dependent packages/patches (higher revision numbers) than those on the source system, you can use the -u option to update the attached zone to match the higher-revision packages and patches that exist on the new system. With -u, as in the default behavior, zoneadm does not perform an attach if outdated packages/patches are found on the target system.
For native zones, one or more -b options can be used to specify a patch ID for a patch installed in the zone. These patches will be backed out before the zone is attached or, if -u was also specified, updated.
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 being attached must first be configured using the zonecfg (see zonecfg(1M)) command. This does not apply when running "attach -n".
Use the following command to attach a zone:
# zoneadm -z my-zone attach
Use the following command to attach and update a zone:
# zoneadm -z my-zone attach -u
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(5) displays during boot. Service options determine the services which are used to boot the system. See kernel(1M) 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
Use:
zlogin zone shutdown
to cleanly shutdown the zone by running the shutdown scripts.
help [subcommand]
install [-x nodataset] [brand-specific options]
-x nodataset
Branded zones may include additional options that govern how the brand's software will be installed in the zone. See brands(5) 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 or -c options are given, all running zones are listed.
The following list_options are supported:
-c
-i
-p
zoneid:zonename:state:zonepath:uuid:brand:ip-type
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. 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
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(5) for descriptions of the following attributes:
|
read(1), svcs(1), zlogin(1), zonename(1), init(1M), kernel(1M), svcadm(1M), svc.startd(1M), svc.startd(1M), zonecfg(1M), libuuid(3LIB), attributes(5), brands(5), smf(5), zones(5)
The zones(5) service is managed by the service management facility, smf(5), 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(1M). The service's status can be queried using the svcs(1) command.
The act of installing a new non-global zone is a fresh installation of the Solaris operating system. A new installation of Solaris must not require interaction with the user (that is, it must be "hands off"). Because of this, packages installed in the global zone and all non-global zones cannot contain request scripts (see pkgask(1M)). If a package did have a request script, then the creation of a non-global zone could not be done without user intervention. Any package that contains a request script is added to the global zone only. See pkgadd(1M).
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |