Preparation for Migrating Kernel Zones to Systems With Different CPUs or OS Versions
iKernel zones can be migrated to other host systems that have different CPUs but are the same platform. For example, you can migrate a kernel zone from a SPARC T4 server to a SPARC T7 server, or from an Intel Nehalem-based server to a server based on a Haswell processor. This is called cross-CPU migration. You cannot migrate a zone from a SPARC-based environment to an x86-based environment.
If you want to migrate a kernel zone to a target system whose processor is different from the source system, you must prepare the kernel zone and reboot it before you suspend the zone for warm migration or live migrate.
On SPARC-based and Intel-based systems, you can use the cpu-arch
resource type to specify a migration class that defines a common set of processor features
to enable the zone to run well on the source and target system.
The cpu-arch resource type is not available for AMD systems.
On SPARC-based systems only, you can additionally set a compatibility level with the
host-compatible resource type to ensure that Oracle Solaris features that are
enabled by specific processors are supported at the same level in the global zones of the
source and target host. If host-compatible is not set, only Oracle Solaris 11.2
features are visible to the zone. Oracle Solaris 11.2 is the earliest version of Oracle Solaris that can run
in a kernel zone, but does not support features such as SSM and DAX.
Note:
Thecpu-arch and
host-compatible values in the zone configuration must be supported by
the Oracle Solaris release that is running on both source and target hosts in order for live
migration to succeed. A zone cannot be live migrated between hosts when a feature is
enabled in a different way, even when the feature is supported by both releases.
For example, if host-compatible=adi is set in the zone
configuration on the source host and host-compatible=level1 is set in
the zone configuration on the target host, the live migration fails even if both hosts are
running Oracle Solaris 11.4.
See Kernel Zone Migration Class and Host Compatibility Level (solaris-kz Only) in Oracle Solaris Zones Configuration Resources for further information about the cpu-arch and host-compatible resource type properties for migration between different SPARC architectures.
See x86: Cross-CPU Migration Classes (solaris-kz) in Oracle Solaris Zones Configuration Resources and SPARC: Cross-CPU Migration Classes (solaris-kz) in Oracle Solaris Zones Configuration Resources for more information about setting the cpu-arch resource type for migration between different Intel architectures.
If the kernel zone's cpu-arch property is not set to a migration
class, the kernel zone's CPU architecture is the same as the host system.
Note:
The kernel zone host will always refuse to resume a kernel zone that was previously suspended on an incompatible CPU type. A kernel zone will not boot if thecpu-arch class is set to an incompatible value.
Example 5-4 Confirming and Setting the Kernel Zone cpu-arch and
host-compatible Resources on a SPARC Based System
The following example demonstrates how to confirm and set the
cpu-arch and host-compatible resource types on the
kernel zone kzone1.
global$ zonecfg -z kzone1 zonecfg:kzone1> info cpu-arch host-compatible cpu-arch: generic host-compatible: native zonecfg:kzone1> set cpu-arch=migration-class1 zonecfg:kzone1> set host-compatible=adi zonecfg:kzone1> info cpu-arch host-compatible cpu-arch: migration-class1 host-compatible: adi zonecfg:kzone1> exit
Example 5-5 Live Migration Fails Due to Incompatible SPARC CPU Architecture
This example demonstrates a live migration attempt between a SPARC T4 host global1 and a SPARC T5 host, global2. The cpu-arch property is using a default value that indicates the actual CPU architecture. The cpu-arch property value is not consistent across the hosts and must be set to a migration class described in Kernel Zone Migration Class and Host Compatibility Level (solaris-kz Only) in Oracle Solaris Zones Configuration Resources.
global1$ zoneadm -z kzone1 migrate -n ssh://global2
zoneadm: zone 'kzone1': Importing zone configuration.
zoneadm: zone 'kzone1': Attaching zone.
zoneadm: zone 'kzone1': Booting zone in 'migrating-in' mode.
zoneadm: zone 'kzone1': Checking migration compatibility.
zoneadm: zone 'kzone1': configuration check failed:
error: Cannot resume guest on target host.
error: Guest's migration class is SPARC-T4, host's is SPARC-T5. Please check cpu-arch setting in zone config or in host LDom config.
2016-08-18 18:27:53 error: request failed: failed to create VM: Operation not supported
Example 5-6 Confirming and Setting the Kernel Zone Migration Class on an Intel System
The following example demonstrates how to confirm and set the
cpu-arch resource type on the kernel zone
kzone1.
global$ zonecfg -z kzone1 zonecfg:kzone1> info cpu-arch cpu-arch: generic zonecfg:kzone1> set cpu-arch=migration-class4 zonecfg:kzone1> info cpu-arch cpu-arch: migration-class4 zonecfg:kzone1> exit global$ zoneadm kzone1 reboot
Example 5-7 Live Migration Fails Due to Incompatible Intel CPU Architecture
This example demonstrates a live migration attempt between a Haswell-based host global1 and a Sandy Bridge-based host global2. This would occur if you were migrating for example from an Oracle Server X5-2 to a different type of server whose CPU is a Sandy Bridge processor and you did not set cpu-arch. The cpu-arch property must be set to a migration class described in x86: Cross-CPU Migration Classes (solaris-kz) in Oracle Solaris Zones Configuration Resources and SPARC: Cross-CPU Migration Classes (solaris-kz) in Oracle Solaris Zones Configuration Resources.
global1$ zoneadm -z kzone1 migrate -n ssh://global2
zoneadm: zone 'kzone1': Importing zone configuration.
zoneadm: zone 'kzone1': Attaching zone.
zoneadm: zone 'kzone1': Booting zone in 'migrating-in' mode.
zoneadm: zone 'kzone1': Checking live migration compatibility.
zoneadm: zone 'kzone1': configuration check failed:
See /var/log/zones/kzone1.messages for debug output
error: cannot resume as current CPU migration class value: sandybridge does not match the suspended value haswell
2016-08-15 01:05:55 error: request failed: failed to create VM: Invalid argument