Zone migration within a system – Sun Microsystems SOLARIS 10 User Manual
Page 105
Version 3.1-en
Solaris 10 Container Guide - 3.1 5. Cookbooks
Effective: 30/11/2009
5.3.6. Zone migration within a system
[ug] Let us assume that a zone named "test" is to be moved to another directory. Currently, this zone
is located on /export/home/zone/test (zonepath).
global# zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
22 test running /export/home/zone/test native shared
Before moving it, the zone must be halted:
global# zoneadm -z test halt
In a short amount of time, the zone can then be moved with zoneadm move. The duration
depends on whether the target directory is located in the same filesystem (implementation with mv) or
in a different filesystem (zonepath must be copied), and depending on the contents (sparse-
root/whole-root zone). The move takes several minutes.
global# zoneadm -z test move /container/test
Moving across file-systems; copying zonepath /export/home/zone/test...
Cleaning up zonepath /export/home/zone/test...
global#
The configuration of the zone is adjusted as well:
global# zonecfg -z test info
zonename: test
zonepath: /container/test
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
inherit-pkg-dir:
dir: /opt
global# zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
23 test running /container/test native shared
In this example, the zone was moved from a UFS to a ZFS directory.
global# df -k /export/home /container
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t1d0s6 5848297 2839898 2949917 50% /export/home
container 1007616 90758 916031 10% /container
98