Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: December 2018
 
 

Using Warm Migration to Migrate a Kernel Zone

You can migrate a kernel zone to another host by suspending the zone on its current host by using the zoneadm suspend command and resuming on a new host. This zone migration method is known as a warm migration or migrating using suspend and resume.

A warm migration does not require a full system reboot and restart of the application while the kernel zone is running.

Warm migrations require you to set up the zone configuration to be compatible on both the source and target hosts. For more information about zone configuration incompatibilities and warm migration, see the solaris-kz(5) man page.

Warm migrations require the zone to have a suspend resource configured for shared storage that is accessible by both the source and target hosts. See Configuring the suspend Resource and Chapter 13, Getting Started With Oracle Solaris Zones on Shared Storage in Creating and Using Oracle Solaris Zones.

As part of a kernel zone warm migration, you must define the encryption key on the destination host. See Encryption Keys And Kernel Zone Migration.

How to Migrate a Kernel Zone by Using Warm Migration

Before You Begin

See Configuring the suspend Resource.

  1. Become an administrator.

    For more information, see Assigning Rights to Non-Root Users to Manage Zones in Creating and Using Oracle Solaris Zones.

  2. Ensure that the kernel zone to be migrated has a suspend resource with shared storage configured.

    For example:

    global$ zonecfg -z zonename info suspend
    suspend:
             storage: iscsi://system/luname.naa.501337600144f0dbf8af1900
  3. On the global zone, suspend the file system on the kernel zone to be migrated.
    $ zoneadm -z zonename suspend
  4. Detach the kernel zone file system on the global zone.
    $ zoneadm -z zonename detach
  5. Export the zone configuration and transfer the file to the target host.

    This step also configures a zone on the target host system by using the same configuration as the source.

    $ zonecfg -z zonename export | ssh root@newhost zonecfg -z zonename -f -

    For example:

    global$ zonecfg -z kzone1 export | ssh root@global2 zonecfg -z kzone1 -f -
  6. Attach the zone on the new host.
    $ zoneadm -z zonename attach
  7. Boot the kernel zone on the new host to resume the migrated zone.
    $ zoneadm -z zonename boot