XenServer Administrator's Guide

Release 5.5.0 Update 2

Table of Contents

1. Document Overview
1.1. How this Guide relates to other documentation
2. XenServer hosts and resource pools
2.1. Hosts and resource pools overview
2.2. Requirements for creating resource pools
2.3. Creating a resource pool
2.4. Adding shared storage
2.5. Installing and managing VMs on shared storage
2.6. Removing a XenServer host from a resource pool
2.7. High Availability
2.7.1. HA Overview
2.7.2. Configuration Requirements
2.7.3. Restart priorities
2.8. Enabling HA on a XenServer pool
2.8.1. Enabling HA using the CLI
2.8.2. Removing HA protection from a VM using the CLI
2.8.3. Recovering an unreachable host
2.8.4. Shutting down a host when HA is enabled
2.8.5. Shutting down a VM when it is protected by HA
2.9. Authenticating users using Active Directory (AD)
2.9.1. Configuring Active Directory authentication
2.9.2. User authentication
2.9.3. Removing access for a user
2.9.4. Leaving an AD domain
3. Storage
3.1. Storage Overview
3.1.1. Storage Repositories (SRs)
3.1.2. Virtual Disk Images (VDIs)
3.1.3. Physical Block Devices (PBDs)
3.1.4. Virtual Block Devices (VBDs)
3.1.5. Summary of Storage objects
3.1.6. Virtual Disk Data Formats
3.2. Storage configuration
3.2.1. Creating Storage Repositories
3.2.2. Upgrading LVM storage from XenServer 5.0 or earlier
3.2.3. LVM performance considerations
3.2.4. Converting between VDI formats
3.2.5. Probing an SR
3.2.6. Storage Multipathing
3.3. Storage Repository Types
3.3.1. Local LVM
3.3.2. Local EXT3 VHD
3.3.3. udev
3.3.4. ISO
3.3.5. EqualLogic
3.3.6. NetApp
3.3.7. Software iSCSI Support
3.3.8. Managing Hardware Host Bus Adapters (HBAs)
3.3.9. LVM over iSCSI
3.3.10. NFS VHD
3.3.11. LVM over hardware HBA
3.3.12. Citrix StorageLink Gateway (CSLG) SRs
3.4. Managing Storage Repositories
3.4.1. Destroying or forgetting a SR
3.4.2. Introducing an SR
3.4.3. Resizing an SR
3.4.4. Converting local Fibre Channel SRs to shared SRs
3.4.5. Moving Virtual Disk Images (VDIs) between SRs
3.4.6. Adjusting the disk IO scheduler
3.5. Virtual disk QoS settings
4. Networking
4.1. XenServer networking overview
4.1.1. Network objects
4.1.2. Networks
4.1.3. VLANs
4.1.4. NIC bonds
4.1.5. Initial networking configuration
4.2. Managing networking configuration
4.2.1. Creating networks in a standalone server
4.2.2. Creating networks in resource pools
4.2.3. Creating VLANs
4.2.4. Creating NIC bonds on a standalone host
4.2.5. Creating NIC bonds in resource pools
4.2.6. Configuring a dedicated storage NIC
4.2.7. Controlling Quality of Service (QoS)
4.2.8. Changing networking configuration options
4.2.9. NIC/PIF ordering in resource pools
4.3. Networking Troubleshooting
4.3.1. Diagnosing network corruption
4.3.2. Recovering from a bad network configuration
5. Workload Balancing
5.1. Workload Balancing Overview
5.1.1. Workload Balancing Basic Concepts
5.2. Designing Your Workload Balancing Deployment
5.2.1. Deploying One Server
5.2.2. Planning for Future Growth
5.2.3. Increasing Availability
5.2.4. Multiple Server Deployments
5.2.5. Workload Balancing Security
5.3. Workload Balancing Installation Overview
5.3.1. Workload Balancing System Requirements
5.3.2. Workload Balancing Data Store Requirements
5.3.3. Operating System Language Support
5.3.4. Preinstallation Considerations
5.3.5. Installing Workload Balancing
5.4. Windows Installer Commands for Workload Balancing
5.4.1. ADDLOCAL
5.4.2. CERT_CHOICE
5.4.3. CERTNAMEPICKED
5.4.4. DATABASESERVER
5.4.5. DBNAME
5.4.6. DBUSERNAME
5.4.7. DBPASSWORD
5.4.8. EXPORTCERT
5.4.9. EXPORTCERT_FQFN
5.4.10. HTTPS_PORT
5.4.11. INSTALLDIR
5.4.12. PREREQUISITES_PASSED
5.4.13. RECOVERYMODEL
5.4.14. USERORGROUPACCOUNT
5.4.15. WEBSERVICE_USER_CB
5.4.16. WINDOWS_AUTH
5.5. Initializing and Configuring Workload Balancing
5.5.1. Initialization Overview
5.5.2. To initialize Workload Balancing
5.5.3. To edit the Workload Balancing configuration for a pool
5.5.4. Authorization for Workload Balancing
5.5.5. Configuring Antivirus Software
5.5.6. Changing the Placement Strategy
5.5.7. Changing the Performance Thresholds and Metric Weighting
5.6. Accepting Optimization Recommendations
5.6.1. To accept an optimization recommendation
5.7. Choosing an Optimal Server for VM Initial Placement, Migrate, and Resume
5.7.1. To start a virtual machine on the optimal server
5.8. Entering Maintenance Mode with Workload Balancing Enabled
5.8.1. To enter maintenance mode with Workload Balancing enabled
5.9. Working with Workload Balancing Reports
5.9.1. Introduction
5.9.2. Types of Workload Balancing Reports
5.9.3. Using Workload Balancing Reports for Tasks
5.9.4. Creating Workload Balancing Reports
5.9.5. Generating Workload Balancing Reports
5.9.6. Workload Balancing Report Glossary
5.10. Administering Workload Balancing
5.10.1. Disabling Workload Balancing on a Resource Pool
5.10.2. Reconfiguring a Resource Pool to Use Another WLB Server
5.10.3. Uninstalling Workload Balancing
5.11. Troubleshooting Workload Balancing
5.11.1. General Troubleshooting Tips
5.11.2. Error Messages
5.11.3. Issues Installing Workload Balancing
5.11.4. Issues Initializing Workload Balancing
5.11.5. Issues Starting Workload Balancing
5.11.6. Workload Balancing Connection Errors
5.11.7. Issues Changing Workload Balancing Servers
6. Backup and recovery
6.1. Backups
6.2. Full metadata backup and disaster recovery (DR)
6.2.1. DR and metadata backup overview
6.2.2. Backup and restore using xsconsole
6.2.3. Moving SRs between hosts and Pools
6.2.4. Using Portable SRs for Manual Multi-Site Disaster Recovery
6.3. VM Snapshots
6.3.1. Regular Snapshots
6.3.2. Quiesced Snapshots
6.3.3. Taking a VM snapshot
6.3.4. VM Rollback
6.4. Coping with machine failures
6.4.1. Member failures
6.4.2. Master failures
6.4.3. Pool failures
6.4.4. Coping with Failure due to Configuration Errors
6.4.5. Physical Machine failure
7. Monitoring and managing XenServer
7.1. Alerts
7.1.1. Customizing Alerts
7.1.2. Configuring Email Alerts
7.2. Custom Fields and Tags
7.3. Custom Searches
7.4. Determining throughput of physical bus adapters
8. Command line interface
8.1. Basic xe syntax
8.2. Special characters and syntax
8.3. Command types
8.3.1. Parameter types
8.3.2. Low-level param commands
8.3.3. Low-level list commands
8.4. xe command reference
8.4.1. Bonding commands
8.4.2. CD commands
8.4.3. Console commands
8.4.4. Event commands
8.4.5. Host (XenServer host) commands
8.4.6. Log commands
8.4.7. Message commands
8.4.8. Network commands
8.4.9. Patch (update) commands
8.4.10. PBD commands
8.4.11. PIF commands
8.4.12. Pool commands
8.4.13. Storage Manager commands
8.4.14. SR commands
8.4.15. Task commands
8.4.16. Template commands
8.4.17. Update commands
8.4.18. User commands
8.4.19. VBD commands
8.4.20. VDI commands
8.4.21. VIF commands
8.4.22. VLAN commands
8.4.23. VM commands
8.4.24. Workload Balancing commands
9. Troubleshooting
9.1. XenServer host logs
9.1.1. Sending host log messages to a central server
9.2. XenCenter logs
9.3. Troubleshooting connections between XenCenter and the XenServer host
Index

This document is a system administrator's guide to XenServer™, the platform virtualization solution from Citrix®. It describes the tasks involved in configuring a XenServer deployment -- in particular, how to set up storage, networking and resource pools, and how to administer XenServer hosts using the xe command line interface (CLI).

This section summarizes the rest of the guide so that you can find the information you need. The following topics are covered:

  • XenServer hosts and resource pools
  • XenServer storage configuration
  • XenServer network configuration
  • XenServer workload balancing
  • XenServer backup and recovery
  • Monitoring and managing XenServer
  • XenServer command line interface
  • XenServer troubleshooting
  • XenServer resource allocation guidelines

This chapter describes how resource pools can be created through a series of examples using the xe command line interface (CLI). A simple NFS-based shared storage configuration is presented and a number of simple VM management examples are discussed. Procedures for dealing with physical node failures are also described.

A resource pool is an aggregate of one or more homogeneous XenServer hosts, up to a maximum of 16. The definition of homogeneous is:

The software will enforce additional constraints when joining a server to a pool – in particular:

You must also check that the clock of the host joining the pool is synchronized to the same time as the pool master (for example, by using NTP), that its management interface is not bonded (you can configure this once the host has successfully joined the pool), and that its management IP address is static (either configured on the host itself or by using an appropriate configuration on your DHCP server).

XenServer hosts in resource pools may contain different numbers of physical network interfaces and have local storage repositories of varying size. In practice, it is often difficult to obtain multiple servers with the exact same CPUs, and so minor variations are permitted. If you are sure that it is acceptable in your environment for hosts with varying CPUs to be part of the same resource pool, then the pool joining operation can be forced by passing a --force parameter.

Although not a strict technical requirement for creating a resource pool, the advantages of pools (for example, the ability to dynamically choose on which XenServer host to run a VM and to dynamically move a VM between XenServer hosts) are only available if the pool has one or more shared storage repositories. If possible, postpone creating a pool of XenServer hosts until shared storage is available. Once shared storage has been added, Citrix recommends that you move existing VMs whose disks are in local storage into shared storage. This can be done using the xe vm-copy command or XenCenter.

Resource pools can be created using either the XenCenter management console or the CLI. When you join a new host to a resource pool, the joining host synchronizes its local database with the pool-wide one, and inherits some settings from the pool:

The following example shows how to install a Debian Linux VM using the Debian Etch 4.0 template provided with XenServer.

