JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for Oracle Solaris Zones Guide     Oracle Solaris Cluster 4.0
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for Solaris Zones

HA for Solaris Zones Overview

Overview of Installing and Configuring HA for Solaris Zones

Planning the HA for Solaris Zones Installation and Configuration

Configuration Restrictions

Restrictions for Zone Network Addresses

Restrictions for an HA Zone

Restrictions for a Multiple-Masters Zone

Restrictions for the Zone Path of a Zone

Restrictions on Major Device Numbers in /etc/name_to_major

Configuration Requirements

Dependencies Between HA for Solaris Zones Components

Parameter File Directory for HA for Solaris Zones

Installing and Configuring Zones

How to Enable a Zone to Run in a Failover Configuration

How to Enable a Zone to Run in a Multiple-Masters Configuration

How to Install a Zone and Perform the Initial Internal Zone Configuration

Verifying the Installation and Configuration of a Zone

How to Verify the Installation and Configuration of a Zone

Installing the HA for Solaris Zones Package

How to Install the HA for Solaris Zones Package

Registering and Configuring HA for Solaris Zones

Specifying Configuration Parameters for the Zone Boot Resource

Writing Scripts for the Zone Script Resource

Specifying Configuration Parameters for the Zone Script Resource

Writing a Service Probe for the Zone SMF Resource

Specifying Configuration Parameters for the Zone SMF Resource

How to Create and Enable Resources for the Zone Boot Component

How to Create and Enable Resources for the Zone Script Component

How to Create and Enable Resources for the Zone SMF Component

Verifying the HA for Solaris Zones and Configuration

How to Verify the HA for Solaris Zones Installation and Configuration

Upgrading Non-Global Zones Managed by HA for Oracle Solaris Zones

Tuning the HA for Solaris Zones Fault Monitors

Operation of the HA for Solaris Zones Parameter File

Operation of the Fault Monitor for the Zone Boot Component

Operation of the Fault Monitor for the Zone Script Component

Operation of the Fault Monitor for the Zone SMF Component

Tuning the HA for Solaris Zones Stop_timeout property

Choosing the Stop_timeout value for the Zone Boot Component

Choosing the Stop_timeout value for the Zone Script Component

Choosing the Stop_timeout value for the Zone SMF Component

Denying Cluster Services for a Non-Global Zone

Debugging HA for Solaris Zones

How to Activate Debugging for HA for Solaris Zones

A.  Files for Configuring HA for Solaris Zones Resources

Index

Registering and Configuring HA for Solaris Zones

Before you perform this procedure, ensure that the HA for Solaris Zones data service packages are installed.

Use the configuration and registration files in the following directories to register the HA for Solaris Zones resources:

The files define the dependencies that are required between the HA for Solaris Zones components. For information about these dependencies, see Dependencies Between HA for Solaris Zones Components.

Registering and configuring HA for Solaris Zones involves the tasks that are explained in the following sections:

  1. Specifying Configuration Parameters for the Zone Boot Resource

  2. Writing Scripts for the Zone Script Resource

  3. Specifying Configuration Parameters for the Zone Script Resource

  4. Writing a Service Probe for the Zone SMF Resource

  5. Specifying Configuration Parameters for the Zone SMF Resource

  6. How to Create and Enable Resources for the Zone Boot Component

  7. How to Create and Enable Resources for the Zone Script Component

  8. How to Create and Enable Resources for the Zone SMF Component

Specifying Configuration Parameters for the Zone Boot Resource

HA for Solaris Zones provides the script sczbt_register, which automates the process of configuring the zone boot resource. By default this script obtains configuration parameters from the sczbt_config file in the /opt/SUNWsczone/sczbt/util directory. To specify configuration parameters for the zone boot resource, copy the sczbt_config file to a different filename and amend it as described below. It is recommended to keep this file as a future reference. The register script provides option -f to specify the fully qualified filename to the copied configuration file.

The directory you specify for the PARAMETERDIR can exist on the local file system of all nodes, the global file system, or the failover file system.

Each configuration parameter in the sczbt_config file is defined as a keyword-value pair. The sczbt_config file already contains the required keywords and equals signs. For more information, see Listing of sczbt_config. When you edit the sczbt_config file, add the required value to each keyword.

