This section provides procedures on how to import installed zones into an existing zone cluster or into a new zone cluster.
You can use the import-zone command to import the zones into an existing zone cluster or a new zone cluster. The import-zone command can be run in the interactive mode as well as the non-interactive mode. For more information about the import-zone command, see the clzonecluster(8CL) man page.
Consider the following points when you plan the importing of installed zones into an existing zone cluster or into a new zone cluster:
When you import an installed zone into a new zone cluster, zone properties such as zonepath, ip-type, and brand must be defined in the zone cluster configuration before you run the import-zone command.
The import-zone command can be executed only in the node scope.
The physical host must be specified in the node scope before running the import-zone command.
The local:rad SMF service, svc:/system/rad:local must be online on the physical host hosting the zone to be imported.
The zone to be imported must be in an installed state.
You cannot import an Oracle Solaris Zone that has zone properties such as zonepath, ip-type, and brand that are different from the zone cluster.
The zone to be imported cannot be on a shared storage.
The zone to be imported cannot be configured as a failover highly available zone.
The zone to be imported cannot be part of another zone cluster configuration.
The Oracle Solaris Zone that is imported will be renamed to the zone cluster's name. You will be prompted to accept the renaming of the zone.
When you run the import-zone command in the non-interactive mode, you will need to set an additional flag in order to rename the zone. For example:
add node set physical-host=phost_name import-zone -y zonename=zone_name set hostname=host end
You perform all steps of the procedure from a node of the global cluster.
For example:
phy-schost# zoneadm -z zone_name list -v
Ensure that you meet the requirements as described in Requirements and Restrictions.
phy-schost# clzonecluster configure zoneclustername
clzc:zoneclustername:> add node
clzc:zoneclustername:node> set physical-host=host
Accept the prompt to rename the zone.
clzc:zoneclustername:node> import-zone zonename=zone_name
If you are running the import-zone command in a non-interactive mode:
import-zone -y zonename=zone_name
clzc:zoneclustername:node> set hostname=host
For example:
# clzc:zoneclustername:node> add privnet # clzc:zoneclustername:node:privnet> set physical=bge0 # clzc:zoneclustername:node:privnet> end
phy-schost# clzonecluster show -v zoneclustername
This example shows how to add an installed zone, zone1, into an existing zone cluster, sczone.
phy-schost# clzc configure sczone clzc:sczone:> add node clzc:sczone:node> set physical-host=phost2 clzc:sczone:node> import-zone zonename=zone1 This operation will rename the zone. Do you want to continue(Y/N)? Y clzc:sczone:node> set hostname=thost2-0a clzc:sczone:node> end clzc:sczone:> commit clzc:sczone:> exit #
You perform all steps of the procedure from a node of the global cluster.
For example:
phy-schost# zoneadm -z zone_name list -v
Ensure that you meet the requirements as described in Requirements and Restrictions.
phy-schost# clzonecluster configure new-zoneclustername
clzc:new-zoneclustername:> create
clzc:new-zoneclustername:> set zonepath=/zones/zonec clzc:new-zoneclustername:> set ip-type=exclusive clzc:new-zoneclustername:> set brand=solaris
clzc:new-zoneclustername:> add node
clzc:new-zoneclustername:node> set physical-host=host
Accept the prompt to rename the zone.
clzc:new-zoneclustername:node> import-zone zonename=zone_name
If you are running the import-zone command in a non-interactive mode:
import-zone -y zonename=zone_name
clzc:new-zoneclustername:node> set hostname=host
For example:
# clzc:new-zoneclustername:node> add privnet # clzc:new-zoneclustername:node:privnet> set physical=bge0 # clzc:new-zoneclustername:node:privnet> end
phy-schost# clzonecluster show -v zoneclustername
This example shows how to import an installed zone, zone1, into a new zone cluster, sczone-new.
phy-schost# clzc configure sczone-new clzc:sczone-new:> create clzc:sczone-new:> set zonepath=/zones/zonec clzc:sczone-new:> set ip-type=exclusive clzc:sczone-new:> set brand=solaris clzc:sczone-new:> add node clzc:sczone-new:node> set physical-host=phost2 clzc:sczone-new:node> import-zone zonename=zone1 This operation will rename the zone. Do you want to continue(Y/N)? Y clzc:sczone-new:node> set hostname=thost2-0a clzc:sczone-new:node> end clzc:sczone-new:> commit clzc:sczone-new:> exit #