multi-clone.py improvements & random-vmotion.py

multi-clone.py improvements & random-vmotion.py

For a project i needed a couple of tools, so i improved my multi-clone.py script and created a new script: random-vmotion.py

multi-clone.py: setting advanced configuration parameters

The multi-clone.py script is improved so you are able to set advanced configuration parameters of the created VMs, this can be used if you have other tools that need some metadata or configuration.

To accomplish this, you have to use the CSV feature. The fields in the CSV have been changed slightly in comparison with the previous version:

Fields indicated with <> are mandatory, fields indicated with [] can be left empty.

For a full documentation, you can visit the GitHub repository.

random-vmotion.py

For some testing i needed a script which would be able to vMotion a set of VMs randomly to a set of Hosts. This script does exactly that.

The script accepts a file which contains the names of the VMs to move, one per line:

It also accepts a file which contains the names of the Hosts to randomly move to, one per line:

In the default way of working, it will continue to vMotion the VMs to a random host over and over again. For example: if you use the files above with the command:

It will start moving the first VM to one of the two hosts, wait 30 seconds and do the same for the second VM, and so on. Once it moved the fourth VM, it will start again with the first one.

There are more options which provide extra functionality:

  • Option to move each VM only once
  • Option to work in threads
  • Option to decrease the interval

The full documentation can be found on the GitHub page and an overview of the options can be found below:

 

Tags: , , ,