For more information, seeHow to Create and Enable Resources for the Zone Boot Component.

The keyword-value pairs in the sczbt_config file are as follows:

RS=sczbt-rs
RG=sczbt-rg
PARAMETERDIR=sczbt-parameter-directory
SC_NETWORK=true|false
SC_LH=sczbt-lh-rs
FAILOVER=true|false
HAS_RS=sczbt-has-rs
Zonename=zone-name
Zonebrand=zone-brand-type
Zonebootopt=zone-boot-options
Milestone=zone-boot-milestone
LXrunlevel=linux-runlevel
SLrunlevel=solaris-legacy-runlevel
Mounts=list-of-mountpoints

The meaning and permitted values of the keywords in the sczbt_config file are as follows:

RS=sczbt-rs

Specifies the name that you are assigning to the zone boot resource. You must specify a value for this keyword.

RG=sczbt-rg

Specifies the name of the resource group the zone boot resource will reside in. You must specify a value for this keyword.

PARAMETERDIR=sczbt parameter directory

Specifies the directory name that you are assigning to the parameter directory where some variables and their values will be stored. You must specify a value for this keyword. This directory can exist on the local file system of all nodes, the global file system, or on a failover file system.

SC_NETWORK=true|false

Specifies whether the zone boot resource is network aware with a SUNW.LogicalHostName resource. You must specify a value for this keyword.

  • If HA for the zone's addresses is not required, then configure the zone`s addresses by using the zonecfg utility.

    SC_NETWORK=false
    SC_LH=
  • If only HA through IPMP protection is required, then configure the zone's addresses by using the zonecfg utility and then place the zone's addresses on an adapter within an IPMP group.

    SC_NETWORK=false
    SC_LH=
  • If HA through IPMP protection and protection against the failure of all physical interfaces by triggering a failover is required, choose one option from the following list:

    • If you require the SUNW.LogicalHostName resource type to manage one or a subset of the zone's addresses, configure a SUNW.LogicalHostName resource for those zone's addresses and not by using the zonecfg utility. Use the zonecfg utility to configure only the zones's addresses that are not to be under the control of the SUNW.LogicalHostName resource.

      SC_NETWORK=true
      SC_LH=Name of the SUNW.LogicalHostName resource
    • If you require the SUNW.LogicalHostName resource type to manage all the zone's addresses, configure a SUNW.LogicalHostName resource with a list of the zone's addresses and do not configure them by using the zonecfg utility.

      SC_NETWORK=true
      SC_LH=Name of the SUNW.LogicalHostName resources
    • Otherwise, configure the zone's addresses by using the zonecfg utility and configure a separate redundant IP address for use by a SUNW.LogicalHostName resource, which must not be configured using the zonecfg utility.

      SC_NETWORK=false
      SC_LH=Name of the SUNW.LogicalHostName resource
SC_LH=sczbt-lh-rs

Specifies the name of the SUNW.LogicalHostName resource for the zone boot resource. Refer to Restrictions for Zone Network Addresses for a description of when to set this variable. This name must be the SUNW.LogicalHostname resource name you assigned when you created the resource in Step 4.

FAILOVER=true|false

Specifies whether the zone's zone path is on a highly available file system.

HAS_RS=sczbt-has-rs

Specifies the name of the SUNW.HAStoragePlus resource for the zone boot resource. This name must be the SUNW.HAStoragePlus resource name you assigned when you created the resource in How to Enable a Zone to Run in a Failover Configuration. You must specify a value for this keyword if FAILOVER=true is set. This will cause the scbzt_register script to define a Resource_dependencies_offline_restart resource dependency from the zone boot resource to the specified SUNW.HAStoragePlus resource.

For a multi-master configuration, the HAS_RS= parameter must be empty because there is no SUNW.HAStoragePlus resource. All the zone paths are local to each node in that configuration.

Zonename=zone-name

Specifies the zone name. You must specify a value for this keyword.

Zonebrand=zone-brand-type

Specifies the brand type of the zone. The options that are currently supported are solaris or solaris10. You must specify a value for this keyword.

Zonebootopt=zone-boot-options

