How to Migrate a Kernel Zone By Using Live Migration
-
Ensure that both the kernel zone source and target hosts meet hardware, software, and storage requirements for live migration as detailed in Kernel Zone Migration Requirements and Additional Requirements for Kernel Zone Warm Migration and Live Migration.
-
Ensure that the required services are available as described in Enabling Services for Warm or Live Migration.
-
If the source and target hosts are not identical, see About Migration and Compatible Configurations.
Example 5-15 Using Live Migration to Migrate a Kernel Zone to a New Host
The following example demonstrates a live migration of the kernel zone kzone1
from the source host global
to the target host global2
. The configuration was created in advance on the target host.
global$ zoneadm -z kzone1 migrate ssh://global2
zoneadm: zone 'kzone1': Using zone configuration on destination.
zoneadm: zone 'kzone1': Attaching zone.
zoneadm: zone 'kzone1': Booting zone in 'migrating-in' mode.
zoneadm: zone 'kzone1': Checking migration compatibility.
zoneadm: zone 'kzone1': Starting migration.
zoneadm: zone 'kzone1': Waiting for migration to complete.
zoneadm: zone 'kzone1': Migration successful.
zoneadm: zone 'kzone1': Halting and detaching zone.
Example 5-16 Live Migration Dry Run Failure
This example demonstrates a failed dry-run migration between the source host global1
and the target host global2
. The virtual-cpu
resource is inconsistent between both hosts. See Oracle Solaris Zones Configuration Resources for further information about zone configuration.
global1$ zoneadm -z kzone1 migrate -n ssh://global2
zoneadm: zone 'kzone1': Using existing zone configuration on destination.
zoneadm: zone 'kzone1': Attaching zone.
zoneadm: zone 'kzone1': Booting zone in 'migrating-in' mode.
zoneadm: zone 'kzone1': boot failed:
zone 'kzone1': error: Suspended zone has 8 active VCPUs, more than the configured
zone 'kzone1': virtual-cpu maximum of 4.
zone 'kzone1': error: Correct errors, or delete the configuration, using zonecfg(8) on
the zone 'kzone1': destination host.
zoneadm: zone kzone1: call to zoneadmd(8) failed: zoneadmd(8) returned an error 9 (zone state change failed)
Example 5-17 Live Migration Between Hosts With Different anet
Configurations
The following example demonstrates live migration between hosts with different anet
configurations. See Oracle Solaris Zones Configuration Resources for additional information regarding anet
resources.
The zone configuration is created on the target host and the anet
resource is modified before the migration. A dry run is performed to test.
global1$ zonecfg -z kzone1 -r export | ssh root@global2 zonecfg -z kzone1 -f - global1$ ssh root@global2 zonecfg -z kzone1 'select anet 0; set lower-link=net1;end' global1$ zoneadm -z kzone1 migrate -n ssh://global2