Starting VCS Simulator from the command line interface

This topic describes how to start VCS simulator 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\.

Example: C:\DOS>set %VCS_SIMULATOR_HOME%=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
    

To simulate global clusters from the command line

  1. Install VCS Simulator in a directory (%VCS_SIMULATOR_HOME%) on your system.

    See the section Installing VCS Simulator in the Veritas Cluster Server Installation Guide.

  2. Set up the clusters on your system. Run the following command to add a cluster:
     %VCS_SIMULATOR_HOME%\bin> hasim -setupclus new_clustername -simport     
    port_no -wacport port_no

    Do not use default_clus as the cluster name when simulating a global cluster.

    VCS Simulator copies the sample configurations to the path %VCS_SIMULATOR_HOME%\clustername and creates a system named clustername_sys1.

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

    %VCS_SIMULATOR_HOME%\bin> hasim -setupclus clus_a -simport 15555  
    -wacport 15575

    Similarly, add the second cluster:

    %VCS_SIMULATOR_HOME%\bin> hasim -setupclus clus_b -simport 15556  
    -wacport 15576

    To create multiple clusters without simulating a global cluster environment, specify -1 for the wacport.

  3. Start the simulated clusters:
    %VCS_SIMULATOR_HOME%\bin> hasim -start clustername_sys1  
    -clus clustername
  4. Set the following environment variables to access VCS Simulator from the command line:

    • set %VCS_SIM_PORT%=port_number

    • set %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.

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

More Information

“To simulate global clusters from the command line”

About the Cluster Manager (Java Console)