Specifies the zone boot option to use. Only -s is supported. Leaving this variable blank will cause the zone to boot to the multi-user-server milestone.

Milestone=zone-boot-milestone

Specifies the milestone the zone must reach to be considered successfully booted. This option is used for the solaris or solaris 10 brand type. You must specify a value for this keyword if you set the Zonebrand option to solaris or solaris 10.

LXrunlevel=linux-runlevel

This option was used on Oracle Solaris 10 and is now deprecated. Any value for this keyword is ignored.

SLrunlevel=solaris-legacy-runlevel

This option was used on Oracle Solaris 10 and is now deprecated. Any value for this keyword is ignored.

Mounts=list-of-mountpoints

Specifies a space separated list of directories with their mount options, which will automatically get lofs mounted from the global zone into the booted zone. The mount point used in the global zone can be different to the mount point in the booted zone. Specifying a value for this keyword is optional.

The Mounts keyword format is as follows:

Mounts="/global-zone-dir:/local-zone-dir:mount-options <next entry>"

While mount-options can be a comma separated list of file system mount options.

The only required entry when setting this keyword is the /global-zone-dir part of the colon separated variable. The /local-zone-dir and mount-options part can be omitted.

Omitting the /local-zone-dir part will make the zone's mount point the same as the global zone directory.

Omitting the mount-options part will not provide any mount options except the default options from the mount command.


Note - If you are omitting the /local-zone-dir or the mount-options, you must also omit the “:” as delimiter.



Note - You must manually create any mount point directories within the booted zone that will be used within the Mounts keyword, before registering this resource within Oracle Solaris Cluster.



Note - If the file system of the source mount point in the global zone is mounted by a SUNW.HAStoragePlus resource, you must specify a strong resource dependency from the sczbt resource to this SUNW.HAStoragePlus resource.


Example 1-1 Sample sczbt_config File

This example shows an sczbt_config file in which configuration parameters are set as follows:

RS=zone1-rs
RG=zone1-rg
PARAMETERDIR=/global/zones/pfiles
SC_NETWORK=true
SC_LH=zone1-lh
FAILOVER=true
HAS_RS=zone1-has
Zonename=zone1
Zonebrand=solaris
Zonebootopt=
Milestone=multi-user-server
Mounts="/global/app/bin:/app/bin:ro /app/data:rw /logs"

Writing Scripts for the Zone Script Resource

The zone script resource provides the ability to run commands or scripts to start, stop and probe an application within a zone. The zone script resource depends on the zone boot resource. The command or script names are passed to the zone script resource when the resource is registered and must meet with the following requirements.

Table 1-3 Return codes

0
Successful completion
>0
An error has occurred
201
(Probe only) – An error has occurred that requires an immediate failover of the resource group
>0 & !=201
(Probe only) – An error has occurred that requires a resource restart

Note - For an immediate failover of the zone script resource, you must configure the resource properties Failover_mode and Failover_enabled to meet the required behavior. Refer to the r_properties(5) man page when setting the Failover_mode property and the SUNW.gds(5) man page when setting the Failover_enabled property.


Example 1-2 Zone Probe Script for Apache2

This example shows a simple script to test that the Apache2 service is running, beyond the process tree existing. The script /var/tmp/probe-apache2 must exist and being executable within the zone.

# <userinput>cat /var/tmp/probe-apache2</userinput>
#!/usr/bin/ksh
if echo "GET; exit" | mconnect -p 80 > /dev/null 2>&amp;1
then
    exit 0
else
    exit 100
fi

# <userinput>chmod 755 /var/tmp/probe-apache2</userinput></screen>

Specifying Configuration Parameters for the Zone Script Resource

HA for Solaris Zones provides the script sczsh_register, which automates the process of configuring zone script resource. By default this script obtains configuration parameters from the sczsh_config file in the /opt/SUNWsczone/sczsh/util directory. To specify configuration parameters for the zone script resource, copy the sczsh_config file to a different filename and amend it as described below. It is recommended to keep this file as a future reference. The register script provides option -f to specify the fully qualified filename to the copied configuration file.

