Top
PRIMECLUSTER Global Link Services Configuration and AdministrationGuide 4.3Redundant Line Control Function

C.5.1 Setting up the virtual network on the host OS

Set up the virtual network of the virtual machine function on the host OS. The virtual network is set only for one NIC when the operating system is installed (default). To establish a highly reliable network, set the virtual network to use multiple NICs. For details, see the RHEL manuals.

  1. Create a shell script for creating the virtual bridge, and set so that GLS-specific scripts are executed in the following order.

    • Creating the virtual bridge

      Set so that the GLS-specific stop script (/opt/FJSVhanet/local/sbin/hanetxen stop) is executed before the virtual bridge is created (op_start) and the GLS-specific start script (/opt/FJSVhanet/local/sbin/hanetxen start) is executed after the virtual bridge is created.

    • Deleting the virtual bridge

      Set so that the GLS-specific stop script is executed before the virtual bridge is deleted (op_stop).

    The following is a setting example in which the name of the shell script to be created is network-bridge-gls.

    • /etc/xen/scripts/network-bridge-gls

      #!/bin/sh
      #
      # Sample of Create/Delete virtual bridge
      #
      # $1 start : Create virtual bridge
      #    stop  : Delete virtual bridge
      #    status: Display virtual bridge information
      
      # Exit if anything goes wrong
      #set -e
      
      command=$1
      xenscript=/etc/xen/scripts/network-bridge
      glsxenscript=/opt/FJSVhanet/local/sbin/hanetxen
      
      # op_start:subscript for start operation #
      op_start () {
               $xenscript $command vifnum=0 netdev=eth0
               $xenscript $command vifnum=1 netdev=eth1
      }
      
      # op_stop:subscript for stop operation #
      op_stop () {
               # same operation as start
               op_start
      }
      
      case "$command" in
               start)
                        # Create your virtual bridge
                        $glsxenscript stop
                        op_start
                        $glsxenscript start
               ;;
      
               stop)
                        # Delete virtual bridge
                        $glsxenscript stop
                        op_stop
               ;;
      
               status)
                        # display virtual bridge information
                        $xenscript status
               ;;
      
               *)
                        echo "Unknown command: $command" >&2
                        echo 'Valid commands are: start, stop, status' >&2
                        exit 1
      
      esac

    Information

  2. Save the created script in "/etc/xen/scripts".

    # cp network-bridge-gls /etc/xen/scripts
    # cd /etc/xen/scripts
    # chmod +x network-bridge-gls
  3. Register with the xend service.

    Edit the "network-script" parameter in the configuration file (/etc/xen/xend-config.sxp) of the xend service. "network-bridge" is set for the "network-script" parameter. Rename it to the name of the script you created.

    # Your default ethernet device is used as the outgoing interface, by default.
    # To use a different one (e.g. eth1) use
    #
    # (network-script 'network-bridge netdev=eth1')
    #
    # The bridge is named xenbr0, by default.  To rename the bridge, use
    #
    # (network-script 'network-bridge bridge=<name>')
    #
    # It is possible to use the network-bridge script in more complicated
    # scenarios, such as having two outgoing interfaces, with two bridges, and
    # two fake interfaces per guest domain.  To do things like this, write
    # yourself a wrapper script, and call network-bridge from it, as appropriate.
    #
    (network-script network-bridge-gls)

Note

If you create five virtual bridges or more, add the following setting in /etc/modprobe.conf. For details, see the RHEL manuals. The following is an example for creating six virtual bridges.

# options netloop nloopbacks=6