Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015

About Migrating a Zone

The zonecfg and zoneadm commands can be used to migrate an existing non-global zone from one system to another. The zone is halted and detached from its current host. The zonepath is moved to the target host, where it is attached.

The following requirements apply to zone migration:

  • You must remove all inactive BEs on the source system before migration.

  • The global zone on the target system must be running an Oracle Solaris 11 release that is equal to or higher than the original source host.

  • To ensure that the zone will run properly, the target system must have the same or later versions of the required operating system packages as those installed on the original source host.

    Other packages, such as those for third-party products, can be different.

  • If the new host has later versions of the zone-dependent packages, using zoneadm attach with the –u or –U options updates those packages within the zone to match the new host. The update on attach software looks at the zone that is being migrated and determines which packages must be updated to match the new host. Only those packages are updated. The rest of the packages can vary from zone to zone. Any packages installed inside the zone but not installed in the global zone are ignored and left as-is.

  • If a zone is being migrated from a system that did not export the ZFS pools referenced by rootzpool or zpool resources, you might need to use an option to force import the zpools. Use this option only if you are certain that the ZFS pools are not imported on another system. Simultaneously importing the same ZFS pool on multiple systems will lead to data corruption.

    # zoneadm -z zonename attach -x force-zpool-import

    Note -  If the following option is used during attach of a solaris brand zone, the last booted zone boot environment is selected. A selected zone boot environment that is not associated with any global zone is cloned.
    # zoneadm -z zonename attach -x attach-last-booted-zbe

    For more information, see beadm(1M) and solaris(5).

The zoneadm detach process creates the information necessary to attach the zone on a different system. The zoneadm attach process verifies that the target machine has the correct configuration to host the zone.

Because there are several ways to make the zonepath available on the new host, the actual movement of the zonepath from one system to another is a manual process that is performed by the global administrator.

When attached to the new system, the zone is in the installed state.