Each configuration parameter in the sczsh_config file is defined as a keyword-value pair. The sczsh_config file already contains the required keywords and equals signs. For more information, see Listing of sczsh_config. When you edit the sczsh_config file, add the required value to each keyword.

The keyword-value pairs in the sczsh_config file are as follows:

RS=sczsh-rs
RG=sczbt-rg
SCZBT_RS=sczbt-rs
PARAMETERDIR=sczsh-parameter-directory
Zonename=sczbt-zone-name
ServiceStartCommand=sczsh-start-command
ServiceStopCommand=sczsh-stop-command
ServiceProbeCommand=sczsh-probe-command

The meaning and permitted values of the keywords in the sczsh_config file are as follows:

RS=sczsh-rs

Specifies the name that you are assigning to the zone script resource. You must specify a value for this keyword.

RG=sczbt-rg

Specifies the name of the resource group the zone boot resource resides in. You must specify a value for this keyword.

SCZBT_RS=sczbt-rs

Specifies the name of the zone boot resource. You must specify a value for this keyword.

PARAMETERDIR=sczsh parameter directory

Specifies the directory name that you are assigning to the parameter directory where the following variables and their values will be stored. You must specify a value for this keyword.

Zonename=sczbt-zone-name

Specifies the zone name. You must specify a value for this keyword.

ServiceStartCommand=sczsh-start-command

Specifies the zone start command or script to run. You must specify a value for this keyword.

ServiceStopCommand=sczsh-stop-command

Specifies the zone stop command or script to run. You must specify a value for this keyword

ServiceProbeCommand=sczsh-probe-command

Specifies the zone probe command or script to run. You must specify a value for this keyword

Example 1-3 Sample sczsh_config File

In this example the zone script resource uses the scripts that are available with the pkg:/web/server/apache-22 package on Oracle Solaris 11. Before this example can be used the Apache2 configuration file http.conf needs to be configured. For the purpose of this example, the delivered /etc/apache2/2.2/http.conf can be used. Amend the file so that you can successfully start and stop the Apache httpd server.

This example shows an sczsh_config file in which configuration parameters are set as follows:

RS="zone1-script-rs"
RG="zone1-rg"
SCZBT_RS="zone1-rs"
PARAMETERDIR="/global/zones/pfiles"
Zonename="zone1"
ServiceStartCommand="/lib/svc/method/http-apache22 start"
ServiceStopCommand="/lib/svc/method/http-apache22 stop"
ServiceProbeCommand="/var/tmp/probe-apache2"

Writing a Service Probe for the Zone SMF Resource

The zone SMF resource provides the ability to enable, disable, and probe an SMF service within a zone that is of brand type solaris or solaris10. The zone SMF resource depends on the zone boot resource. Probing the SMF service is performed by running a command or script against the SMF service. The SMF service and probe command or script names are passed to the zone SMF resource when the resource is registered. The probe command or script must meet the following requirements.

Table 1-4 Return codes

0
Successful completion
100
An error occurred that requires a resource restart
201
An error has occurred that requires an immediate failover of the resource group

Note - For an immediate failover of the zone SMF resource, you must configure the resource properties Failover_mode and Failover_enabled to meet the required behavior. Refer to the r_properties(5) man page when setting the Failover_mode property and the SUNW.gds(5) man page when setting the Failover_enabled property.


Example 1-4 Zone SMF Probe Script for Apache2

This example shows a simple script to test that the SMF Apache2 service is running, beyond the process tree existing. The script /var/tmp/probe-apache2 must exist and being executable within the zone.

# <userinput>cat /var/tmp/probe-apache2</userinput>
#!/usr/bin/ksh
if echo "GET; exit" | mconnect -p 80 > /dev/null 2>&amp;1
then
    exit 0
else
    exit 100
fi

# <userinput>chmod 755 /var/tmp/probe-apache2</userinput></screen>

Specifying Configuration Parameters for the Zone SMF Resource

HA for Solaris Zones provides the script sczsmf_register, which automates the process of configuring the zone SMF resource. By default this script obtains configuration parameters from the sczsmf_config file in the /opt/SUNWsczone/sczsmf/util directory. To specify configuration parameters for the zone SMF resource, copy the sczsmf_config file to a different filename and amend it as described below. It is recommended to keep this file as a future reference. The register script provides option -f to specify the fully qualified filename to the copied configuration file.

