The Xen cloud driver works with Citrix XenServer.
It can be used with a single XenServer or a XenServer resource pool.
This driver requires a copy of the freely available
XenAPI.py Python module.
Information about the Xen API Python module in the XenServer SDK can be found at https://pypi.org/project/XenAPI/
Place a copy of this module on your system. For example, it can be placed in the site packages location on your system.
The location of site packages can be determined by running:
python -m site --user-site
Xen requires login credentials to a XenServer.
Set up the provider cloud configuration file at
url option supports both
https uri prefixes.
A valid user id to login to the XenServer host.
The associated password for the user.
Changed in version 2015.8.0.
provider parameter in cloud provider definitions was renamed to
change was made to avoid confusion with the
provider parameter that is used in cloud profile
definitions. Cloud provider definitions now use
driver to refer to the Salt cloud module that
provides the underlying functionality to connect to a cloud host, while cloud profiles continue
provider to refer to provider configurations that you define.
Xen profiles require a
This will be the name of your defined provider.
The name of the VM template used to clone or copy.
The default behavior is to clone a template or VM. This is very fast,
but requires the source template or VM to be in the same storage
repository of the new target system. If the source and target are in
different storage repositories then you must copy the source and not
clone it by setting
The provisioning process will attempt to install the Salt minion
service on the new target system by default. This will require login
credentials for Salt cloud to login via ssh to it. The
password options are required. If
deploy is set to
then these options are not needed.
The name of the resource pool used for this profile.
The name of the storage repository for the target system.
If template is Windows, and running guest tools then a static ip address can be set.
If template is Windows, and running guest tools then a gateway can be set.
Set up an initial profile
/etc/salt/cloud.profiles or in the
# file: /etc/salt/cloud.profiles.d/xenprofiles.conf
storage_repo: 'Local storage'
The first example will create a clone of the sles12sp2-template in the same storage repository without deploying the Salt minion.
The second example will make a copy of the image and deploy a new suse VM with the Salt minion installed.
The third example will create a clone of the Windows 2012 template and deploy the Salt minion.
The profile can be used with a salt command:
salt-cloud -p suse xenvm02
This will create an salt minion instance named
xenvm02 in Xen. If the command was
executed on the salt-master, its Salt key will automatically be signed on the master.
Once the instance has been created with a salt-minion installed, connectivity to it can be verified with Salt:
salt xenvm02 test.version
Sizes can be obtained using the
--list-sizes option for the
# salt-cloud --list-sizes myxen
Since size information is build in a template this command is not implemented.
Images can be obtained using the
--list-images option for the
# salt-cloud --list-images myxen
This command will return a list of templates with details.
Locations can be obtained using the
--list-locations option for the
# salt-cloud --list-locations myxen
Returns a list of resource pools.