Installing a Debian Etch (4.0) VM

  1. Open a console on any host in the pool.
  2. Use the sr-list command to find the UUID of your shared storage:
    xe sr-list
  3. Create the Debian VM by issuing the command
    xe vm-install template="Debian Etch 4.0" new-name-label=<etch> \
    sr_uuid=<shared_storage_uuid>
    When the command completes, the Debian VM will be ready to start.
  4. Start the Debian VM with the command
    xe vm-start vm=<etch>
    The master will choose a XenServer host from the pool to start the VM. If the on parameter is provided, the VM will start on the specified XenServer host. If the requested XenServer host is unable to start the VM, the command will fail. To request that a VM is always started on a particular XenServer host, set the affinity parameter of the VM to the UUID of the desired XenServer host using the xe vm-param-set command. Once set, the system will start the VM there if it can; if it cannot, it will default to choosing from the set of possible XenServer hosts.
  5. You can use XenMotion to move the Debian VM to another XenServer host with the command
    xe vm-migrate vm=<etch> host=<host_name> --live
    XenMotion keeps the VM running during this process to minimize downtime.

    Note

    When a VM is migrated, the domain on the original hosting server is destroyed and the memory that VM used is zeroed out before Xen makes it available to new VMs. This ensures that there is no information leak from old VMs to new ones. As a consequence, it is possible that sending multiple near-simultaneous commands to migrate a number of VMs, when near the memory limit of a server (for example, a set of VMs consuming 3GB migrated to a server with 4GB of physical memory), the memory of an old domain might not be scrubbed before a migration is attempted, causing the migration to fail with a HOST_NOT_ENOUGH_FREE_MEMORY error. Inserting a delay between migrations should allow Xen the opportunity to successfully scrub the memory and return it to general use.

This section explains the XenServer implementation of virtual machine high availability (HA), and how to configure it using the xe CLI.

When HA is enabled, XenServer continually monitors the health of the hosts in a pool. The HA mechanism automatically moves protected VMs to a healthy host if the current VM host fails. Additionally, if the host that fails is the master, HA selects another host to take over the master role automatically, meaning that you can continue to manage the XenServer pool.

To absolutely guarantee that a host is unreachable, a resource pool configured for high-availability uses several heartbeat mechanisms to regularly check up on hosts. These heartbeats go through both the storage interfaces (to the Heartbeat SR) and the networking interfaces (over the management interfaces). Both of these heartbeat routes can be multi-homed for additional resilience to prevent false positives.

XenServer dynamically maintains a failover plan for what to do if a set of hosts in a pool fail at any given time. An important concept to understand is the host failures to tolerate value, which is defined as part of HA configuration. This determines the number of failures that is allowed without any loss of service. For example, if a resource pool consisted of 16 hosts, and the tolerated failures is set to 3, the pool calculates a failover plan that allows for any 3 hosts to fail and still be able to restart VMs on other hosts. If a plan cannot be found, then the pool is considered to be overcommitted. The plan is dynamically recalculated based on VM lifecycle operations and movement. Alerts are sent (either through XenCenter or e-mail) if changes (for example the addition on new VMs to the pool) cause your pool to become overcommitted.

To use the HA feature, you need:

For a VM to be protected by the HA feature, it must be agile. This means that:

Citrix strongly recommends the use of a bonded management interface on the servers in the pool if HA is enabled, and multipathed storage for the heartbeat SR.

If you create VLANs and bonded interfaces from the CLI, then they may not be plugged in and active despite being created. In this situation, a VM can appear to be not agile, and cannot be protected by HA. If this occurs, use the CLI pif-plug command to bring the VLAN and bond PIFs up so that the VM can become agile. You can also determine precisely why a VM is not agile by using the xe diagnostic-vm-status CLI command to analyze its placement constraints, and take remedial action if required.

Virtual machines are assigned a restart priority and a flag that indicates whether they should be protected by HA or not. When HA is enabled, every effort is made to keep protected virtual machines live. If a restart priority is specified, any protected VM that is halted will be started automatically. If a server fails then the VMs on it will be started on another server.

The possible restart priorities are:

The restart priorities determine the order in which VMs are restarted when a failure occurs. In a given configuration where a number of server failures greater than zero can be tolerated (as indicated in the HA panel in the GUI, or by the ha-plan-exists-for field on the pool object on the CLI), the VMs that have restart priorities 1, 2 or 3 are guaranteed to be restarted given the stated number of server failures. VMs with a best-effort priority setting are not part of the failover plan and are not guaranteed to be kept running, since capacity is not reserved for them. If the pool experiences server failures and enters a state where the number of tolerable failures drops to zero, the protected VMs will no longer be guaranteed to be restarted. If this condition is reached, a system alert will be generated. In this case, should an additional failure occur, all VMs that have a restart priority set will behave according to the best-effort behavior.

If a protected VM cannot be restarted at the time of a server failure (for example, if the pool was overcommitted when the failure occurred), further attempts to start this VM will be made as the state of the pool changes. This means that if extra capacity becomes available in a pool (if you shut down a non-essential VM, or add an additional server, for example), a fresh attempt to restart the protected VMs will be made, which may now succeed.

HA can be enabled on a pool using either XenCenter or the command-line interface. In either case, you will specify a set of priorities that determine which VMs should be given highest restart priority when a pool is overcommitted.

XenServer supports the authentication of users through AD. This makes it easier to control access to XenServer hosts. Active Directory users can use the xe CLI (passing appropriate -u and -pw arguments) and also connect to the host using XenCenter. Authentication is done on a per-resource pool basis.

Access is controlled by the use of subjects. A subject in XenServer maps to an entity on your directory server (either a user or a group). When external authentication is enabled, the credentials used to create a session are first checked against the local root credentials (in case your directory server is unavailable) and then against the subject list. To permit access, you must create a subject entry for the person or group you wish to grant access to. This can be done using XenCenter or the xe CLI.

XenServer supports use of Active Directory servers using Windows 2003 or later.

For external authentication using Active Directory to be successful, it is important that the clocks on your XenServer hosts are synchronized with those on your Active Directory server. When XenServer joins the Active Directory domain, this will be checked and authentication will fail if there is too much skew between the servers.

When configuring Active Directory authentication for a XenServer host, the same DNS servers should be used for both the Active Directory server (and have appropriate configuration to allow correct interoperability) and XenServer host (note that in some configurations, the active directory server may provide the DNS itself). This can be achieved either using DHCP to provide the IP address and a list of DNS servers to the XenServer host, or by setting values in the PIF objects or using the installer if a manual static configuration is used.

Citrix recommends enabling DCHP to broadcast host names. In particular, the host names localhost or linux should not be assigned to hosts. Host names must consist solely of no more than 156 alphanumeric characters, and may not be purely numeric.

To allow a user access to your XenServer host, you must add a subject for that user or a group that they are in. (Transitive group memberships are also checked in the normal way, for example: adding a subject for group A, where group A contains group B and user 1 is a member of group B would permit access to user 1.) If you wish to manage user permissions in Active Directory, you could create a single group that you then add and remove users to/from; alternatively, you can add and remove individual users from XenServer, or a combination of users and groups as your would be appropriate for your authentication requirements. The subject list can be managed from XenCenter or using the CLI as described below.

When authenticating a user, the credentials are first checked against the local root account, allowing you to recover a system whose AD server has failed. If the credentials (i.e. username then password) do not match/authenticate, then an authentication request is made to the AD server – if this is successful the user's information will be retrieved and validated against the local subject list, otherwise access will be denied. Validation against the subject list will succeed if the user or a group in the transitive group membership of the user is in the subject list.

Once a user is authenticated, they will have access to the server until they end their session, or another user terminates their session. Removing a user from the subject list, or removing them from a group that is in the subject list, will not automatically revoke any already-authenticated sessions that the user has; this means that they may be able to continue to access the pool using XenCenter or other API sessions that they have already created. In order to terminate these sessions forcefully, XenCenter and the CLI provide facilities to terminate individual sessions, or all currently active sessions. See the XenCenter help for more information on procedures using XenCenter, or below for procedures using the CLI.

This chapter discusses the framework for storage abstractions. It describes the way physical storage hardware of various kinds is mapped to VMs, and the software objects used by the XenServer host API to perform storage-related tasks. Detailed sections on each of the supported storage types include procedures for creating storage for VMs using the CLI, with type-specific device configuration options, generating snapshots for backup purposes and some best practices for managing storage in XenServer host environments. Finally, the virtual disk QoS (quality of service) settings are described.

This section explains what the XenServer storage objects are and how they are related to each other.

XenServer defines a container called a storage repository (SR) to describe a particular storage target, in which Virtual Disk Images (VDIs) are stored. A VDI is a disk abstraction which contains the contents of a virtual disk.

The interface to storage hardware allows VDIs to be supported on a large number of SR types. The XenServer SR is very flexible, with built-in support for IDE, SATA, SCSI and SAS drives locally connected, and iSCSI, NFS, SAS and Fibre Channel remotely connected. The SR and VDI abstractions allow advanced storage features such as sparse provisioning, VDI snapshots, and fast cloning to be exposed on storage targets that support them. For storage subsystems that do not inherently support advanced operations directly, a software stack is provided based on Microsoft's Virtual Hard Disk (VHD) specification which implements these features.

Each XenServer host can use multiple SRs and different SR types simultaneously. These SRs can be shared between hosts or dedicated to particular hosts. Shared storage is pooled between multiple hosts within a defined resource pool. A shared SR must be network accessible to each host. All hosts in a single resource pool must have at least one shared SR in common.

SRs are storage targets containing virtual disk images (VDIs). SR commands provide operations for creating, destroying, resizing, cloning, connecting and discovering the individual VDIs that they contain.

A storage repository is a persistent, on-disk data structure. For SR types that use an underlying block device, the process of creating a new SR involves erasing any existing data on the specified storage target. Other storage types such as NFS, Netapp, Equallogic and StorageLink SRs, create a new container on the storage array in parallel to existing SRs.

CLI operations to manage storage repositories are described in Section 8.4.14, “SR commands”.

In general, there are three types of mapping of physical storage to a VDI:

VHD files may be chained, allowing two VDIs to share common data. In cases where a VHD-backed VM is cloned, the resulting VMs share the common on-disk data at the time of cloning. Each proceeds to make its own changes in an isolated copy-on-write (CoW) version of the VDI. This feature allows VHD-based VMs to be quickly cloned from templates, facilitating very fast provisioning and deployment of new VMs.

The VHD format used by LVM-based and File-based SR types in XenServer uses sparse provisioning. The image file is automatically extended in 2MB chunks as the VM writes data into the disk. For File-based VHD, this has the considerable benefit that VM image files take up only as much space on the physical storage as required. With LVM-based VHD the underlying logical volume container must be sized to the virtual size of the VDI, however unused space on the underlying CoW instance disk is reclaimed when a snapshot or clone occurs. The difference between the two behaviours can be characterised in the following way:

When cloning VMs based off a single VHD template, each child VM forms a chain where new changes are written to the new VM, and old blocks are directly read from the parent template. If the new VM was converted into a further template and more VMs cloned, then the resulting chain will result in degraded performance. XenServer supports a maximum chain length of 30, but it is generally not recommended that you approach this limit without good reason. If in doubt, you can always "copy" the VM using XenServer or the vm-copy command, which resets the chain length back to 0.

This section covers creating storage repository types and making them available to a XenServer host. The examples provided pertain to storage configuration using the CLI, which provides the greatest flexibility. See the XenCenter Help for details on using the New Storage Repository wizard.

The snapshot and fast clone functionality provided in XenServer 5.5 and later for LVM-based SRs comes with an inherent performance overhead. In cases where optimal performance is desired, XenServer supports creation of VDIs in the raw format in addition to the default VHD format. The XenServer snapshot functionality is not supported on raw VDIs.

The sr-probe command can be used in two ways:

In both cases sr-probe works by specifying an SR type and one or more device-config parameters for that SR type. When an incomplete set of parameters is supplied the sr-probe command returns an error message indicating parameters are missing and the possible options for the missing parameters. When a complete set of parameters is supplied a list of existing SRs is returned. All sr-probe output is returned as XML.

