Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015
 
 

How to Migrate a Non-Global Zone Using Shared Storage

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

If a zone's storage is configured by using a rootzpool resource and optionally one or more rpool resources, migration is quick and simple. For this procedure to work, both the source host and destination host (in the examples shown in this procedure, host1 and host2) must have access to the storage referenced in the rootzpool and zpool resources.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Configure the zone on the destination host.
    source-host# zonecfg -z zonename export -f /net/hostname/zonename.cfg
    destination-host# zonecfg -z zonename -f /net/hostname/zonename.cfg

    For example:

    host1# zonecfg -z my-zone export -f /net/my-host/my-zone.cfg
    host2# zonecfg -z my-zone -f /net/my-host/my-zone.cfg
  3. Shut down the zone.
    source-host# zoneadm -z zonename shutdown

    For example:

    host1# zoneadm -z my-zone shutdown
  4. Detach the zone from the source host.
    source-host# zoneadm -z zonename detach

    For example:

    host1# zoneadm -z my-zone detach
  5. Attach the zone to the destination host.

    The options (–u, –U) might be needed.

    destination-host# zoneadm -z zonename attach

    For example:

    host2# zoneadm -z my-zone attach
  6. Boot the zone.
    host2# zoneadm -z zonename boot