Registered users
Linkedin Twitter Google+
Close

In order to improve user's experience and to enable some functionalities by tracking the user accross the website, this website uses its own cookies and from third parties, like Google Analytics and other similar activity tracking software. Read the Privacy Policy
33HOPS, IT Consultants Download XSIBackup
33HOPS ::: Proveedores de Soluciones Informáticas :: Madrid :+34 91 930 98 66Avda. Castilla la Mancha, 95 - local posterior - 28700 S.S. de los Reyes - MADRID33HOPS, Sistemas de Informacion y Redes, S.L.Info

©XSIDirector Man Page, ©VMWare ©ESXi Farm Management

Centralized ©ESXi Farm Management for ©XSIBackup-DC

This software is designed for Linux! This software has been designed for Linux, it won't run in ©ESXi


Manage groups of ©ESXi hosts from a centralized command line tool. ©XSIDirector allows to deploy ©XSIBackup-DC software to any number of servers, manage keys and licensing per server groups, run any command in all servers in a group, copy files to all servers, run backup & replica jobs and much more.

Its use is based in keys and hosts lists. You can grant access to any host group by means of one or more RSA keys, since you have configured access for a given key, you can run software installs license management, copy files or run any arbitrary command in all the hosts to simplify management of a vast number of ©ESXi boxes.

Installation

To install just unzip to any Linux host and assign execute permissions to xsi-cmd.

chmod 0755 xsi-cmd

Dependencies

©XSIDirector depends on:

sshpass
OpenSSH client
dialog

A dependency check is run on every execution, you will be pointed out if any of the dependencies is missing and how to install it.

An ©XSIDirector command looks like the following.

./xsi-cmd install=XSIBackup-DC_1.5.0.4.zip key=RSAkey1 hosts=group1 -y

The above command will install the package XSIBackup-DC_1.5.0.4.zip stored in the bin directory to all the hosts in the list group1 using the key RSAkey1 and will not prompt for confirmation by virtue of the -y argument.

But before being able to run any command you need to first generate at least a key pair and prepare a hosts list.

Server list format

The server list files are semicolon delimited CSV files ending in line feed characters char(10) containing the following fields.

IP/FQDN;port;username;password;hostname;comment\n


Example

192.168.33.181;22;root;mypassword;prod01;Production server
192.168.33.190;22;root;mypassword;prod02
192.168.33.183;22;root;mypassword;srv70;ESXi 7.0.1 server
192.168.33.160;22;root;mypassword;srv60;ESXi 6.0 server
192.168.33.12;22;root;someotherpwd;somesrv
192.168.133.11;22;root;mypassword;othersrv;Other server
192.168.133.19;22;root;mypassword;mysrv1
192.168.133.18;22;root;mypassword;priv01;My private description
192.168.133.16;22;root;mypassword;other02;Some other server
192.168.233.125;22;root;yetanotherpwd;yeti01

You can have as many hosts files as you want in the <installation root>/csv folder ready to be invoked from the command line.

RSA Keys

The RSA key pairs allow to authenticate to the different hosts in a group without the need to enter the password for each one of them.

You can generate as many keys as you want, being the simplest scenario that one formed by a single RSA key that allows to authenticate to a single hosts file comprised of 'n' hosts.

Generate a key pair

To generate a key pair you just have to use the key-gen action (action or first argument).

./xsi-cmd key-gen

You will be asked to enter a name for the new key and to confirm. Once you are done, you will see a new key pair in the keys directory.

-rw------- 1 root root 1675 May 5 19:17 key1_RSA_xsi-deploy
-rw------- 1 root root 395 May 5 19:17 key1_RSA_xsi-deploy.pub

The name of the key is the highlighted part before the first underscore character and it is the string you will have to manage to refer to each key. Each set of keys is comprised by a public key (.pub) and a private key. The public key is the one that will be exchanged with the remote host and will be added to the remote host/user authorized_keys file to allow transparent communication.

Distribute the key pair to the remote hosts

Before you have exchanged keys, the only way to authenticate with the remote hosts is the password, generally the root password. Thus, the first key exchange with a group of hosts will be made by means of the stored password. Once the key has been exchaged you will no longer need the password column, thus, you can just obfuscate it or remove it from the corresponding hosts group file.

To distribute a public key to a group of hosts you use the keys argument, which allows three different values passed to it after an equal sign: add, delete and dry-run.
- add: it will add the provided key to a list of hosts.
- delete: deletes some key from a group of hosts.
- dry-run: just checks for the existence of the authorized_keys file and its permissions.

Examples

./xsi-cmd keys=add key=key1 hosts=group1
./xsi-cmd keys=delete key=key1 hosts=group1
./xsi-cmd keys=dry-run key=key1 hosts=group1


Run any remote GUI

Once you have added some key to a group of hosts you can invoke any remote GUI in any host in a group of hosts.