For example, a known iSCSI target can be probed by specifying its name or IP address, and the set of IQNs available on the target will be returned:

xe sr-probe type=lvmoiscsi device-config:target=<192.168.1.10>

Error code: SR_BACKEND_FAILURE_96
Error parameters: , The request is missing or has an incorrect target IQN parameter, \
<?xml version="1.0" ?>
<iscsi-target-iqns>
    <TGT>
        <Index>
            0
        </Index>
        <IPAddress>
            192.168.1.10
        </IPAddress>
        <TargetIQN>
            iqn.192.168.1.10:filer1
        </TargetIQN>
    </TGT>
</iscsi-target-iqns>

Probing the same target again and specifying both the name/IP address and desired IQN returns the set of SCSIids (LUNs) available on the target/IQN.

xe sr-probe type=lvmoiscsi device-config:target=192.168.1.10  \ 
device-config:targetIQN=iqn.192.168.1.10:filer1

Error code: SR_BACKEND_FAILURE_107
Error parameters: , The SCSIid parameter is missing or incorrect, \
<?xml version="1.0" ?>
<iscsi-target>
    <LUN>
        <vendor>
			IET
        </vendor>
        <LUNid>
            0
        </LUNid>
        <size>
            42949672960
        </size>
        <SCSIid>
            149455400000000000000000002000000b70200000f000000
        </SCSIid>
    </LUN>
</iscsi-target>

Probing the same target and supplying all three parameters will return a list of SRs that exist on the LUN, if any.

xe sr-probe type=lvmoiscsi device-config:target=192.168.1.10  \ 
device-config:targetIQN=192.168.1.10:filer1 \
device-config:SCSIid=149455400000000000000000002000000b70200000f000000

<?xml version="1.0" ?>
<SRlist>
    <SR>
        <UUID>
            3f6e1ebd-8687-0315-f9d3-b02ab3adc4a6
        </UUID>
        <Devlist>
            /dev/disk/by-id/scsi-149455400000000000000000002000000b70200000f000000
        </Devlist>
    </SR>
</SRlist>

The following parameters can be probed for each SR type:

Dynamic multipathing support is available for Fibre Channel and iSCSI storage backends. By default, it uses round-robin mode load balancing, so both routes have active traffic on them during normal operation. You can enable multipathing in XenCenter or on the xe CLI.

To disable multipathing, first unplug your VBDs, set the host other-config:multipathing parameter to false and then replug your PBDs as described above. Do not modify the other-config:multipathhandle parameter as this will be done automatically.

Multipath support in XenServer is based on the device-mapper multipathd components. Activation and deactivation of multipath nodes is handled automatically by the Storage Manager API. Unlike the standard dm-multipath tools in linux, device mapper nodes are not automatically created for all LUNs on the system, and it is only when LUNs are actively used by the storage management layer that new device mapper nodes are provisioned. It is unnecessary therefore to use any of the dm-multipath CLI tools to query or refresh DM table nodes in XenServer. Should it be necessary to query the status of device-mapper tables manually, or list active device mapper multipath nodes on the system, use the mpathutil utility:

Unlike the standard dm-multipath tools in Linux, device mapper nodes are not automatically created for all LUNs on the system. As LUNs are actively used by the storage management layer, new device mapper nodes are provisioned. It is unnecessary to use any of the dm-multipath CLI tools to query or refresh DM table nodes in XenServer.

The storage repository types supported in XenServer are provided by plug-ins in the control domain; these can be examined and plugins supported by third parties can be added to the /opt/xensource/sm directory. Modification of these files is unsupported, but visibility of these files may be valuable to developers and power users. New storage manager plugins placed in this directory are automatically detected by XenServer. Use the sm-list command (see Section 8.4.13, “Storage Manager commands”) to list the available SR types .

New storage repositories are created using the New Storage wizard in XenCenter. The wizard guides you through the various probing and configuration steps. Alternatively, use the sr-create command. This command creates a new SR on the storage substrate (potentially destroying any existing data), and creates the SR API object and a corresponding PBD record, enabling VMs to use the storage. On successful creation of the SR, the PBD is automatically plugged. If the SR shared=true flag is set, a PBD record is created and plugged for every XenServer Host in the resource pool.

All XenServer SR types support VDI resize, fast cloning and snapshot. SRs based on the LVM SR type (local, iSCSI, or HBA) provide thin provisioning for snapshot and hidden parent nodes. The other SR types support full thin provisioning, including for virtual disks that are active.

Note

Automatic LVM metadata archiving is disabled by default. This does not prevent metadata recovery for LVM groups.

Warning

When VHD VDIs are not attached, for example in the case of a VDI snapshot, they are stored by default thinly-provisioned. Because of this it is imperative to ensure that there is sufficient disk-space available for the VDI to become thickly provisioned when attempting to attach it. VDI clones, however, are thickly-provisioned.

The maximum supported VDI sizes are:

Storage typeMaximum VDI size
EXT32TB
LVM2TB
Netapp2TB
EqualLogic15TB
ONTAP(NetApp)12TB

The EqualLogic SR type maps LUNs to VDIs on a EqualLogic array group, allowing for the use of fast snapshot and clone features on the array.

If you have access to an EqualLogic filer, you can configure a custom EqualLogic storage repository for VM storage on you XenServer deployment. This allows the use of the advanced features of this filer type. Virtual disks are stored on the filer using one LUN per virtual disk. Using this storage type will enable the thin provisioning, snapshot, and fast clone features of this filer.

Consider your storage requirements when deciding whether to use the specialized SR plugin, or to use the generic LVM/iSCSI storage backend. By using the specialized plugin, XenServer will communicate with the filer to provision storage. Some arrays have a limitation of seven concurrent connections, which may limit the throughput of control operations. Using the plugin will allow you to make use of the advanced array features, however, so will make backup and snapshot operations easier.

Device-config parameters for EqualLogic SRs:

Use the sr-create command to create an EqualLogic SR. For example:

xe sr-create host-uuid=<valid_uuid> content-type=user \
name-label=<"Example shared Equallogic SR"> \
shared=true device-config:target=<target_ip> \
device-config:username=<admin_username> \
device-config:password=<admin_password> \
device-config:storagepool=<my_storagepool> \
device-config:chapuser=<chapusername> \
device-config:chappassword=<chapuserpassword> \
device-config:allocation=<thick> \
type=equal

The NetApp type maps LUNs to VDIs on a NetApp server, enabling the use of fast snapshot and clone features on the filer.

If you have access to Network Appliance™ (NetApp) storage with sufficient disk space, running a version of Data ONTAP 7G (version 7.0 or greater), you can configure a custom NetApp storage repository for VM storage on your XenServer deployment. The XenServer driver uses the ZAPI interface to the storage to create a group of FlexVols that correspond to an SR. VDIs are created as virtual LUNs on the storage, and attached to XenServer hosts using an iSCSI data path. There is a direct mapping between a VDI and a raw LUN that does not require any additional volume metadata. The NetApp SR is a managed volume and the VDIs are the LUNs within the volume. VM cloning uses the snapshotting and cloning capabilities of the storage for data efficiency and performance and to ensure compatibility with existing ONTAP management tools.

As with the iSCSI-based SR type, the NetApp driver also uses the built-in software initiator and its assigned host IQN, which can be modified by changing the value shown on the General tab when the storage repository is selected in XenCenter.

The easiest way to create NetApp SRs is to use XenCenter. See the XenCenter help for details. See Section 3.3.6.1, “Creating a shared NetApp SR over iSCSI” for an example of how to create them using the xe CLI.

FlexVols

NetApp uses FlexVols as the basic unit of manageable data. There are limitations that constrain the design of NetApp-based SRs. These are:

Precise system limits vary per filer type, however as a general guide, a FlexVol may contain up to 200 LUNs, and provides up to 255 snapshots. Because there is a one-to-one mapping of LUNs to VDIs, and because often a VM will have more than one VDI, the resource limitations of a single FlexVol can easily be reached. Also, the act of taking a snapshot includes snapshotting all the LUNs within a FlexVol and the VM clone operation indirectly relies on snapshots in the background as well as the VDI snapshot operation for backup purposes.

There are two constraints to consider when mapping the virtual storage objects of the XenServer host to the physical storage. To maintain space efficiency it makes sense to limit the number of LUNs per FlexVol, yet at the other extreme, to avoid resource limitations a single LUN per FlexVol provides the most flexibility. However, because there is a vendor-imposed limit of 200 or 500 FlexVols, per filer (depending on the NetApp model), this creates a limit of 200 or 500 VDIs per filer and it is therefore important to select a suitable number of FlexVols taking these parameters into account.

Given these resource constraints, the mapping of virtual storage objects to the Ontap storage system has been designed in the following manner. LUNs are distributed evenly across FlexVols, with the expectation of using VM UUIDs to opportunistically group LUNs attached to the same VM into the same FlexVol. This is a reasonable usage model that allows a snapshot of all the VDIs in a VM at one time, maximizing the efficiency of the snapshot operation.

An optional parameter you can set is the number of FlexVols assigned to the SR. You can use between 1 and 32 FlexVols; the default is 8. The trade-off in the number of FlexVols to the SR is that, for a greater number of FlexVols, the snapshot and clone operations become more efficient, because there are fewer VMs backed off the same FlexVol. The disadvantage is that more FlexVol resources are used for a single SR, where there is a typical system-wide limitation of 200 for some smaller filers.

Aggregates

When creating a NetApp driver-based SR, you select an appropriate aggregate. The driver can be probed for non-traditional type aggregates, that is, newer-style aggregates that support FlexVols, and lists all aggregates available and the unused disk space on each.

Citrix strongly recommends that you configure an aggregate exclusively for use by XenServer storage, because space guarantees and allocation cannot be correctly managed if other applications are sharing the resource.

Thick or thin provisioning

When creating NetApp storage, you can also choose the type of space management used. By default, allocated space is thickly provisioned to ensure that VMs never run out of disk space and that all virtual allocation guarantees are fully enforced on the filer. Selecting thick provisioning ensures that whenever a VDI (LUN) is allocated on the filer, sufficient space is reserved to guarantee that it will never run out of space and consequently experience failed writes to disk. Due to the nature of the Ontap FlexVol space provisioning algorithms the best practice guidelines for the filer require that at least twice the LUN space is reserved to account for background snapshot data collection and to ensure that writes to disk are never blocked. In addition to the double disk space guarantee, Ontap also requires some additional space reservation for management of unique blocks across snapshots. The guideline on this amount is 20% above the reserved space. The space guarantees afforded by thick provisioning will reserve up to 2.4 times the requested virtual disk space.

The alternative allocation strategy is thin provisioning, which allows the administrator to present more storage space to the VMs connecting to the SR than is actually available on the SR. There are no space guarantees, and allocation of a LUN does not claim any data blocks in the FlexVol until the VM writes data. This might be appropriate for development and test environments where you might find it convenient to over-provision virtual disk space on the SR in the anticipation that VMs might be created and destroyed frequently without ever utilizing the full virtual allocated disk.

FAS Deduplication

FAS Deduplication is a NetApp technology for reclaiming redundant disk space. Newly-stored data objects are divided into small blocks, each block containing a digital signature, which is compared to all other signatures in the data volume. If an exact block match exists, the duplicate block is discarded and the disk space reclaimed. FAS Deduplication can be enabled on thin provisioned NetApp-based SRs and operates according to the default filer FAS Deduplication parameters, typically every 24 hours. It must be enabled at the point the SR is created and any custom FAS Deduplication configuration must be managed directly on the filer.

