Because zones do not nest, the P2V process makes any existing zones inside the converted system image unusable in the destination zone. Unified archives bypass this limitation by using the archiveadm create -r -z command. For more information, see Recovery Archives in Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.3.
This section provides the following information:
About Converting an Oracle Solaris System (Global Zone) Into a solaris Brand Non-Global Zone
How to Create an Archive of the System Image on a Network Device
How to Configure and Install a Migrated Zone on the Target System
An existing Oracle Solaris 11 system can be directly migrated into a solaris brand zone on an Oracle Solaris 11 system. Use the Unified Archive archiveadm command on systems running Oracle Solaris 11.2 or higher. Use legacy archives on systems running the Oracle Solaris 11 or Oracle Solaris 11.1 releases.
For all systems, use the zonep2vchk command on the source system to prepare for converting and archiving the system image. Use the zonecfg and zoneadm commands to configure and to install the archive in the destination zone on the target system.
The following restrictions apply to migrating a global zone to a non-global zone:
The global zone on the target system must be running an Oracle Solaris 11 release that is equal to or higher than the source system.
To ensure that the zone runs properly, the target system must have the same or a later version of required operating system packages. Other packages, such as packages for third-party products, can be different.
For more information, see the zonep2vchk(1M), archiveadm(1M), zfs(1M), zonecfg(1M), and zoneadm(1M), and solaris(5) man pages.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
source# zonep2vchk -b
This inspects ELF binaries for system and library calls that might affect operation inside a zone.
source# zonep2vchk -s /opt/myapp/bin,/opt/myapp/lib
source# zonep2vchk -r 2h
source# zonep2vchk -c > /net/somehost/p2v/s11-zone.config
This configuration will contain resource limits and network configuration based on the physical resources and networking configuration of the source host.
Archive the file systems in the global zone. Verify that no non-global zones are installed on the source system. The examples in this section use the archiveadm command for creating archives.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
In this procedure, the recovery archive of the global zone is named /net/somehost/p2v/s11-zone-config.uar.
source$ archiveadm create -r -z global /net/somehost/p2v/s11-zone-config.uar
See Also
The Unified Archive generated with archiveadm contains a zone configuration that serves as a starting point for the converted zone. Additional configuration may be needed to configure the zone in a way that is optimal for the target system. For more information, see How to Create a Recovery Archive in Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.3 and the archiveadm(1M) man page.
The template zonecfg script generated by the zonep2vchk tool defines aspects of the source system's configuration that must be supported by the destination zone configuration. Additional target system dependent information must be manually provided to fully define the zone.
In this procedure, the zone is named s11-zone and the configuration file is named /net/somehost/p2v/s11-zone-config.uar.
You must also be assigned the Network Management rights profile. The root role has all of these rights.
For more information, see Assigning Limited Rights to Zone Administrators.
target$ zonecfg -z s11-zone Use 'create' to begin configuring a new zone. zonecfg:s11-zone> create -a /net/somehost/p2v/s11-zone-config.uar zonecfg:s11-zone> info
zonecfg:s11-zone> set zonepath=/system/zones/%{zonename} zonecfg:s11-zone> add rootzpool zonecfg:s11-zone:rootzpool> add storage iscsi://zfssa/luname.naa.600144F0DBF8AF19000052E820D60003 zonecfg:zonename:rootzpool> end
Best practice is to use ZOSS for a storage resource when configuring zones that were deployed using Unified Archives. See Getting Started With Oracle Solaris Zones on Shared Storage.
target$ dladm show-link target$ dladm show-phys target$ ipadm show-addr
By default, the zonecfg script defines an exclusive-IP network configuration with an anet resource for every physical network interface that was configured on the source system. The target system automatically creates a VNIC for each anet resource when the zone boots.
The use of VNICs make it possible for multiple zones to share the same physical network interface. The lower-link name of an anet resource is initially set to change-me by the zonecfg command. You must manually set this field to the name of one of the data links on the target system. Any link that is valid for the lower link of a VNIC can be specified.
zonecfg:s11-zone> commit zonecfg:s11-zone> exit target#
Install the zone using the Unified Archive file created on the source system. This example does not alter the original system configuration during the installation.
target$ zoneadm -z s11-zone install -a s11-zone-config.uar