Last updated on Monday 28th of February 2022 08:52:48 PM

©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.


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

chmod 0755 xsi-cmd


©XSIDirector depends on:

OpenSSH client

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 key=RSAkey1 hosts=group1 -y

The above command will install the package 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.


Example;22;root;mypassword;prod01;Production server;22;root;mypassword;prod02;22;root;mypassword;srv70;ESXi 7.0.1 server;22;root;mypassword;srv60;ESXi 6.0 server;22;root;someotherpwd;somesrv;22;root;mypassword;othersrv;Other server;22;root;mypassword;mysrv1;22;root;mypassword;priv01;My private description;22;root;mypassword;other02;Some other server;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

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.


./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 ( 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

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, 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 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=
./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 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.