|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management Oracle Solaris 11 Information Library|
When the source zonepath and the target zonepath both reside on ZFS and are in the same pool, the zoneadm clone command automatically uses ZFS to clone the zone. However, you can specify that the ZFS zonepath be copied and not ZFS cloned.
You must configure the new zone before you can install it. The parameter passed to the zoneadm create subcommand is the name of the zone to clone. This source zone must be halted.
You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.
global# zoneadm -z my-zone halt
global# zonecfg -z my-zone export -f /zones/master
Note - You can also create the new zone configuration using the procedure How to Configure the Zone instead of modifying an existing configuration. If you use this method, skip ahead to Step 6 after you create the zone.
global# zonecfg -z zone1 -f /zones/master
global# zoneadm -z zone1 clone my-zone
The system displays:
Cloning zonepath /zones/my-zone...
ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - my-zone installed /zones/my-zone solaris excl - zone1 installed /zones/zone1 solaris excl
Example 19-3 Applying a System Configuration Profile to a Cloned Zone
To include a configuration profile:
# zoneadm -z zone1 clone -c /path/config.xml my-zone
Note that you must provide an absolute path to the configuration file.