Each configuration parameter in the sczmf_config file is defined as a keyword-value pair. The sczsmf_config file already contains the required keywords and equals signs. For more information, see Listing of sczsmf_config. When you edit the sczsmf_config file, add the required value to each keyword.

The keyword-value pairs in the sczsmf_config file are as follows:

RS=sczsmf-rs
RG=sczbt-rg
SCZBT_RS=sczbt-rs
ZONE=sczbt-zone-name
SERVICE=smf-service
RECURSIVE=true|false
STATE=true|false
SERVICE_PROBE=sczsmf-service-probe

The meaning and permitted values of the keywords in the sczsmf_config file are as follows:

RS=sczsmf-rs

Specifies the name that you are assigning to the zone SMF resource. This must be defined.

RG=sczbt-rg

Specifies the name of the resource group the zone boot resource resides in. This must be defined.

SCZBT_RS=sczbt-rs

Specifies the name of the zone boot resource. You must specify a value for this keyword.

ZONE=sczbt-zone-name

Specifies the zone name. This must be defined.

SERVICE=smf-service

Specifies the SMF service to enable/disable. This must be defined.

RECURSIVE=true|false

Specifies true to enable the service recursively or false to just enable the service and no dependents. This must be defined.

STATE=true|false

Specifies true to wait until the service state is reached or false to not wait until the service state is reached. This must be defined.

SERVICE_PROBE=sczsmf-service-probe

Specify the script to check the SMF service. Specifying a value for this keyword is optional.

Example 1-5 Sample sczsmf_config File

In this example the zone SMF resource uses the Apache2 SMF service that is available in Solaris 11. Before this example can be used the Apache2 configuration file http.conf needs to be configured. For the purpose of this example, the delivered /etc/apache2/2.2/http.conf can be used. Amend the http.conf file so that you can successfully start and stop the apache httpd server.

This example shows an sczsmf_config file in which configuration parameters are set as follows:

RS=zone1-smf-rs
RG=zone1-rg
SCZBT_RS=zone1-rs
ZONE=zone1
SERVICE=apache2
RECURSIVE=true
STATE=true
SERVICE_PROBE=/var/tmp/probe-apache2

How to Create and Enable Resources for the Zone Boot Component

Before You Begin

Ensure you have edited the sczbt_config file or a copy of it to specify configuration parameters for the HA for Solaris Zones zone boot component. For more information, see Specifying Configuration Parameters for the Zone Boot Resource.

  1. Become superuser on one of the nodes in the cluster that will host the zone.
  2. On both nodes, configure the zone-boot (sczbt) resource.
    1. Register the SUNW.gds resource type.
      phys-schost# clresourcetype register SUNW.gds
    2. Create a directory on the ZFS file system that you created.

      You will specify this directory to store the parameter values that you set for the zone-boot resource.

      phys-schost# mkdir /pool/filesystem/parameterdir
    3. Install and configure the HA for Zones agent.
      phys-schost# pkg install ha-cluster/data-service/ha-zones
      phys-schost# cd /opt/SUNWsczone/sczbt/util
      phys-schost# cp -p sczbt_config sczbt_config.zoneboot-resource
      phys-schost# vi sczbt_config.zoneboot-resource
      
      Add or modify the following entries in the file.
      RS="zoneboot-resource"
      RG="resourcegroup"
      PARAMETERDIR="/pool/filesystem/parameterdir"
      SC_NETWORK="false"
      SC_LH=""
      FAILOVER="true"
      HAS_RS="hasp-resource"
      Zonename="zonename"
      Zonebrand="brand"
      Zonebootopt=""
      Milestone="multi-user-server"
      LXrunlevel="3"
      SLrunlevel="3"
      Mounts=""
      Save and exit the file.
    4. Configure the zone-boot resource.

      The resource is configured with the parameters that you set in the zone-boot configuration file.

      phys-schost# ./sczbt_register -f ./sczbt_config.zoneboot-resource

      Note - If you are using a multi master configuration and a local parameter directory, copy the files from the node where you ran the register command to all other nodes in the resource group nodelist.


    5. Verify that the zone-boot resource is enabled.
      phys-schost# clresource enable zoneboot-resource
  3. Verify that the resource group can switch to another node and the ZFS storage pool successfully starts there after the switchover.
    1. Switch the resource group to another node.
      phys-schost-2# clresourcegroup switch -n phys-schost-1 resourcegroup
    2. Verify that the resource group is now online on the new node.

      Output is similar to the following:

      phys-schost-1# clresourcegroup status
      === Cluster Resource Groups ===
      
          Group Name                   Node Name          Suspended        Status
          ----------                   ---------          ---------        ------
          resourcegroup                 phys-schost-1      No               Online
                                      phys-schost-2      No               Offline
    3. Verify that the zone is running on the new node.
      phys-schost-1# zoneadm list -cv
      ID  NAME     STATUS       PATH                           BRAND      IP
       0  global   running      /                              solaris    shared
       1  zonename running      /pool/filesystem/zonename        brand      shared

