Creating and Using Oracle Solaris Kernel Zones

Exit Print View

Updated: December 2014
 
 

Suspending and Resuming a Kernel Zone

You can suspend a kernel zone to disk by using the zoneadm suspend command, which is unique to kernel zones.

The zoneadm suspend command places a kernel zone in the suspended state. A suspend image is created and then compressed and encrypted by using the advanced encryption standard AES-128-CCM. An encryption key is automatically generated by /dev/random. After compression and encryption, the running state of the zone is written to the kernel zone's zone path.

The compressed and encrypted suspend image will generally be smaller than the zone's RAM. Writing the running state of the zone takes up the entire amount of the RAM used by the zone. Therefore, a zoneadm suspend operation can potentially use a significant amount of system resources.

You can resume a suspended zone (make all zone operations active again) by invoking the zoneadm boot command.

Suspend and resume are supported for a kernel zone only if a kernel zone has a suspend resource property in its configuration. The kernel zone template SYSsolaris-kz provides the suspend resource property by default. For example, the suspend information for the kernel zone kzone1 is as follows:

global# zonecfg -z kzone1 info suspend
suspend:
        path: /system/zones/kzone1/suspend
        storage not specified

The suspend resource must have either the full file path or the storage location specified. See the solaris-kz(5) man page for more information on suspend resource property requirements.

If the suspend image and the rest of the zone storage are accessible by multiple hosts on shared storage, you can use the suspend image to support a zone migration. See Migrating a Kernel Zone by Using Suspend and Resume.