Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 User's Guide   

Administering VCS Simulator from the Command Line

The functionality of the VCS Simulator command line interface mimics that of standard ha commands. Start VCS Simulator before creating or administering simulated clusters.

Starting VCS Simulator From the Command Line

  To start VCS Simulator from the command line (UNIX)

  1. To simulate a cluster running a particular operating system, copy the types.cf. file for the operating system from the types directory to /opt/VRTSsim/default_clus/conf/config/.

    For example, if the cluster to be simulated runs on the AIX platform, copy the file types.cf.aix.

  2. Add custom type definitions to the file, if required, and rename the file to types.cf.
  3. If you have a main.cf file to run in the simulated cluster, copy it to
    /opt/VRTSsim/default_clus/conf/config/.
  4. Start VCS Simulator:
     # sim_dir/hasim -start system_name

    The variable system_name represents a system name, as defined in the configuration file main.cf. This command starts Simulator on port 14153.

    For example, to start the default cluster:


     # sim_dir/hasim -start sys1

    Note that the default configuration includes system sys1.

  5. Add systems to the configuration, if desired:
     # sim_dir/hasim -sys -add system_name
     # sim_dir/hasim -up system_name
  6. Verify the states of each node in the cluster:
     # sim_dir/hasim -sys -state

Use the command line or the Java Console to manage the simulated cluster.


Note   Note    For instructions on simulating a global cluster environment, see To simulate global clusters from the command line.

  To start VCS Simulator from the command line (Windows)

VCS Simulator installs platform-specific types.cf files at the path %VCS_SIMULATOR_HOME%\types\. The variable %VCS_SIMULATOR_HOME% represents the Simulator installation directory, typically C:\Program Files\VERITAS\VCS Simulator\.

  1. To simulate a cluster running a particular operating system, copy the types.cf. file for the operating system from the types directory to %VCS_SIMULATOR_HOME%\default_clus\conf\config\. 

    For example, if the cluster to be simulated runs on the AIX platform, copy the file types.cf.aix.

  2. Add custom type definitions to the file, if required, and rename the file to types.cf.
  3. If you have a main.cf file to run in the simulated cluster, copy it to
    %VCS_SIMULATOR_HOME%\default_clus\conf\config\. 
  4. Start VCS Simulator:
    %VCS_SIMULATOR_HOME%\bin> hasim -start system_name

    The variable system_name represents a system name, as defined in the configuration file main.cf.

    This command starts Simulator on port 14153.

  5. Add systems to the configuration, if desired:
    %VCS_SIMULATOR_HOME%\bin> hasim -sys -add system_name
    %VCS_SIMULATOR_HOME%\bin> hasim -up system_name
  6. Verify the state of each node in the cluster:
    %VCS_SIMULATOR_HOME%\bin> hasim -sys -state
    Note   Note    For instructions on simulating a global cluster environment, see To simulate global clusters from the command line.

  To simulate global clusters from the command line

  1. Install VCS Simulator in a directory (sim_dir) on your system. For instructions, see Installing VCS Simulator.
  2. Set up the clusters on your system. Run the following command to add a cluster:
    sim_dir/hasim -setupclus clustername -simport 
      port_no -wacport      port_no
    Note   Note    Do not use default_clus as the cluster name when simulating a global cluster.

    VCS Simulator copies the sample configurations to the path sim_dir/clustername and creates a system named clustername_sys1.

    For example, to add cluster clus_a using ports 15555 and 15575, run the following command:


       # sim_dir/hasim -setupclus clus_a -simport 15555 -wacport 15575

    Similarly, add the second cluster:


       # sim_dir/hasim -setupclus clus_b -simport 15556 -wacport 15576
    Note   Note    To create multiple clusters without simulating a global cluster environment, specify -1 for the wacport.
  3. Start the simulated clusters:
       sim_dir/hasim -start clustername_sys1 -clus clustername 
  4. Set the following environment variables to access VCS Simulator from the command line:

    • VCS_SIM_PORT=port_number
    • VCS_SIM_WAC_PORT=wacport
    • Note that you must set these variables for each simulated cluster, otherwise Simulator always connects default_clus, the default cluster.

You can use the Java Console to link the clusters and to configure global service groups. See Administering the Cluster from Cluster Manager (Java Console) for more information.

You can also edit the configuration file main.cf manually to create the global cluster configuration.

Administering Simulated Clusters from the Command Line

The functionality of VCS Simulator commands mimic that of standard ha commands.

Command Description

hasim -start system_name

Starts VCS Simulator. The variable system_name represents the system that will transition from the LOCAL_BUILD state to RUNNING.

hasim -setupclus clustername -simport port_no
[-wacport
port_no]
[-sys systemname]

Creates a simulated cluster and associates the specified ports with the cluster.

hasim -start clustername_sys1
[-clus
clustername] [-disablel10n]

Starts VCS Simulator on the cluster specified by clustername.

If you start VCS Simulator with the -disablel10n option, the simulated cluster does not accept localized values for attributes. Use this option when simulating a UNIX configuration on a Windows system to prevent potential corruption when importing the simulated configuration to a UNIX cluster.

hasim -stop

Stops the simulation process.

hasim -poweroff system_name

Gracefully shuts down the system.

hasim -up system_name

Brings the system up.

hasim -fault system_name
  resource_name

Faults the specified resource on the specified system.

hasim -online system_name
  resource_name

Brings specified resource online. This command is useful if you have simulated a fault of a persistent resource and want to now simulate the fix.

hasim -faultcluster clustername

Simulates a cluster fault.

hasim -clearcluster clustername

Clears a simulated cluster fault.

hasim -getsimconfig cluster_name

Retrieves information about VCS Simulator ports.

hasim -hb [..]

Equivalent to standard hahb command.

hasim -disablel10n

Disables localized inputs for attribute values. Use this option when simulating UNIX configurations on Windows systems.

hasim -clus [...]

Equivalent to standard haclus command.

hasim -sys [...]

Equivalent to standard hasys command.

hasim -grp [...]

Equivalent to standard hagrp command.

hasim -res [...]

Equivalent to standard hares command.

hasim -type [...]

Equivalent to standard hatype command.

hasim -conf [...]

Equivalent to standard haconf command.

hasim -attr [...]

Equivalent to standard haattr command.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 User's Guide  
VERITAS Software Corporation
www.veritas.com