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 restrictions apply to zone migration:
The global zone on the target system must be running the same Solaris release as the original host.
To ensure that the zone will run properly, the target system must have the same versions of the following required operating system packages and patches as those installed on the original host.
Packages that deliver files under an inherit-pkg-dir resource
Packages where SUNW_PKG_ALLZONES=true
Other packages and patches, such as those for third-party products, can be different.
Solaris 10 10/08: If the new host has later versions of the zone-dependent packages and their associated patches, using zoneadm attach with the -u option 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, and their associated patches, can vary from zone to zone. This option also enables automatic migration between machine classes, such as from sun4u to sun4v.
Solaris 10 9/10: If the new host has later versions of the packages and their associated patches, using zoneadm attach with the -U option updates those packages within the zone to match what would be seen with a newly installed non-global zone on this host. Any packages installed inside the zone but not installed in the global zone are ignored, and left as-is. This option also enables automatic migration between machine classes, such as from sun4u to sun4v.
Solaris 10 5/09: The -b option can be used to specify patches to be backed out of the zone before the update.
The host and target systems must have the same machine architecture unless the -u option, which can be used to migrate between sun4u and sun4v machine classes, is used.
Solaris 10 5/09:The -b option can be used to specify patches, either official or Interim Diagnostics/Relief (IDR), to be backed out of the zone during the attach. Multiple -b options can be specified. If any of the patches cannot be backed out for any reason, then the attach will fail and none of the patches will be backed out.
This option only applies to zone brands using SVr4 packaging.
To verify the Solaris release and the machine architecture, type:
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.