Example 1-6 Configuring the HA for Zones Zone Boot Component for solaris Brand Zones

This example creates the HAStoragePlus resource hasp-rs, which uses a mirrored ZFS storage pool hapool in the resource group zone-rg. The storage pool is mounted on the /hapool/solaris file system. The hasp-rs resource runs on the solaris brand non-global zone solariszone1, which is configured on both phys-schost-1 and phys-schost-2. The zone-boot resource solariszone1-rs is based on the SUNW.gds resource type.

Create a resource group.
phys-schost-1# clresourcegroup create zone-rg

Create a mirrored ZFS storage pool to be used for the HA zone root path.
phys-schost-1# zpool create -m /ha-zones hapool mirror /dev/rdsk/c4t6d0 \
/dev/rdsk/c5t6d0
phys-schost-1# zpool export hapool

Create an HAStoragePlus resource that uses the resource group and mirrored ZFS storage pool that you created.
phys-schost-1# clresourcetype register SUNW.HAStoragePlus
phys-schost-1# clresource create -t SUNW.HAStoragePlus \
-g zone-rg -p Zpools=hapool hasp-rs

Bring the resource group online.
phys-schost-1# clresourcegroup online -eM zone-rg

Create a ZFS file-system dataset on the ZFS storage pool that you created.
phys-schost-1# zfs create hapool/solaris

Ensure that the universally unique ID (UUID) of each node's boot-environment (BE) root dataset is the same value on both nodes.
phys-schost-1# beadm list -H
…
zfsbe;8fe53702-16c3-eb21-ed85-d19af92c6bbd;NR;/;7565844992;static;1229439064
…
phys-schost-2# zfs set org.opensolaris.libbe:uuid=8fe53702-16c3-eb21-ed85-d19af92c6bbd \
rpool/ROOT/zfsbe

Configure the solaris brand non-global zone.
phys-schost-1# zonecfg -z solariszone1 'create -b ;\
set zonepath=/hapool/solaris/solariszone1 ; add attr; set name=osc-ha-zone; set type=boolean;
set value=true; end; set autoboot=false; set ip-type=shared'
phys-schost-1# zoneadm list -cv
  ID NAME             STATUS       PATH                           BRAND    IP    
   0 global           running      /                              solaris  shared
   - solariszone1     configured   /hapool/solaris/solariszone1   solaris  shared
Repeat on phys-schost-2.

Identify the node that masters the HAStoragePlus resource, and from that node install solariszone1.
phys-schost-1# clresource status
=== Cluster Resources ===

Resource Name             Node Name       Status        Message
--------------            ----------      -------        -------
 hasp-rs                  phys-schost-1   Online        Online
                          phys-schost-2   Offline       Offline

phys-schost-1# zoneadm -z solariszone1 install
phys-schost-1# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              solaris   shared
   - solariszone1     installed  /hapool/solaris/solariszone1   solaris  shared
phys-schost-1# zoneadm -z solariszone1 boot
phys-schost-1# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              solaris  shared
   - solariszone1     running    /hapool/solaris/solariszone1   solaris  shared

Open a new terminal window and log in to solariszone1.
phys-schost-1# zoneadm -z solariszone1 halt

Forcibly detach the zone.
phys-schost-1# zoneadm -z solariszone1 detach -F

