Go to main content

手册页第 7 部分:标准、环境、宏、字符集和杂项

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

solaris(7)

名称

solaris - Solaris 标记区域

描述

solaris 标记使用标记区域框架(如 brands(7) 中所述)运行与安装在全局区域中的同一软件一起安装的区域。使用 solaris 标记时,系统软件必须始终与全局区域保持同步。区域中的系统软件包使用映像包管理系统进行管理。

Configuration and Administration

solaris 标记支持完全根非全局区域模型。所有必需的系统软件及任何其他软件包都安装在区域的专用文件系统中。区域只能位于其自己的 zfs(8) 数据集中并且仅支持 ZFS。在安装或连接区域时,将自动创建 ZFS 数据集。如果无法创建 ZFS 数据集,区域也无法安装或连接。

solaris 标记不支持以下 zonecfg(8) 资源和属性:

autoshutdown=suspend
anet:id
device:id
net:id
virtual-cpu
anet:mac
ib-vhca
ib-vhca:port
capped-memory:pagesize
capped-memory:pagesize-policy

solaris 标记支持的属性具有如下所列的特定缺省值:

Resource    Property                   Default Value
global      zonepath                   /system/zones/%{zonename}
            autoboot                   false
            global-time                false
            ip-type                    exclusive
            auto-shutdown              shutdown
net         configure-allowed-address  true
anet        mac-address                auto
            lower-link                 auto
            link-protection            mac-nospoof

The following zonecfg(8) resources and properties are supported by the live zone reconfiguration for solaris brand:

anet (with exceptions stated below)
capped-memory
dedicated-cpu
device
fs
net (with exceptions stated below)
pool
scheduling-class
zone.* rctls
dataset

The following zonecfg(8) resources and properties are not supported by the live zone reconfiguration for solaris brand:

anet:allowed-address
anet:configure-allowed-address
anet:defrouter
anet:evs
anet:vport
file-mac-profile
fs-allowed
hostid
limitpriv
global-time
net:allowed-address
net:configure-allowed-address
net:defrouter
npiv
rootzpool
tenant
zpool

如果在持久配置中更改了列出的不支持的资源和属性并将更改应用于正在运行的区域,实时区域重新配置将忽略这些更改。

如果尝试在实时配置中修改列出的不支持的资源和属性,这些修改都将被拒绝。

For the list of solaris brand-specific subcommand options, see zoneadm(8).

Cold Migration

solaris branded zones can be cold migrated to compatible hosts by using the zoneadm migrate command, as described in the zoneadm(8) man page.

For cold migration to work, the same services and packages must be configured as for the solaris-kz(7) brand cold migration.

Only zones on shared storage may be migrated.Supported storage URI types for migration are iscsi and lu.

Auxiliary State

The following auxiliary state (as shown by zoneadm list -is) is defined for this brand:

no-config

区域对系统已知,但是缺少配置。区域状态始终为不完整。

示例

示例 1 从全局区域转换为 solaris 区域

以下示例显示了如何创建全局区域的归档文件,然后使用该归档文件来配置和安装非全局区域。安装进程将转换全局区域的映像,以便其可作为非全局区域运行。此过程通常称为 P2V(physical to virtual,物理到虚拟)。

To ensure that the data in the archive does not become stale, applications running in the source zone should be stopped or the zone itself should be shut down before the archive is created.If neither of these is done, it may become necessary to synchronize application data after the zone is installed.

首先,创建源系统的恢复归档文件。这假定源系统上未安装非全局区域。

web-1# archiveadm create --recovery /net/images/web-1.uar

Next, configure the zone on the target system using the configuration stored in the archive.It may be necessary to further customize it.请参见 zonecfg(8) 中的示例。

t4-1# zonecfg -z web-1
Use 'create' to begin configuring a new zone.
zonecfg:web-1> create -a /net/images/web-1.uar
zonecfg:web-1> set zonepath=/zones/web-1
zonecfg:web-1> exit

如果选择不使用交互模式,可以使用以下命令:

t4-1# zonecfg -z web-1 "create -a /net/images/web-1.uar; \
    set zonepath=/zones/web-1"

最后,从归档文件安装区域。

t4-1# zoneadm -z web-1 install -a /net/images/web-1.uar

如果源系统和新安装的区域使用了相同的 IP 地址或者存在其他潜在的冲突,请确保同一时间只运行二者之一。

示例 2 使用统一归档文件迁移区域

To ensure that the data in the archive does not become stale, it is suggested that applications on the source zone are stopped or the zone is shut down before creating the archive.如果没有这样做,则安装区域后可能有必要同步应用程序数据。

首先,创建区域的恢复归档文件。此操作最好从全局区域执行。如果在区域中执行,将无法通过归档文件配置该区域。

t4-1# archiveadm create -r -z web-1 /net/images/v2v/web-1.uar

接下来,使用归档文件在目标系统上配置区域。

t4-2# zonecfg -z web-1 create -a /net/images/v2v/web-1.uar

最后,从归档文件安装区域。

t4-2# zoneadm -z web-1 install -a /net/images/v2v/web-1.uar

请确保先关闭源系统上的区域,再在目标系统上引导它。

属性

有关以下属性的说明,请参见 attributes(7)

属性类型
属性值
可用性
system/zones/brand/brand-solaris
接口稳定性
Uncommitted(未确定)

另请参见

archiveadm(8), brands(7), zfs(8), zoneadm(8), zonecfg(8), zones(7)