New xvm_config
  1 #
  2 # CDDL HEADER START
  3 #
  4 # The contents of this file are subject to the terms of the
  5 # Common Development and Distribution License (the License).
  6 # You may not use this file except in compliance with the License.
  7 #
  8 # You can obtain a copy of the license at usr/src/CDDL.txt
  9 # or http://www.opensolaris.org/os/licensing.
 10 # See the License for the specific language governing permissions
 11 # and limitations under the License.
 12 #
 13 # When distributing Covered Code, include this CDDL HEADER in each
 14 # file and include the License file at usr/src/CDDL.txt.
 15 # If applicable, add the following below this CDDL HEADER, with the
 16 # fields enclosed by brackets [] replaced with your own identifying
 17 # information: Portions Copyright [yyyy] [name of copyright owner]
 18 #
 19 # CDDL HEADER END
 20 #
 21 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 22 # Use is subject to license terms.
 23 #
 24 #ident   "@(#)xvm_config 1.1     08/11/19 SMI"
 25 #
 26 #
 27 # This file will be sourced in by xvm_register and the parameters
 28 # listed below will be used.
 29 #
 30 # These parameters can be customized in (key=value) form
 31 #
 32 #               RS - name of the resource for the xVM guest domain (required)
 33 #
 34 #               RG - name of the resource group to contain RS (required)
 35 #
 36 #           HAS_RS - name of the HAStoragePlus resource (optional)
 37 #
 38 #            LH_RS - name of the Logical Hostname resource (optional)
 39 #
 40 #               If you want to protect against all physical interfaces failing within
 41 #               an IPMP group then you must define a Logical Hostname resource and 
 42 #               specify that resource here.
 43 #
 44 #           DOMAIN - name of the xVM guest domain (required)
 45 #
 46 #     PLUGIN_PROBE - Script or command to check the guest domain (optional)
 47 #
 48 #               The optional parameter, PLUGIN_PROBE, provides the ability to check that the
 49 #                 domain has reached a working state or milestone. This script or command is
 50 #                 run under hatimerun conditions, meaning that if the script or command exceeds
 51 #                 the hatimerun timeout then hatimerun will kill the script or command. The 
 52 #                 hatimerun timeout is derived from PROBE_TIMEOUT and represents 90% of
 53 #                 PROBE_TIMEOUT.
 54 #
 55 #               The script or command must return one of the values below, else 100 will be assumed.
 56 #
 57 #                 0 - The domain is working
 58 #               100 - The domain should be restarted 
 59 #               201 - The domain has requested an immediate failover
 60 #
 61 #               Note: That return code 201, requires that this resource 
 62 #                 has an appropriate extension property value for
 63 #                 FAILOVER_MODE and FAILOVER_ENABLED=TRUE
 64 #
 65 #               For FAILOVER_MODE refer to the r_properties(5) man page.
 66 #
 67 #               While you are free to code your own probe, the following probe is provided
 68 #                  within /opt/SUNWscxvm/bin. 
 69 #
 70 #               ppkssh - This probe uses a one-way private/public key ssh authorization 
 71 #                  between Domain-0 and the guest domain. 
 72 #                  
 73 #                  Specifically, ppkssh requires the following input parameters in the form of
 74 #
 75 #                  -P USER:IDFILE:HOST:SERVICE:STATE
 76 #
 77 #                       - Guest domain's login name
 78 #                       - SSH identity file to use
 79 #                       - "runlevel" or SMF service name 
 80 #                       - Guest domain's hostname
 81 #                       - runlevel number or "online"
 82 #
 83 #                  for example, 
 84 #
 85 #       PLUGIN_PROBE="/opt/SUNWscxvm/bin/ppkssh -P fmuser:/export/fmuser/.ssh/id_dsa:vzodio2a:runlevel:3"
 86 #       PLUGIN_PROBE="/opt/SUNWscxvm/bin/ppkssh -P fmuser:/export/fmuser/.ssh/id_dsa:vzodio1a:multi-user-server:online"
 87 #
 88 #               Note: As mentioned above, the PLUGIN_PROBE is run under hatimerun conditions.  In this regard
 89 #                  you should be aware that a timeout value is passed to the PLUGIN_PROBE command or script, for example
 90 #                  
 91 #                  /usr/cluster/bin/hatimerun -t ${HATIMERUN_TIMEOUT} -k 9 ${PLUGIN_PROBE} ${HATIMERUN_TIMEOUT}
 92 #
 93 #               ${HATIMERUN_TIMEOUT} represents 90% of PROBE_TIMEOUT, and within your PLUGIN_PROBE command or script you 
 94 #                  can either use ${HATIMERUN_TIMEOUT} or ignore it, i.e. you just need to be aware that it is being passed
 95 #                  to your PLUGIN_PROBE command or script.
 96 #
 97 #         FAILOVER - type of failover to perform (required)
 98 #
 99 #               valid entry is "normal"|"migrate"|"migrate --live"
100 #               e.g.
101 #       
102 #               Failover="normal"
103 #                 o Stop the resource (shutdown the domain)
104 #                 o Failover the resource group from the source node to the target node
105 #                 o Start the resource (start the domain)
106 #
107 #               Failover="migrate"
108 #                 o Suspend the domain on the source node
109 #                 o Copy the domain's memory pages from the source node to the target node
110 #                 o Resume the domain on the target node
111 #
112 #               Failover="migrate --live"
113 #                 o Iteratively copy the domain's memory pages from the source node to the taregt node
114 #                 o When pre-copy is no longer benefical, suspend the domain on the source node
115 #                 o Copy the domain's remaning "dirty" pages from the source node to the taregt node
116 #                 o Resume the domain on the target node
117 #
118 #            ADMIN - path of the administrative directory (required)
119 #               
120 #               The administrative directory is used to store administrative files that are 
121 #                 used when defining the domain and to manage the correct state of the resource 
122 #                 when a migrate or live mirate is used. 
123 #
124 #
125 RS=
126 RG=
127 HAS_RS=
128 LH_RS=
129 DOMAIN=
130 PLUGIN_PROBE=""
131 FAILOVER=""
132 ADMIN=