Access Control

Because FlexVol operations such as volume creation and volume snapshotting require administrator privileges on the filer itself, Citrix recommends that the XenServer host is provided with suitable administrator username and password credentials at configuration time. In situations where the XenServer host does not have full administrator rights to the filer, the filer administrator could perform an out-of-band preparation and provisioning of the filer and then introduce the SR to the XenServer host using XenCenter or the sr-introduce xe CLI command. Note, however, that operations such as VM cloning or snapshot generation will fail in this situation due to insufficient access privileges.

Licenses

You need to have an iSCSI license on the NetApp filer to use this storage repository type; for the generic plugins you need either an iSCSI or NFS license depending on the SR type being used.

Further information

For more information about NetApp technology, see the following links:

Device-config parameters for netapp SRs:

Setting the SR other-config:multiplier parameter to a valid value adjusts the default multiplier attribute. By default XenServer allocates 2.4 times the requested space to account for snapshot and metadata overhead associated with each LUN. To save disk space, you can set the multiplier to a value >= 1. Setting the multiplier should only be done with extreme care by system administrators who understand the space allocation constraints of the NetApp filer. If you try to set the amount to less then 1, for example, in an attempt to pre-allocate very little space for the LUN, the attempt will most likely fail.

Setting the SR other-config:enforce_allocation parameter to true resizes the FlexVols to precisely the amount specified by either the multiplier value above, or the default 2.4 value.

To create a NetApp SR, use the following command.

xe sr-create host-uuid=<valid_uuid> content-type=user \
  name-label=<"Example shared NetApp SR"> shared=true \
  device-config:target=<192.168.1.10> device-config:username=<admin_username> \
  device-config:password=<admin_password> \
  type=netapp

XenServer provides support for shared SRs on iSCSI LUNs. iSCSI is supported using the open-iSCSI software iSCSI initiator or by using a supported iSCSI Host Bus Adapter (HBA). The steps for using iSCSI HBAs are identical to those for Fibre Channel HBAs, both of which are described in Section 3.3.9.2, “Creating a shared LVM over Fibre Channel / iSCSI HBA or SAS SR (lvmohba)”.

Shared iSCSI support using the software iSCSI initiator is implemented based on the Linux Volume Manager (LVM) and provides the same performance benefits provided by LVM VDIs in the local disk case. Shared iSCSI SRs using the software-based host initiator are capable of supporting VM agility using XenMotion: VMs can be started on any XenServer host in a resource pool and migrated between them with no noticeable downtime.

iSCSI SRs use the entire LUN specified at creation time and may not span more than one LUN. CHAP support is provided for client authentication, during both the data path initialization and the LUN discovery phases.

All iSCSI initiators and targets must have a unique name to ensure they can be uniquely identified on the network. An initiator has an iSCSI initiator address, and a target has an iSCSI target address. Collectively these are called iSCSI Qualified Names, or IQNs.

XenServer hosts support a single iSCSI initiator which is automatically created and configured with a random IQN during host installation. The single initiator can be used to connect to multiple iSCSI targets concurrently.

iSCSI targets commonly provide access control using iSCSI initiator IQN lists, so all iSCSI targets/LUNs to be accessed by a XenServer host must be configured to allow access by the host's initiator IQN. Similarly, targets/LUNs to be used as shared iSCSI SRs must be configured to allow access by all host IQNs in the resource pool.

The XenServer host IQN value can be adjusted using XenCenter, or using the CLI with the following command when using the iSCSI software initiator:

xe host-param-set uuid=<valid_host_id> other-config:iscsi_iqn=<new_initiator_iqn>

This section covers various operations required to manage SAS, Fibre Channel and iSCSI HBAs.

For full details on configuring QLogic Fibre Channel and iSCSI HBAs please refer to the QLogic website.

Once the HBA is physically installed into the XenServer host, use the following steps to configure the HBA:

  1. Set the IP networking configuration for the HBA. This example assumes DHCP and HBA port 0. Specify the appropriate values if using static IP addressing or a multi-port HBA.
    /opt/QLogic_Corporation/SANsurferiCLI/iscli -ipdhcp 0
  2. Add a persistent iSCSI target to port 0 of the HBA.
    /opt/QLogic_Corporation/SANsurferiCLI/iscli -pa 0 <iscsi_target_ip_address>
  3. Use the xe sr-probe command to force a rescan of the HBA controller and display available LUNs. See Section 3.2.5, “Probing an SR” and Section 3.3.9.2, “Creating a shared LVM over Fibre Channel / iSCSI HBA or SAS SR (lvmohba)” for more details.

Each HBA-based LUN has a corresponding global device path entry under /dev/disk/by-scsibus in the format <SCSIid>-<adapter>:<bus>:<target>:<lun> and a standard device path under /dev. To remove the device entries for LUNs no longer in use as SRs use the following steps:

  1. Use sr-forget or sr-destroy as appropriate to remove the SR from the XenServer host database. See Section 3.4.1, “Destroying or forgetting a SR” for details.
  2. Remove the zoning configuration within the SAN for the desired LUN to the desired host.
  3. Use the sr-probe command to determine the ADAPTER, BUS, TARGET, and LUN values corresponding to the LUN to be removed. See Section 3.2.5, “Probing an SR” for details.
  4. Remove the device entries with the following command:
    echo "1" > /sys/class/scsi_device/<adapter>:<bus>:<target>:<lun>/device/delete

Warning

Make absolutely sure you are certain which LUN you are removing. Accidentally removing a LUN required for host operation, such as the boot or root device, will render the host unusable.

The LVM over iSCSI type represents disks as Logical Volumes within a Volume Group created on an iSCSI LUN.

SRs of type lvmohba can be created and managed using the xe CLI or XenCenter.

Device-config parameters for lvmohba SRs:

Parameter nameDescriptionRequired?
SCSIidDevice SCSI IDYes

To create a shared lvmohba SR, perform the following steps on each host in the pool:

  1. Zone in one or more LUNs to each XenServer host in the pool. This process is highly specific to the SAN equipment in use. Please refer to your SAN documentation for details.
  2. If necessary, use the HBA CLI included in the XenServer host to configure the HBA:
    • Emulex: /usr/sbin/hbanyware
    • QLogic FC: /opt/QLogic_Corporation/SANsurferCLI
    • QLogic iSCSI: /opt/QLogic_Corporation/SANsurferiCLI
    See
    Section 3.3.8, “Managing Hardware Host Bus Adapters (HBAs)” for an example of QLogic iSCSI HBA configuration. For more information on Fibre Channel and iSCSI HBAs please refer to the Emulex and QLogic websites.
  3. Use the sr-probe command to determine the global device path of the HBA LUN. sr-probe forces a re-scan of HBAs installed in the system to detect any new LUNs that have been zoned to the host and returns a list of properties for each LUN found. Specify the host-uuid parameter to ensure the probe occurs on the desired host. The global device path returned as the <path> property will be common across all hosts in the pool and therefore must be used as the value for the device-config:device parameter when creating the SR. If multiple LUNs are present use the vendor, LUN size, LUN serial number, or the SCSI ID as included in the <path> property to identify the desired LUN.
    xe sr-probe type=lvmohba \
    host-uuid=1212c7b3-f333-4a8d-a6fb-80c5b79b5b31
    Error code: SR_BACKEND_FAILURE_90
    Error parameters: , The request is missing the device parameter, \
    <?xml version="1.0" ?>
    <Devlist>
        <BlockDevice>
            <path>
                /dev/disk/by-id/scsi-360a9800068666949673446387665336f
            </path>
            <vendor>
                HITACHI
            </vendor>
            <serial>
                730157980002
            </serial>
            <size>
                80530636800
            </size>
            <adapter>
                4
            </adapter>
            <channel>
                0
            </channel>
            <id>
                4
            </id>
            <lun>
                2
            </lun>
            <hba>
                qla2xxx
            </hba>
        </BlockDevice>
        <Adapter>
            <host>
                Host4
            </host>
            <name>
                qla2xxx
            </name>
            <manufacturer>
                QLogic HBA Driver
            </manufacturer>
            <id>
                4
            </id>
        </Adapter>
    </Devlist>
  4. On the master host of the pool create the SR, specifying the global device path returned in the <path> property from sr-probe. PBDs will be created and plugged for each host in the pool automatically.
xe sr-create host-uuid=<valid_uuid> \
content-type=user \
name-label=<"Example shared LVM over HBA SR"> shared=true \
device-config:SCSIid=<device_scsi_id> type=lvmohba

Note

You can use the BRAND_CONSOLE; Repair Storage Repository function to retry the PBD creation and plugging portions of the sr-create operation. This can be valuable in cases where the LUN zoning was incorrect for one or more hosts in a pool when the SR was created. Correct the zoning for the affected hosts and use the Repair Storage Repository function instead of removing and re-creating the SR.

The NFS VHD type stores disks as VHD files on a remote NFS filesystem.

NFS is a ubiquitous form of storage infrastructure that is available in many environments. XenServer allows existing NFS servers that support NFS V3 over TCP/IP to be used immediately as a storage repository for virtual disks (VDIs). VDIs are stored in the Microsoft VHD format only. Moreover, as NFS SRs can be shared, VDIs stored in a shared SR allow VMs to be started on any XenServer hosts in a resource pool and be migrated between them using XenMotion with no noticeable downtime.

Creating an NFS SR requires the hostname or IP address of the NFS server. The sr-probe command provides a list of valid destination paths exported by the server on which the SR can be created. The NFS server must be configured to export the specified path to all XenServer hosts in the pool, or the creation of the SR and the plugging of the PBD record will fail.

As mentioned at the beginning of this chapter, VDIs stored on NFS are sparse. The image file is allocated as the VM writes data into the disk. This has the considerable benefit that VM image files take up only as much space on the NFS storage as is required. If a 100GB VDI is allocated for a new VM and an OS is installed, the VDI file will only reflect the size of the OS data that has been written to the disk rather than the entire 100GB.

VHD files may also be chained, allowing two VDIs to share common data. In cases where a NFS-based VM is cloned, the resulting VMs will share the common on-disk data at the time of cloning. Each will proceed to make its own changes in an isolated copy-on-write version of the VDI. This feature allows NFS-based VMs to be quickly cloned from templates, facilitating very fast provisioning and deployment of new VMs.

As VHD-based images require extra metadata to support sparseness and chaining, the format is not as high-performance as LVM-based storage. In cases where performance really matters, it is well worth forcibly allocating the sparse regions of an image file. This will improve performance at the cost of consuming additional disk space.

XenServer's NFS and VHD implementations assume that they have full control over the SR directory on the NFS server. Administrators should not modify the contents of the SR directory, as this can risk corrupting the contents of VDIs.

XenServer has been tuned for enterprise-class storage that use non-volatile RAM to provide fast acknowledgments of write requests while maintaining a high degree of data protection from failure. XenServer has been tested extensively against Network Appliance FAS270c and FAS3020c storage, using Data OnTap 7.2.2.

In situations where XenServer is used with lower-end storage, it will cautiously wait for all writes to be acknowledged before passing acknowledgments on to guest VMs. This will incur a noticeable performance cost, and might be remedied by setting the storage to present the SR mount point as an asynchronous mode export. Asynchronous exports acknowledge writes that are not actually on disk, and so administrators should consider the risks of failure carefully in these situations.