./xsi-cmd gui key=key hosts=group1


List of remote hosts GUI


Run some command in a group of hosts

The cmd action allows to run some command synchronously in a given group of hosts. The action is synchronous as it waits for the result of the command and prints out the result before moving to the following host in the file.

It has three main working modes:
1/ Using one of the built-in commands.
2/ Passing a custom command to the cmd action or when asked.
3/ Passing a command file in the cmd/src directory prepended by file:
Running a built-in command.

There are a number of built-in commands you can use to run common maintenance tasks:
• setHostName

./xsi-cmd cmd=setHostName key=test1 hosts=test1 -y

Sets the host name as set in the 5th column of the hosts file. You will be asked whether you want a DNS suffix to append to the host name. If you leave the the suffix prompt blank the hostname as set in the hosts file will be applied to the host, that may include a custom suffix in the hostname column of the hosts file.

• setNTPTime

./xsi-cmd cmd=setNTPTime key=test1 hosts=test1 -y

Sets the NTP client. You will be asked to enter some comma delimited list of NTP servers or to accept the default one (pool.ntp.org). This command will set those servers with default options in the /etc/ntp.conf file and restart the NTP client.

• resetNTPTime

./xsi-cmd cmd=resetNTPTime key=test1 hosts=test1 -y

Resets the NTP client. Creates a default /etc/ntp.conf file, like the one created by the ©ESXi installation and restarts the NTP client. Will remove any previous NTP information in the /etc/ntp.conf file.


Running a custom command.

./xsi-cmd cmd=date key=key1 hosts=group1
./xsi-cmd cmd=file:job-backup-running.sh
./xsi-cmd cmd=file:job-backup-all.sh


The first command above will execute the date command to every host in group1 using RSA key key1.
The second command will execute the bundled script job-backup-running.sh, which will install job 902 to every host which will backup all running VMs. The thrid command will backup all VMs whether they are running or not as job 901.

Please, note that this bundled scripts are generic. They don't pretend to match your exact needs automatically. Tweak them to your needs or add your own ones. Take on account that this generic scripts will automatically choose a backup point based on the available space in each NFS datastore. If you don't have any NFS DS available they may not work. Just edit them and add your desired targets.


Install software and keys

The install action will allow to deploy the software and install license keys. It has three basic subcommands.

./xsi-cmd install=XSIBackup-DC_1.5.0.4.zip key=key1 hosts=group1 -y
./xsi-cmd install=request-keys
./xsi-cmd install=download-keys key=test1 hosts=test1


The first example above will install the package in the <install root>/bin directory to every host in group1 using key1 and it won't ask for confirmation.

The second example will create the request.key files in every host, download them to the <install root>/keys/xsi/requests directory and optionally upload them to our license server.

The third command will download the license.key files once they have been generated by us, install them to every ©ESXi host and verify that they are working right. In this last example we have set the key and hosts arguments, thus we won't be asked for a key name or hosts file.


Run jobs or other scripts asynchronously

The run action allows to launch scripts in some hosts list without waiting for them to finish. They are launched in the background in every host and a confirmation that the script was launched is printed out, then xsi-cmd will continue to the following host.

./xsi-cmd run=/scratch/XSI/XSIBackup-DC/etc/jobs/902 hosts=192.168.133.197
./xsi-cmd run=/scratch/XSI/XSIBackup-DC/etc/jobs/902 hosts=group1 key=key1


The first command above executes the 'backup all running VMs' job at host 192.168.133.197 and exits.
The second command executes the same job at every host in the group1 file using the key1 key.


Copy files to hosts

The put action allows to copy files to every host in a list of hosts. One very typical case in which you will want to use this argument is to distribute some smtpsrvs.conf file to all hosts. You would first need to create that file at any of the hosts, copy it to the <install root>/files directory and run a put command like the one below.

./xsi-cmd put="files/smtpsrvs.conf" target="/scratch/XSI/XSIBackup-DC/etc/smtpsrvs.conf"
./xsi-cmd put="files/smtpsrvs.conf" target="/scratch/XSI/XSIBackup-DC/etc/smtpsrvs.conf" hosts=group1 key=key1


As always you can let the command prompt to ask you for the key and hosts file or pass them along the rest of the command.
This page was last modified on 2021-05-28



Website Map
Resources & help
33HOPS Forum
Index of Docs

©33HOPS site relies on the following technologies and partners:
SSL Protocol PayPal Payment Gateway Stripe Payment Gateway

©33HOPS Sistemas de Información y Redes, S.L. | VAT No: ESB83583716 | Avda. Castilla la Mancha, 95, local posterior, 28701 San Sebastián e los Reyes (Madrid) Spain



Fill in to download
The download link will be sent to your e-mail.
Name
Lastname
E-mail


            Read our Privacy Policy

(*) DC & Pro users, please login to your user area to download