Switch zone-rg to phys-schost-2 and forcibly attach the zone.
phys-schost-1# clresourcegroup switch -n phys-schost-2 zone-rg
phys-schost-2# zoneadm -z solariszone1 attach -F
phys-schost-2# zoneadm list -cv
  ID NAME             STATUS      PATH                           BRAND    IP    
   0 global           running     /                              solaris  shared
   - solariszone1     installed   /hapool/solaris/solariszone1   solaris  shared
phys-schost-2# zoneadm -z solariszone1 boot

Open a new terminal window and log in to solariszone1.
phys-schost-2# zlogin -C solariszone1
phys-schost-2# zoneadm -z solariszone1 halt

Forcibly detach the zone.
phys-schost-1# zoneadm -z solariszone1 detach -F

On both nodes, configure the zone-boot (sczbt) resource.
phys-schost# clresourcetype register SUNW.gds
phys-schost# mkdir /hapool/solaris/params

On both nodes, install and configure the HA for Zones agent.
phys-schost# pkg install ha-cluster/data-service/ha-zones
phys-schost# cd /opt/SUNWsczone/sczbt/util
phys-schost# cp -p sczbt_config sczbt_config.solariszone1-rs
phys-schost# vi sczbt_config.solariszone1-rs

On both nodes, add or modify the following entries in the sczbt_config.solariszone1-rs file.
RS="solariszone1-rs"
RG="zone-rg"
PARAMETERDIR="/hapool/solaris/params"
SC_NETWORK="false"
SC_LH=""
FAILOVER="true"
HAS_RS="hasp-rs"

Zonename="solariszone1"
Zonebrand="solaris"
Zonebootopt=""
Milestone="multi-user-server"
LXrunlevel="3"
SLrunlevel="3"
Mounts=""
Save and exit the file.

On both nodes, configure the solariszone1-rs resource and verify that it is enabled.
phys-schost# ./sczbt_register -f ./sczbt_config.solariszone1-rs
phys-schost# clresource enable solariszone1-rs

Verify that zone-rg can switch to another node and that solariszone1 successfully starts there after the switchover.
phys-schost-2# clresourcegroup switch -n phys-schost-1 zone-rg
phys-schost-1# clresourcegroup status
=== Cluster Resource Groups ===

    Group Name                   Node Name          Suspended        Status
    ----------                   ---------          ---------        ------
    zone-rg                      phys-schost-1      No               Online
                                 phys-schost-2      No               Offline

phys-schost-1# zoneadm list -cv
ID  NAME         STATUS      PATH                           BRAND      IP
 0  global       running      /                              solaris    shared
 1  solariszone1 running      /hapool/solaris/solariszone1   solaris    shared

Next Steps

Go to Verifying the HA for Solaris Zones and Configuration.

How to Create and Enable Resources for the Zone Script Component

Before You Begin

Ensure you have edited the sczsh_config file or a copy of it to specify configuration parameters for the HA for Solaris Zones zone script component. For more information, see Specifying Configuration Parameters for the Zone Script Resource.

  1. Go to the directory that contains the script for creating the HA for Solaris Zones script resource.
    # cd /opt/SUNWsczone/sczsh/util
  2. Run the script that creates the zone script resource.
    # ./sczsh_register -f /mypath/sczsh_config
  3. Bring online the zone script resource.
    # clresource enable sczsh-rs

Next Steps

Go to Verifying the HA for Solaris Zones and Configuration.

How to Create and Enable Resources for the Zone SMF Component

Before You Begin

Ensure you have edited the sczsmf_config file or a copy of it to specify configuration parameters for the HA for Solaris Zones zone SMF component. For more information, see Specifying Configuration Parameters for the Zone SMF Resource.

  1. Go to the directory that contains the script for creating the HA for Solaris Zones SMF resource.
    # cd /opt/SUNWsczone/sczsmf/util
  2. Run the script that creates the zone SMF resource.
    # ./sczsmf_register -f /mypath/sczsmf_config
  3. Bring online the zone SMF resource.
    # clresource enable sczsmf-rs

Next Steps

Go to Verifying the HA for Solaris Zones and Configuration.