The XenServer NFS implementation uses TCP by default. If your situation allows, you can configure the implementation to use UDP in situations where there may be a performance benefit. To do this, specify the device-config parameter useUDP=true at SR creation time.

The CSLG storage repository allows use of the Citrix StorageLink service for native access to a range of iSCSI and Fibre Channel arrays and automated fabric/initiator and array configuration features. Installation and configuration of the StorageLink service is required, for more information please see the StorageLink documentation.

CSLG SRs can be created using the xe CLI only. After creation CSLG SRs can be viewed and managed using both the xe CLI and XenCenter.

Because the CSLG SR can be used to access different storage arrays, the exact features available for a given CSLG SR depend on the capabilities of the array. All CSLG SRs use a LUN-per-VDI model where a new LUN is provisioned for each virtual disk. (VDI).

CSLG SRs can co-exist with other SR types on the same storage array hardware, and multiple CSLG SRs can be defined within the same resource pool.

The StorageLink service can be configured using the StorageLink Manager or from within the XenServer control domain using the StorageLink Command Line Interface (CLI). To run the StorageLink (CLI) use the following command, where <hostname> is the name or IP address of the machine running the StorageLink service:

/opt/Citrix/StorageLink/bin/csl \
server=<hostname>[:<port>][,<username>,<password>]

For more information about the StorageLink CLI please see the StorageLink documentation or use the /opt/Citrix/StorageLink/bin/csl help command.

SRs of type CSLG can only be created by using the xe Command Line Interface (CLI). Once created CSLG SRs can be managed using either XenCenter or the xe CLI.

The device-config parameters for CSLG SRs are:

Parameter name

Description

Optional?

target

The server name or IP address of the machine running the StorageLink service

No

storageSystemId

The storage system ID to use for allocating storage

No

storagePoolId

The storage pool ID within the specified storage system to use for allocating storage

No

username

The username to use for connection to the StorageLink service

Yes [a]

password

The password to use for connecting to the StorageLink service

Yes [a]

cslport

The port to use for connecting to the StorageLink service

Yes [a]

chapuser

The username to use for CHAP authentication

Yes

chappassword

The password to use for CHAP authentication

Yes

protocol

Specifies the storage protocol to use (fc or iscsi) for multi-protocol storage systems. If not specified fc is used if available, otherwise iscsi.

Yes

provision-type

Specifies whether to use thick or thin provisioning (thick or thin); default is thick

Yes

provision-options

Additional provisioning options: Set to dedup to use the de-duplication features supported by the storage system

Yes

raid-type

The level of RAID to use for the SR, as supported by the storage array

Yes

[a] If the username, password, or port configuration of the StorageLink service are changed from the default then the appropriate parameter and value must be specified.

SRs of type cslg support two additional parameters that can be used with storage arrays that support LUN grouping features, such as NetApp flexvols.

sm-config parameters for CSLG SRs:

Parameter name

Description

Optional?

pool-count

Creates the specified number of groups on the array, in which LUNs provisioned within the SR will be created

Yes

physical-size

The total size of the SR in MB. Each pool will be created with a size equal to physical-size divided by pool-count.

Yes [a]

[a] Required when specifying the sm-config:pool-count parameter

To create a CSLG SR

  1. Install the StorageLink service onto a Windows host or virtual machine
  2. Configure the StorageLink service with the appropriate storage adapters and credentials
  3. Use the sr-probe command with the device-config:target parameter to identify the available storage system IDs
    xe sr-probe type=cslg device-config:target=192.168.128.10
    
    <csl__storageSystemInfoList>
        <csl__storageSystemInfo>
            <friendlyName>5001-4380-013C-0240</friendlyName>
            <displayName>HP EVA (5001-4380-013C-0240)</displayName>
            <vendor>HP</vendor>
            <model>EVA</model>
            <serialNum>50014380013C0240</serialNum>
            <storageSystemId>HP__EVA__50014380013C0240</storageSystemId>
            <systemCapabilities>
                <capabilities>PROVISIONING</capabilities>
                <capabilities>MAPPING</capabilities>
                <capabilities>MULTIPLE_STORAGE_POOLS</capabilities>
                <capabilities>DIFF_SNAPSHOT</capabilities>
                <capabilities>CLONE</capabilities>
            </systemCapabilities>
            <protocolSupport>
                <capabilities>FC</capabilities>
            </protocolSupport>
            <csl__snapshotMethodInfoList>
                <csl__snapshotMethodInfo>
                    <name>5001-4380-013C-0240</name>
                    <displayName></displayName>
                    <maxSnapshots>16</maxSnapshots>
                    <supportedNodeTypes>
                        <nodeType>STORAGE_VOLUME</nodeType>
                    </supportedNodeTypes>
                    <snapshotTypeList>
                    </snapshotTypeList>
                    <snapshotCapabilities>
                    </snapshotCapabilities>
                </csl__snapshotMethodInfo>
                <csl__snapshotMethodInfo>
                    <name>5001-4380-013C-0240</name>
                    <displayName></displayName>
                    <maxSnapshots>16</maxSnapshots>
                    <supportedNodeTypes>
                        <nodeType>STORAGE_VOLUME</nodeType>
                    </supportedNodeTypes>
                    <snapshotTypeList>
                        <snapshotType>DIFF_SNAPSHOT</snapshotType>
                    </snapshotTypeList>
                    <snapshotCapabilities>
                    </snapshotCapabilities>
                </csl__snapshotMethodInfo>
                <csl__snapshotMethodInfo>
                    <name>5001-4380-013C-0240</name>
                    <displayName></displayName>
                    <maxSnapshots>16</maxSnapshots>
                    <supportedNodeTypes>
                        <nodeType>STORAGE_VOLUME</nodeType>
                    </supportedNodeTypes>
                    <snapshotTypeList>
                        <snapshotType>CLONE</snapshotType>
                    </snapshotTypeList>
                   <snapshotCapabilities>
                   </snapshotCapabilities>
                </csl__snapshotMethodInfo>
            </csl__snapshotMethodInfoList>
        </csl__storageSystemInfo>
    </csl__storageSystemInfoList>
    
    You can use grep to filter the sr-probe output to just the storage pool IDs
    xe sr-probe type=cslg device-config:target=192.168.128.10 | grep storageSystemId
            <storageSystemId>EMC__CLARIION__APM00074902515</storageSystemId>
            <storageSystemId>HP__EVA__50014380013C0240</storageSystemId>
            <storageSystemId>NETAPP__LUN__0AD4F00A</storageSystemId>
  4. Add the desired storage system ID to the sr-probe command to identify the storage pools available within the specified storage system
    xe sr-probe type=cslg \
    device-config:target=192.168.128.10  \ device-config:storageSystemId=HP__EVA__50014380013C0240
    <?xml version="1.0" encoding="iso-8859-1"?>
    <csl__storagePoolInfoList>
        <csl__storagePoolInfo>
            <displayName>Default Disk Group</displayName>
            <friendlyName>Default Disk Group</friendlyName>
            <storagePoolId>00010710B4080560B6AB08000080000000000400</storagePoolId>
            <parentStoragePoolId></parentStoragePoolId>
            <storageSystemId>HP__EVA__50014380013C0240</storageSystemId>
            <sizeInMB>1957099</sizeInMB>
            <freeSpaceInMB>1273067</freeSpaceInMB>
            <isDefault>No</isDefault>
            <status>0</status>
            <provisioningOptions>
                <supportedRaidTypes>
                    <raidType>RAID0</raidType>
                    <raidType>RAID1</raidType>
                    <raidType>RAID5</raidType>
                </supportedRaidTypes>
                <supportedNodeTypes>
                    <nodeType>STORAGE_VOLUME</nodeType>
                </supportedNodeTypes>
            <supportedProvisioningTypes>
            </supportedProvisioningTypes>
            </provisioningOptions>
        </csl__storagePoolInfo>
    </csl__storagePoolInfoList>
    
    You can use grep to filter the sr-probe output to just the storage pool IDs
    xe sr-probe type=cslg \
    device-config:target=192.168.128.10 \
    device-config:storageSystemId=HP__EVA__50014380013C0240 \
    | grep storagePoolId
    <storagePoolId>00010710B4080560B6AB08000080000000000400</storagePoolId>
  5. Create the SR specifying the desired storage system and storage pool IDs
    xe sr-create type=cslg name-label=CSLG_EVA_1 shared=true \
    device-config:target=192.168.128.10 \
    device-config:storageSystemId=HP__EVA__50014380013C0240 \
    device-config:storagePoolId=00010710B4080560B6AB08000080000000000400

This section covers various operations required in the ongoing management of Storage Repositories (SRs).

Use the xe CLI and the XenCenter Repair Storage Repository feature to convert a local FC SR to a shared FC SR:

  1. Upgrade all hosts in the resource pool to XenServer 5.5.0.
  2. Ensure all hosts in the pool have the SR's LUN zoned appropriately. See Section 3.2.5, “Probing an SR” for details on using the sr-probe command to verify the LUN is present on each host.
  3. Convert the SR to shared:
    xe sr-param-set shared=true uuid=<local_fc_sr>
  4. Within XenCenter the SR is moved from the host level to the pool level, indicating that it is now shared. The SR will be marked with a red exclamation mark to show that it is not currently plugged on all hosts in the pool.
  5. Select the SR and then select the Storage > Repair Storage Repository menu option.
  6. Click Repair to create and plug a PBD for each host in the pool.

The set of VDIs associated with a VM can be copied from one SR to another to accommodate maintenance requirements or tiered storage configurations. XenCenter provides the ability to copy a VM and all of its VDIs to the same or a different SR, and a combination of XenCenter and the xe CLI can be used to copy individual VDIs.

For general performance, the default disk scheduler noop is applied on all new SR types. The noop scheduler provides the fairest performance for competing VMs accessing the same device. To apply disk QoS (see Section 3.5, “Virtual disk QoS settings”) it is necessary to override the default setting and assign the cfq disk scheduler to the SR. The corresponding PBD must be unplugged and re-plugged for the scheduler parameter to take effect. The disk scheduler can be adjusted using the following command:

xe sr-param-set other-config:scheduler=noop|cfq|anticipatory|deadline \
uuid=<valid_sr_uuid>

Note

This will not effect EqualLogic, NetApp or NFS storage.

Virtual disks have an optional I/O priority Quality of Service (QoS) setting. This setting can be applied to existing virtual disks using the xe CLI as described in this section.

In the shared SR case, where multiple hosts are accessing the same LUN, the QoS setting is applied to VBDs accessing the LUN from the same host. QoS is not applied across hosts in the pool.

Before configuring any QoS parameters for a VBD, ensure that the disk scheduler for the SR has been set appropriately. See Section 3.4.6, “Adjusting the disk IO scheduler” for details on how to adjust the scheduler. The scheduler parameter must be set to cfq on the SR for which the QoS is desired.

Note

Remember to set the scheduler to cfq on the SR, and to ensure that the PBD has been re-plugged in order for the scheduler change to take effect.

The first parameter is qos_algorithm_type. This parameter needs to be set to the value ionice, which is the only type of QoS algorithm supported for virtual disks in this release.

The QoS parameters themselves are set with key/value pairs assigned to the qos_algorithm_param parameter. For virtual disks, qos_algorithm_param takes a sched key, and depending on the value, also requires a class key.

Possible values of qos_algorithm_param:sched are:

  • sched=rt or sched=real-time sets the QoS scheduling parameter to real time priority, which requires a class parameter to set a value
  • sched=idle sets the QoS scheduling parameter to idle priority, which requires no class parameter to set any value
  • sched=<anything> sets the QoS scheduling parameter to best effort priority, which requires a class parameter to set a value

