build_cluster.pl

Version 2

    This script create a cluster in a datacenter and auto-add the wanted hosts (up to 8 by default). There are the options of activate HA and DRS and to force the adding of the hosts. Also there is the option of create a resource pool in the cluster if wanted. Note: since the ssl thumbprint is retrieved with some ssl commands in pipes, the script should be launched from a bash shell. This script can be useful to auto-create a lab environment.

     

    Requirements:

    - vCenter installed

    - licenses installed

    - usernames/passwords of the hosts

    - hosts must not be connected to vCenter

    - datacenter can exists already in vCenter

    - cluster must not exist

    - bash shell must be used

     

     

     

    09/24/2010

     

    Version 1.1:

    - now is possible to create up to 4 resource pools and set for each resource pool limit,shares, reservation and expandable reservation of cpu and memory.

    - added some checks: the script abort if the cluster already exists;

    - if a host is already connected to the virtual center is removed from the list of hosts

    - some cleanups

     

    A command line example:

    ./build_cluster-1.1.pl --server vcenter.domain --username vcadmin --password secret  --dc_name datacenter_name --clu_name cluster_name --ha_enable true --host0_name esx0.domain --host0_user root --host0_pwd secret --rp0_name res_name --rp0_memlimit 4000 --rp0_cpushare 4000