How to Clone a Zone from an Existing Snapshot
You can clone a source zone multiple times from an existing snapshot that was originally taken when you cloned a zone.
You must be the global administrator in the global zone to perform this procedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Configure the zone zone2.
Specify that an existing snapshot be used to create new-zone2.
global# zoneadm -z zone2 clone -s zeepool/zones/my-zone@SUNWzone1 my-zone
The system displays:
Cloning snapshot zeepool/zones/my-zone@SUNWzone1
The zoneadm command validates the software from the snapshot SUNWzone1, and clones the snapshot.
List the zones on the system.
ID NAME STATUS PATH BRAND 0 global running / native - my-zone installed /zeepool/zones/my-zone native - zone1 installed /zeepool/zones/zone1 native - zone2 installed /zeepool/zones/zone2 native
How to Use Copy Instead of ZFS Clone
Use this procedure to prevent the automatic cloning of a zone on a ZFS file system by specifying that the zonepath should be copied instead.
You must be the global administrator in the global zone to perform this procedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Specify that the zonepath on ZFS be copied and not ZFS cloned.
global# zoneadm -z zone1 clone -m copy my-zone
Deleting a Non-Global Zone From the System
The procedure described in this section completely deletes a zone from a system.
How to Remove a Non-Global Zone
Shut down the zone my-zone.
global# zlogin my-zone shutdown my-zone
Remove the root file system for my-zone.
global# zoneadm -z my-zone uninstall -F
Delete the configuration for my-zone.
global# zonecfg -z my-zone delete -F
List the zones on the system, to verify that my-zone is no longer listed.
global# zoneadm list -iv
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND 0 global running / native