The possible values for class are:

  • One of the following keywords: highest, high, normal, low, lowest
  • an integer between 0 and 7, where 7 is the highest priority and 0 is the lowest, so that, for example, I/O requests with a priority of 5, will be given priority over I/O requests with a priority of 2.

To enable the disk QoS settings, you also need to set the other-config:scheduler to cfq and replug PBDs for the storage in question.

For example, the following CLI commands set the virtual disk's VBD to use real time priority 5:

xe vbd-param-set uuid=<vbd_uuid> qos_algorithm_type=ionice
xe vbd-param-set uuid=<vbd_uuid> qos_algorithm_params:sched=rt
xe vbd-param-set uuid=<vbd_uuid> qos_algorithm_params:class=5
xe sr-param-set uuid=<sr_uuid> other-config:scheduler-cfq
xe pbd-plug uuid=<pbd_uuid>

This chapter discusses how physical network interface cards (NICs) in XenServer hosts are used to enable networking within Virtual Machines (VMs). XenServer supports up to 6 physical network interfaces (or up to 6 pairs of bonded network interfaces) per XenServer host and up to 7 virtual network interfaces per VM.

Note

XenServer provides automated configuration and management of NICs using the xe command line interface (CLI). Unlike previous XenServer versions, the host networking configuration files should not be edited directly in most cases; where a CLI command is available, do not edit the underlying files.

If you are already familiar with XenServer networking concepts, you may want to skip ahead to one of the following sections:

This section describes the general concepts of networking in the XenServer environment.

Virtual Local Area Networks (VLANs), as defined by the IEEE 802.1Q standard, allow a single physical network to support multiple logical networks. XenServer hosts can work with VLANs in multiple ways.

NIC bonds can improve XenServer host resiliency by using two physical NICs as if they were one. If one NIC within the bond fails the host's network traffic will automatically be routed over the second NIC. NIC bonds work in an active/active mode, with traffic balanced between the bonded NICs.

XenServer NIC bonds completely subsume the underlying physical devices (PIFs). In order to activate a bond the underlying PIFs must not be in use, either as the management interface for the host or by running VMs with VIFs attached to the networks associated with the PIFs.

XenServer NIC bonds are represented by additional PIFs. The bond PIF can then be connected to a XenServer network to allow VM traffic and host management functions to occur over the bonded NIC. The exact steps to use to create a NIC bond depend on the number of NICs in your host, and whether the management interface of the host is assigned to a PIF to be used in the bond.

XenServer supports Source Level Balancing (SLB) NIC bonding. SLB bonding:

Any given VIF will only use one of the links in the bond at a time. At startup no guarantees are made about the affinity of a given VIF to a link in the bond. However, for VIFs with high throughput, periodic rebalancing ensures that the load on the links is approximately equal.

API Management traffic can be assigned to a XenServer bond interface and will be automatically load-balanced across the physical NICs.

XenServer bonded PIFs do not require IP configuration for the bond when used for guest traffic. This is because the bond operates at Layer 2 of the OSI, the data link layer, and no IP addressing is used at this layer. When used for non-guest traffic (to connect to it with XenCenter for management, or to connect to shared network storage), one IP configuration is required per bond. (Incidentally, this is true of unbonded PIFs as well, and is unchanged from XenServer 4.1.0.)

Gratuitous ARP packets are sent when assignment of traffic changes from one interface to another as a result of fail-over.

Re-balancing is provided by the existing ALB re-balance capabilities: the number of bytes going over each slave (interface) is tracked over a given period. When a packet is to be sent that contains a new source MAC address it is assigned to the slave interface with the lowest utilization. Traffic is re-balanced every 10 seconds.

The XenServer host networking configuration is specified during initial host installation. Options such as IP address configuration (DHCP/static), the NIC used as the management interface, and hostname are set based on the values provided during installation.

When a XenServer host has a single NIC, the follow configuration is present after installation:

When a host has multiple NICs the configuration present after installation depends on which NIC is selected for management operations during installation:

In both cases the resulting networking configuration allows connection to the XenServer host by XenCenter, the xe CLI, and any other management software running on separate machines via the IP address of the management interface. The configuration also provides external networking for VMs created on the host.

The PIF used for management operations is the only PIF ever configured with an IP address. External networking for VMs is achieved by bridging PIFs to VIFs using the network object which acts as a virtual Ethernet switch.

The steps required for networking features such as VLANs, NIC bonds, and dedicating a NIC to storage traffic are covered in the following sections.

Some of the network configuration procedures in this section differ depending on whether you are configuring a stand-alone server or a server that is part of a resource pool.

Citrix recommends using XenCenter to create NIC bonds. For details, refer to the XenCenter help.

This section describes how to use the xe CLI to create bonded NIC interfaces on a standalone XenServer host. See Section 4.2.5, “Creating NIC bonds in resource pools” for details on using the xe CLI to create NIC bonds on XenServer hosts that comprise a resource pool.

Creating a bond on a dual-NIC host implies that the PIF/NIC currently in use as the management interface for the host will be subsumed by the bond. The additional steps required to move the management interface to the bond PIF are included.

Bonding two NICs together

  1. Use XenCenter or the vm-shutdown command to shut down all VMs on the host, thereby forcing all VIFs to be unplugged from their current networks. The existing VIFs will be invalid after the bond is enabled.
    xe vm-shutdown uuid=<vm_uuid>
  2. Use the network-create command to create a new network for use with the bonded NIC. The UUID of the new network is returned:
    xe network-create name-label=<bond0>
  3. Use the pif-list command to determine the UUIDs of the PIFs to use in the bond:
    xe pif-list
  4. Use the bond-create command to create the bond by specifying the newly created network UUID and the UUIDs of the PIFs to be bonded separated by commas. The UUID for the bond is returned:
    xe bond-create network-uuid=<network_uuid> pif-uuids=<pif_uuid_1>,<pif_uuid_2>

    Note

    See Section 4.2.4.2, “Controlling the MAC address of the bond” for details on controlling the MAC address used for the bond PIF.

  5. Use the pif-list command to determine the UUID of the new bond PIF:
    xe pif-list device=<bond0>
  6. Use the pif-reconfigure-ip command to configure the desired management interface IP address settings for the bond PIF. See Chapter 8, Command line interface for more detail on the options available for the pif-reconfigure-ip command.
    xe pif-reconfigure-ip uuid=<bond_pif_uuid> mode=DHCP
  7. Use the host-management-reconfigure command to move the management interface from the existing physical PIF to the bond PIF. This step will activate the bond:
    xe host-management-reconfigure pif-uuid=<bond_pif_uuid>
  8. Use the pif-reconfigure-ip command to remove the IP address configuration from the non-bonded PIF previously used for the management interface. This step is not strictly necessary but might help reduce confusion when reviewing the host networking configuration.
    xe pif-reconfigure-ip uuid=<old_management_pif_uuid> mode=None
  9. Move existing VMs to the bond network using the vif-destroy and vif-create commands. This step can also be completed using XenCenter by editing the VM configuration and connecting the existing VIFs of a VM to the bond network.
  10. Restart the VMs shut down in step 1.

Whenever possible, create NIC bonds as part of initial resource pool creation prior to joining additional hosts to the pool or creating VMs. Doing so allows the bond configuration to be automatically replicated to hosts as they are joined to the pool and reduces the number of steps required. Adding a NIC bond to an existing pool requires creating the bond configuration manually on the master and each of the members of the pool. Adding a NIC bond to an existing pool after VMs have been installed is also a disruptive operation, as all VMs in the pool must be shut down.

Citrix recommends using XenCenter to create NIC bonds. For details, refer to the XenCenter help.

This section describes using the xe CLI to create bonded NIC interfaces on XenServer hosts that comprise a resource pool. See Section 4.2.4.1, “Creating a NIC bond on a dual-NIC host” for details on using the xe CLI to create NIC bonds on a standalone XenServer host.

Warning

Do not attempt to create network bonds while HA is enabled. The process of bond creation will disturb the in-progress HA heartbeating and cause hosts to self-fence (shut themselves down); subsequently they will likely fail to reboot properly and will need the host-emergency-ha-disable command to recover.

  1. Select the host you want to be the master. The master host belongs to an unnamed pool by default. To create a resource pool with the CLI, rename the existing nameless pool:
    xe pool-param-set name-label=<"New Pool"> uuid=<pool_uuid>
  2. Create the NIC bond on the master as follows:
    1. Use the network-create command to create a new pool-wide network for use with the bonded NICs. The UUID of the new network is returned.
      xe network-create name-label=<network_name>
    2. Use the pif-list command to determine the UUIDs of the PIFs to use in the bond:
      xe pif-list
    3. Use the bond-create command to create the bond, specifying the network UUID created in step a and the UUIDs of the PIFs to be bonded, separated by commas. The UUID for the bond is returned:
      xe bond-create network-uuid=<network_uuid> pif-uuids=<pif_uuid_1>,<pif_uuid_2>

      Note

      See Section 4.2.4.2, “Controlling the MAC address of the bond” for details on controlling the MAC address used for the bond PIF.

    4. Use the pif-list command to determine the UUID of the new bond PIF:
      xe pif-list  network-uuid=<network_uuid>
    5. Use the pif-reconfigure-ip command to configure the desired management interface IP address settings for the bond PIF. See Chapter 8, Command line interface, for more detail on the options available for the pif-reconfigure-ip command.
      xe pif-reconfigure-ip uuid=<bond_pif_uuid> mode=DHCP
    6. Use the host-management-reconfigure command to move the management interface from the existing physical PIF to the bond PIF. This step will activate the bond:
      xe host-management-reconfigure pif-uuid=<bond_pif_uuid>
    7. Use the pif-reconfigure-ip command to remove the IP address configuration from the non-bonded PIF previously used for the management interface. This step is not strictly necessary but might help reduce confusion when reviewing the host networking configuration.
      xe pif-reconfigure-ip uuid=<old_management_pif_uuid> mode=None
  3. Open a console on a host that you want to join to the pool and run the command:
    xe pool-join master-address=<host1> master-username=root master-password=<password>
    The network and bond information is automatically replicated to the new host. However, the management interface is not automatically moved from the host NIC to the bonded NIC. Move the management interface on the host to enable the bond as follows:
    1. Use the host-list command to find the UUID of the host being configured:
      xe host-list
    2. Use the pif-list command to determine the UUID of bond PIF on the new host. Include the host-uuid parameter to list only the PIFs on the host being configured:
      xe pif-list network-name-label=<network_name> host-uuid=<host_uuid>
    3. Use the pif-reconfigure-ip command to configure the desired management interface IP address settings for the bond PIF. See Chapter 8, Command line interface, for more detail on the options available for the pif-reconfigure-ip command. This command must be run directly on the host:
      xe pif-reconfigure-ip uuid=<bond_pif_uuid> mode=DHCP
    4. Use the host-management-reconfigure command to move the management interface from the existing physical PIF to the bond PIF. This step activates the bond. This command must be run directly on the host:
      xe host-management-reconfigure pif-uuid=<bond_pif_uuid>
    5. Use the pif-reconfigure-ip command to remove the IP address configuration from the non-bonded PIF previously used for the management interface. This step is not strictly necessary but may help reduce confusion when reviewing the host networking configuration. This command must be run directly on the host server:
      xe pif-reconfigure-ip uuid=<old_mgmt_pif_uuid> mode=None
  4. For each additional host you want to join to the pool, repeat steps 3 and 4 to move the management interface on the host and to enable the bond.

When adding a NIC bond to an existing pool, the bond must be manually created on each host in the pool. The steps below can be used to add NIC bonds on both the pool master and other hosts with the following requirements:

To add NIC bonds to the pool master and other hosts

  1. Use the network-create command to create a new pool-wide network for use with the bonded NICs. This step should only be performed once per pool. The UUID of the new network is returned.
    xe network-create name-label=<bond0>
  2. Use XenCenter or the vm-shutdown command to shut down all VMs in the host pool to force all existing VIFs to be unplugged from their current networks. The existing VIFs will be invalid after the bond is enabled.
    xe vm-shutdown uuid=<vm_uuid>
  3. Use the host-list command to find the UUID of the host being configured:
    xe host-list
  4. Use the pif-list command to determine the UUIDs of the PIFs to use in the bond. Include the host-uuid parameter to list only the PIFs on the host being configured:
    xe pif-list host-uuid=<host_uuid>
  5. Use the bond-create command to create the bond, specifying the network UUID created in step 1 and the UUIDs of the PIFs to be bonded, separated by commas. The UUID for the bond is returned.
    xe bond-create network-uuid=<network_uuid> pif-uuids=<pif_uuid_1>,<pif_uuid_2>

    Note

    See Section 4.2.4.2, “Controlling the MAC address of the bond” for details on controlling the MAC address used for the bond PIF.

  6. Use the pif-list command to determine the UUID of the new bond PIF. Include the host-uuid parameter to list only the PIFs on the host being configured:
    xe pif-list device=bond0 host-uuid=<host_uuid>
  7. Use the pif-reconfigure-ip command to configure the desired management interface IP address settings for the bond PIF. See Chapter 8, Command line interface for more detail on the options available for the pif-reconfigure-ip command. This command must be run directly on the host:
    xe pif-reconfigure-ip uuid=<bond_pif_uuid> mode=DHCP
  8. Use the host-management-reconfigure command to move the management interface from the existing physical PIF to the bond PIF. This step will activate the bond. This command must be run directly on the host:
    xe host-management-reconfigure pif-uuid=<bond_pif_uuid>
  9. Use the pif-reconfigure-ip command to remove the IP address configuration from the non-bonded PIF previously used for the management interface. This step is not strictly necessary, but might help reduce confusion when reviewing the host networking configuration. This command must be run directly on the host:
    xe pif-reconfigure-ip uuid=<old_management_pif_uuid> mode=None
  10. Move existing VMs to the bond network using the vif-destroy and vif-create commands. This step can also be completed using XenCenter by editing the VM configuration and connecting the existing VIFs of the VM to the bond network.
  11. Repeat steps 3 - 10 for other hosts.
  12. Restart the VMs previously shut down.

XenServer allows use of either XenCenter or the xe CLI to configure and dedicate a NIC to specific functions, such as storage traffic.

Assigning a NIC to a specific function will prevent the use of the NIC for other functions such as host management, but requires that the appropriate network configuration be in place in order to ensure the NIC is used for the desired traffic. For example, to dedicate a NIC to storage traffic the NIC, storage target, switch, and/or VLAN must be configured such that the target is only accessible over the assigned NIC. This allows use of standard IP routing to control how traffic is routed between multiple NICs within a XenServer.

If you want to use a storage interface that can be routed from the management interface also (bearing in mind that this configuration is not recommended), then you have two options:

This section discusses how to change the networking configuration of a XenServer host. This includes:

XenServer hosts in resource pools have a single management IP address used for management and communication to and from other hosts in the pool. The steps required to change the IP address of a host's management interface are different for master and other hosts.

Changing the IP address of a pool member host

  1. Use the pif-reconfigure-ip CLI command to set the IP address as desired. See Chapter 8, Command line interface for details on the parameters of the pif-reconfigure-ip command:
    xe pif-reconfigure-ip uuid=<pif_uuid> mode=DHCP
  2. Use the host-list CLI command to confirm that the member host has successfully reconnected to the master host by checking that all the other XenServer hosts in the pool are visible:
    xe host-list

Changing the IP address of the master XenServer host requires additional steps because each of the member hosts uses the advertised IP address of the pool master for communication and will not know how to contact the master when its IP address changes.

Whenever possible, use a dedicated IP address that is not likely to change for the lifetime of the pool for pool masters.

To change the IP address of a pool master host

  1. Use the pif-reconfigure-ip CLI command to set the IP address as desired. See Chapter 8, Command line interface for details on the parameters of the pif-reconfigure-ip command:
    xe pif-reconfigure-ip uuid=<pif_uuid> mode=DHCP
  2. When the IP address of the pool master host is changed, all member hosts will enter into an emergency mode when they fail to contact the master host.
  3. On the master XenServer host, use the pool-recover-slaves command to force the master to contact each of the member hosts and inform them of the new master IP address:
    xe pool-recover-slaves

Refer to Section 6.4.2, “Master failures” for more information on emergency mode.

It is possible for physical NIC devices to be discovered in different orders on different servers even though the servers contain the same hardware. Verifying NIC ordering is recommended before using the pooling features of XenServer.

It is not possible to directly rename a PIF, although you can use the pif-forget and pif-introduce commands to achieve the same effect with the following restrictions:

For the example configuration shown above use the following steps to change the NIC ordering so that eth0 corresponds to the device with a MAC address of 00:19:bb:2d:7e:7a:

If you are having problems with configuring networking, first ensure that you have not directly modified any of the control domain ifcfg-* files directly. These files are directly managed by the control domain host agent, and changes will be overwritten.

Table of Contents

5.1. Workload Balancing Overview
5.1.1. Workload Balancing Basic Concepts
5.2. Designing Your Workload Balancing Deployment
5.2.1. Deploying One Server
5.2.2. Planning for Future Growth
5.2.3. Increasing Availability
5.2.4. Multiple Server Deployments
5.2.5. Workload Balancing Security
5.3. Workload Balancing Installation Overview
5.3.1. Workload Balancing System Requirements
5.3.2. Workload Balancing Data Store Requirements
5.3.3. Operating System Language Support
5.3.4. Preinstallation Considerations
5.3.5. Installing Workload Balancing
5.4. Windows Installer Commands for Workload Balancing
5.4.1. ADDLOCAL
5.4.2. CERT_CHOICE
5.4.3. CERTNAMEPICKED
5.4.4. DATABASESERVER
5.4.5. DBNAME
5.4.6. DBUSERNAME
5.4.7. DBPASSWORD
5.4.8. EXPORTCERT
5.4.9. EXPORTCERT_FQFN
5.4.10. HTTPS_PORT
5.4.11. INSTALLDIR
5.4.12. PREREQUISITES_PASSED
5.4.13. RECOVERYMODEL
5.4.14. USERORGROUPACCOUNT
5.4.15. WEBSERVICE_USER_CB
5.4.16. WINDOWS_AUTH
5.5. Initializing and Configuring Workload Balancing
5.5.1. Initialization Overview
5.5.2. To initialize Workload Balancing
5.5.3. To edit the Workload Balancing configuration for a pool
5.5.4. Authorization for Workload Balancing
5.5.5. Configuring Antivirus Software
5.5.6. Changing the Placement Strategy
5.5.7. Changing the Performance Thresholds and Metric Weighting
5.6. Accepting Optimization Recommendations
5.6.1. To accept an optimization recommendation
5.7. Choosing an Optimal Server for VM Initial Placement, Migrate, and Resume
5.7.1. To start a virtual machine on the optimal server
5.8. Entering Maintenance Mode with Workload Balancing Enabled
5.8.1. To enter maintenance mode with Workload Balancing enabled
5.9. Working with Workload Balancing Reports
5.9.1. Introduction
5.9.2. Types of Workload Balancing Reports
5.9.3. Using Workload Balancing Reports for Tasks
5.9.4. Creating Workload Balancing Reports
5.9.5. Generating Workload Balancing Reports
5.9.6. Workload Balancing Report Glossary
5.10. Administering Workload Balancing
5.10.1. Disabling Workload Balancing on a Resource Pool
5.10.2. Reconfiguring a Resource Pool to Use Another WLB Server
5.10.3. Uninstalling Workload Balancing
5.11. Troubleshooting Workload Balancing
5.11.1. General Troubleshooting Tips
5.11.2. Error Messages
5.11.3. Issues Installing Workload Balancing
5.11.4. Issues Initializing Workload Balancing
5.11.5. Issues Starting Workload Balancing
5.11.6. Workload Balancing Connection Errors
5.11.7. Issues Changing Workload Balancing Servers

Workload Balancing is a XenServer feature that helps you balance virtual machine workloads across hosts and locate VMs on the best possible servers for their workload in a resource pool. When Workload Balancing places a virtual machine, it determines the best host on which to start a virtual machine or it rebalances the workload across hosts in a pool. For example, Workload Balancing lets you determine where to:

When Workload Balancing is enabled, if you put a host into Maintenance Mode, Workload Balancing selects the optimal server for each of the host's virtual machines. For virtual machines taken offline, Workload Balancing provides recommendations to help you restart virtual machines on the optimal server in the pool.

Workload Balancing also lets you balance virtual-machine workloads across hosts in a XenServer resource pool. When the workload on a host exceeds the level you set as acceptable (the threshold), Workload Balancing will make recommendations to move part of its workload (for example, one or two virtual machines) to a less-taxed host in the same pool. It does this by evaluating the existing workloads on hosts against resource performance on other hosts.

You can also use Workload Balancing to help determine if you can power off hosts at certain times of day.

Workload Balancing performs these tasks by analyzing XenServer resource-pool metrics and recommending optimizations. You decide if you want these recommendations geared towards resource performance or hardware density. You can fine-tune the weighting of individual resource metrics (CPU, network, memory, and disk) so that the placement recommendations and critical thresholds align with your environment's needs.

To help you perform capacity planning, Workload Balancing provides historical reports about host and pool health, optimization and virtual-machine performance, and virtual-machine motion history.

Workload Balancing captures data for resource performance on virtual machines and physical hosts. It uses this data, combined with the preferences you set, to provide optimization and placement recommendations. Workload Balancing stores performance data in a SQL Server database: the longer Workload Balancing runs the more precise its recommendations become.

Workload Balancing recommends moving virtual-machine workloads across a pool to get the maximum efficiency, which means either performance or density depending on your goals. Within a Workload Balancing context:

Workload Balancing configuration preferences include settings for placement (performance or density), virtual CPUs, and performance thresholds.

Workload Balancing does not conflict with settings you already specified for High Availability. Citrix designed the features to work in conjunction with each other.

You can install Workload Balancing on one computer (physical or virtual) or distribute the components across multiple computers. The three most common deployment configurations are the following:

Because one data collector can monitor multiple resource pools, you do not need multiple data collectors to monitor multiple pools.

In some situations, you might need to deploy Workload Balancing on multiple servers. When you deploy Workload Balancing on multiple servers, you place its key services on one more servers:

The size of your XenServer environment affects your Workload Balancing design. Since every environment is different, the size definitions that follow are examples of environments of that size:

Citrix designed Workload Balancing to operate in a variety of environments, and Citrix recommends properly securing the installation. The steps required vary according to your planned deployment and your organization's security policies. This topic provides information about the available options and makes recommendations.

Workload Balancing is a XenServer feature that helps manage virtual-machine workloads within a XenServer environment. Workload Balancing requires that you:

Typically, you install and configure Workload Balancing after you have created one or more XenServer resource pools in your environment.

You install all Workload Balancing functions, such as the Workload Balancing data store, the Analysis Engine, and the Web Service Host, from Setup.

You can install Workload Balancing in one of two ways:

When you install the Workload Balancing data store, Setup creates the database. You do not need to run Workload Balancing Setup locally on the database server: Setup supports installing the data store across a network.

If you are installing Workload Balancing services as components on separate computers, you must install the database component before the Workload Balancing services.

After installation, you must configure Workload Balancing before you can use it to optimize workloads. For information, see Section 5.5, “Initializing and Configuring Workload Balancing”.

For information about System Requirements, see Section 5.3.1, “Workload Balancing System Requirements”. For installation instructions, see Section 5.3.5, “Installing Workload Balancing”.

This topic provides system requirements for:

For information about data store requirements, see Section 5.3.2, “Workload Balancing Data Store Requirements”.

This topic provides information about the SQL Server versions and configurations that Workload Balancing supports. It also provides information about additional compatibility and authentication requirements.

You may need to configure software in your environment so that Workload Balancing can function correctly. Review the following considerations and determine if they apply to your environment. Also, check the XenServer readme for additional, late-breaking release-specific requirements.

Before installing Workload Balancing, you must:

After Setup is finished installing Workload Balancing, verify that it configure Workload Balancing before it begins gathering data and making recommendations.

The following procedure installs Workload Balancing and all of its services on one computer:

  1. Launch the Workload Balancing Setup wizard from Autorun.exe, and select the Workload Balancing installation option.
  2. After the initial Welcome page appears, click Next.
  3. In the Setup Type page, select Workload Balancing Services and Data Store, and click Next. This option lets you install Workload Balancing, including the Web Services Host, Analysis Engine, and Data Collection Manager services. After you click Next, Workload Balancing Setup verifies that your system has the correct prerequisites.
  4. Accept the End-User License Agreement.
  5. In the Component Selection page, select all of the following components:
  6. In the Database Server page, in the SQL Server Selection section, select one of the following:
  7. In the Install Using section, select one of the following methods of authentication:
  8. In the Database Information page, select Install a new Workload Balancing data store and type the name you want to assign to the Workload Balancing database in SQL Server. The default database name is WorkloadBalancing.
  9. In the Web Service Host Account Information page, select HTTPS end point (selected by default). Edit the port number, if necessary; the port is set to 8012 by default.
  10. For the account (on the Workload Balancing server) that XenServer will use to connect to Workload Balancing, select the authorization type, User or Group, and type one of the following : Specifying the authorization type lets Workload Balancing recognize the XenServer's connection. For more information, see Section 5.5.4, “Authorization for Workload Balancing ”. You do not specify the password until you configure Workload Balancing.
  11. In the SSL/TLS Certificate page, select one of the following certificate options:
  12. Click Install.

The following procedure installs the Workload Balancing data store only:

  1. From any server with network access to the database, launch the Workload Balancing Setup wizard from Autorun.exe, and select the WorkloadBalancing installation option.
  2. After the initial Welcome page appears, click Next.
  3. In the Setup Type page, select Workload Balancing Database Only, and click Next.This option lets you install the Workload Balancing data store only. After you click Next, Workload Balancing Setup verifies that your system has the correct prerequisites.
  4. Accept the End-User License Agreement, and click Next.
  5. In the Component Selection page, accept the default installation and click Next. This option creates and configures a database for the Workload Balancing data store.
  6. In the Database Server page, in the SQL Server Selection section, select one of the following:
  7. In the Install Using section, select one of the following methods of authentication:
  8. In the Database Information page, select Install a new Workload Balancing data store and type the name you want to assign to the Workload Balancing database in SQL Server. The default database name is WorkloadBalancing.
  9. Click Install to install the data store.

The following procedure installs Workload Balancing services on separate computers:

  1. Launch the Workload Balancing Setup wizard from Autorun.exe, and select the WorkloadBalancing installation option.
  2. After the initial Welcome page appears, click Next.
  3. In the Setup Type page, select Workload Balancing Server Services and Database.This option lets you install Workload Balancing, including the Web Services Host, Analysis Engine, and Data Collection Manager services.Workload Balancing Setup verifies that your system has the correct prerequisites.
  4. Accept the End-User License Agreement, and click Next.
  5. In the Component Selection page, select the services you want to install:
  6. In the Database Server page, in the SQL Server Selection section, select one of the following:
  7. In the Web Service Information page, select HTTPS end point (selected by default) and edit the port number, if necessary. The port is set to 8012 by default.
  8. For the account (on the Workload Balancing server) that XenServer will use to connect to Workload Balancing, select the authorization type, User or Group, and type one of the following:
  9. In the SSL/TLS Certificate page, select one of the following certificate options:
  10. Click Install.

The Workload Balancing installation supports using the Msiexec command for Setup. The Msiexec command lets you install, modify, and perform operations on Windows Installer (.msi) packages from the command line.

Set properties by adding Property=”value” on the command line after other switches and parameters.

The following sample command line performs a full installation of the Workload Balancing Windows Installer package and creates a log file to capture information about this operation.

msiexec.exe /I C:\path-to-msi\workloadbalancingx64.msi /quiet 
PREREQUISITES_PASSED="1" 
DBNAME="WorkloadBalancing1" 
DATABASESERVER="WLB-DB-SERVER\INSTANCENAME" 
HTTPS_PORT="8012" 
WEBSERVICE_USER_CB="0" 
USERORGROUPACCOUNT="domain\WLBgroup" 
CERT_CHOICE="0" 
CERTNAMEPICKED="cn=wlb-cert1" 
EXPORTCERT=1
EXPORTCERT_FQFN="C:\Certificates\WLBCert.cer"
INSTALLDIR="C:\Program Files\Citrix\WLB" 
ADDLOCAL="Database,Complete,Services,DataCollection,
Analysis_Engine,DWM_Web_Service" /l*v log.txt

There are two Workload Balancing Windows Installer packages: workloadbalancing.msi and workloadbalancingx64.msi. If you are installing Workload Balancing on a 64-bit operating system, specify workloadbalancingx64.msi.

To see if Workload Balancing Setup succeeded, see Section 5.3.5.3.1, “To verify your Workload Balancing installation”.

Following Workload Balancing Setup, you must configure and enable (that is, initialize) Workload Balancing on each resource pool you want to monitor before Workload Balancing can gather data for that pool.

Before initializing Workload Balancing, configure your antivirus software to exclude Workload Balancing folders, as described in Section 5.5.5, “Configuring Antivirus Software”.

After the initial configuration, the Initialize button on the WLB tab changes to a Disable button. This is because after initialization you cannot modify the Workload Balancing server a resource pool uses without disabling Workload Balancing on that pool and then reconfiguring it. For information, see Section 5.10.2, “Reconfiguring a Resource Pool to Use Another WLB Server”.

You can use the Configure Workload Balancing wizard in XenCenter or the XE commands to initialize Workload Balancing or modify the configuration settings.

Use this procedure to enable and perform the initial configuration of Workload Balancing for a resource pool.

Before the Workload Balancing feature can begin collecting performance data, the XenServers you want to balance must be part of a resource pool. To complete this wizard, you need the:

  1. In the Resources pane of XenCenter, select XenCenter > <your-resource-pool>.
  2. In the Properties pane, click the WLB tab.
  3. In the WLB tab, click Initialize WLB.
  4. In the Configure Workload Balancing wizard, click Next.
  5. In the Server Credentials page, enter the following:
  6. In the Basic Configuration page, do the following:
  7. Do one of the following:
  8. In Critical Thresholds page, accept or enter a new value in the Critical Thresholds boxes.Workload Balancing uses these thresholds when making virtual-machine placement and pool-optimization recommendations. Workload Balancing strives to keep resource utilization on a host below the critical values set. For information about adjusting these thresholds, see Critical Thresholds.
  9. In Metric Weighting page, if desired, adjust the sliders beside the individual resources. Moving the slider towards Less Important indicates that ensuring virtual machines always have the highest amount of this resource available is not as vital on this resource pool. For information about adjusting metric weighting, see Metric Weighting Factors.
  10. Click Finish.

After initialization, you can use this procedure to edit the Workload Balancing performance thresholds and placement strategies for a specific resource pool.

  1. In the Resources pane of XenCenter, select XenCenter > <your-resource-pool> .
  2. In the Properties pane, click the WLB tab.
  3. In the WLB tab, click Configure WLB.
  4. In the Configure Workload Balancing wizard, click Next.
  5. In the Basic Configuration page, do the following:
  6. Do one of the following:
  7. In Critical Thresholds page, accept or enter a new value in the Critical Thresholds boxes.Workload Balancing uses these thresholds when making virtual-machine placement and pool-optimization recommendations. Workload Balancing strives to keep resource utilization on a host below the critical values set. For information about adjusting these thresholds, see Section 5.5.7.1, “Critical Thresholds”.
  8. In Metric Weighting page, if desired, adjust the sliders beside the individual resources. Moving the slider towards Less Important indicates that ensuring virtual machines always have the highest amount of this resource available is not as vital on this resource pool. For information about adjusting metric weighting, see Section 5.5.7.2, “Metric Weighting Factors”.
  9. Click Finish.

Workload Balancing evaluates CPU, Memory, Network Read, Network Write, Disk Read, and Disk Write utilization for physical hosts in a resource pool.

Workload Balancing determines whether to recommend relocating a workload and whether a physical host is suitable for a virtual-machine workload by evaluating:

Workload Balancing provides recommendations about ways you can move virtual machines to optimize your environment. Optimization recommendations appear in the WLB tab in XenCenter. Optimization recommendations are based on the:

The optimization recommendations display the name of the virtual machine that Workload Balancing recommends relocating, the host it currently resides on, and the host Workload Balancing recommends as the machine's new location. The optimization recommendations also display the reason Workload Balancing recommends moving the virtual machine (for example, "CPU" to improve CPU utilization).

After you accept an optimization recommendation, XenServer relocates all virtual machines listed as recommended for optimization.

When Workload Balancing is enabled and you restart a virtual machine that is offline, XenCenter provides recommendations to help you determine the optimal physical host in the resource pool on which to start the virtual machine. Workload Balancing makes these placement recommendations by using performance metrics it previously gathered for that virtual machine and the physical hosts in the resource pool. Likewise, when Workload Balancing is enabled, if you migrate a virtual machine to another host, XenCenter recommends servers to which you can move that host. This Workload Balancing enhancement is also available for the Initial (Start On) Placement and Resume features

When you use these features with Workload Balancing enabled, host recommendations appear as star ratings beside the name of the physical host. Five empty stars indicates the lowest-rated (least optimal) server. When it is not possible to start or move a virtual machine to a host, an (X) appears beside the host name with the reason.

When Workload Balancing is enabled, if you take a physical host offline for maintenance (that is, suspend a server by entering Maintenance Mode), XenServer automatically migrates the virtual machines running on that host to their optimal servers when available. XenServer migrates them based on Workload Balancing recommendations (performance data, your placement strategy, and performance thresholds).

If an optimal server is not available, the words Click here to suspend the VM appear in the Enter Maintenance Mode dialog box. In this case, Workload Balancing does not recommend a placement because no host has sufficient resources to run this virtual machine. You can either suspend this virtual machine or exit Maintenance Mode and suspend a virtual machine on another host in the same pool. Then, if you reenter the Enter Maintenance Modedialog box, Workload Balancing might be able to list a host that is a suitable candidate for migration.