Installation and deployment scenarios

This section steps through the following common installation and deployment scenarios:

  • One or more XenServer hosts with local storage

  • Pools of XenServer hosts with shared storage:

    • Multiple XenServer hosts with shared NFS storage

    • Multiple XenServer hosts with shared iSCSI storage

XenServer hosts with local storage

The simplest deployment of XenServer is to run VMs on one or more XenServer hosts with local storage.

Note:

XenMotion live migration of VMs between XenServer hosts is only available when they share storage. However, Storage XenMotion is still available.

Basic hardware requirements

  • One or more 64-bit x86 servers with local storage

  • One or more Windows systems, on the same network as the XenServer hosts

High-level procedure

  1. Install the XenServer host software on the servers.
  2. Install XenCenter on the systems.
  3. Connect XenCenter to the XenServer hosts.

After you connect XenCenter to the XenServer hosts, storage is automatically configured on the local disk of the hosts.

Pools of XenServer hosts with shared storage

A pool comprises multiple XenServer host installations, bound together as a single managed entity. When combined with shared storage, a pool enables VMs to be started on any XenServer host in the pool that has sufficient memory. The VMs can then dynamically be moved between hosts while running (XenMotion) with minimal downtime. If an individual XenServer host suffers a hardware failure, you can restart the failed VMs on another host in the same pool.

If the High Availability (HA) feature is enabled, protected VMs are automatically moved if there is a host failure.

To set up shared storage between hosts in a pool, create a storage repository. XenServer storage repositories (SR) are storage containers in which virtual disks are stored. SRs, like virtual disks, are persistent, on-disk objects that exist independently of XenServer. SRs can exist on different types of physical storage devices, both internal and external, including local disk devices and shared network storage. Several different types of storage are available when you create an SR, including:

  • NFS VHD storage

  • Software iSCSI storage

  • Hardware HBA storage

This following sections step through setting up two common shared storage solutions – NFS and iSCSI – for a pool of XenServer hosts. Before you create an SR, configure your NFS or iSCSI storage. Setup differs depending on the type of storage solution that you use. For details, see your vendor documentation. In all cases, to be part of a pool, the servers providing shared storage must have static IP addresses or be DNS addressable. For further information on setting up shared storage, see Storage.

We recommend that you create a pool before you add shared storage. For pool requirements and setup procedures, see the XenCenter Help or Hosts and Resource Pools.

XenServer hosts with shared NFS storage

Basic hardware requirements

  • Two or more 64-bit x86 servers with local storage

  • One or more Windows systems, on the same network as the XenServer hosts

  • A server exporting a shared directory over NFS

High-level procedure

  1. Install the XenServer host software on the servers.

  2. Install XenCenter on the systems.

  3. Connect XenCenter to the XenServer hosts.

  4. Create your pool of XenServer hosts.

  5. Configure the NFS server.

  6. Create an SR on the NFS share at the pool level.

Configuring your NFS storage

Before you create an SR, configure the NFS storage. To be part of a pool, the NFS share must have a static IP address or be DNS addressable. Configure the NFS server to have one or more targets that can be mounted by NFS clients (for example, XenServer hosts in a pool). Setup differs depending on your storage solution, so it is best to see your vendor documentation for details.

To create an SR on the NFS share at the pool level in XenCenter:

  1. On the Resources pane, select the pool. On the toolbar, click the New Storage button. The New Storage Repository wizard opens.

  2. Under Virtual disk storage, choose NFS VHD as the storage type. Choose Next to continue.

  3. Enter a name for the new SR and the name of the share where it is located. Click Scan to have the wizard scan for existing NFS SRs in the specified location.

    Note:

    The NFS server must be configured to export the specified path to all XenServer hosts in the pool.

  4. Click Finish.

    The new SR appears in the Resources pane, at the pool level.

Creating an SR on the NFS share at the pool level using the xe CLI

  1. Open a console on any XenServer host in the pool.

  2. Create the storage repository on server:/path by entering the following:

    xe sr-create content-type=user type=nfs name-label=sr_name= \
                    shared=true device-config:server=server \
                    device-config:serverpath=path
    

    The device-config-server argument refers to the name of the NFS server and the device-config-serverpath argument refers to the path on the server. Since shared is set to true, the shared storage is automatically connected to every host in the pool. Any hosts that later join are also connected to the storage. The UUID of the created storage repository is printed to the console.

  3. Find the UUID of the pool by using the pool-list command.

  4. Set the new SR as the pool-wide default by entering the following:

    xe pool-param-set uuid=pool_uuid \
                    default-SR=storage_repository_uuid
    

    As shared storage has been set as the pool-wide default, all future VMs have their disks created on this SR.

XenServer hosts with shared iSCSI storage

Basic hardware requirements

  • Two or more 64-bit x86 servers with local storage

  • One or more Windows systems, on the same network as the XenServer hosts

  • A server providing a shared directory over iSCSI

High-level procedure

  1. Install the XenServer host software on the servers.

  2. Install XenCenter on the Windows systems.

  3. Connect XenCenter to the XenServer hosts.

  4. Create your pool of XenServer hosts.

  5. Configure the iSCSI storage.

  6. If necessary, enable multiple initiators on your iSCSI device.

  7. If necessary, configure the iSCSI IQN for each XenServer host.

  8. Create an SR on the iSCSI share at the pool level.

Configuring your iSCSI storage

Before you create an SR, configure the iSCSI storage. To be part of a pool, the iSCSI storage must have a static IP address or be DNS addressable. Provide an iSCSI target LUN on the SAN for the VM storage. Configure XenServer hosts to be able to see and access the iSCSI target LUN. Both the iSCSI target and each iSCSI initiator on each XenServer host must have a valid and unique iSCSI Qualified Name (IQN). For configuration details, it is best to see your vendor documentation.

Configuring an iSCSI IQN for each XenServer host

Upon installation, XenServer automatically attributes a unique IQN to each host. If you must adhere to a local administrative naming policy, you can change the IQN by entering the following on the host console:

xe-set-iscsi-iqn iscsi_iqn

Or, you can use the xe CLI by entering the following:

xe host-param-set uuid=host_uuid other-config-iscsi_iqn=iscsi_iqn

To create an SR on the iSCSI share at the pool level using XenCenter:

Warning:

When you create XenServer SRs on iSCSI or HBA storage, any existing contents of the volume are destroyed.

  1. On the Resources pane, select the pool. On the toolbar, click the New Storage button. The New Storage Repository wizard opens.

  2. Under Virtual disk storage, choose Software iSCSI as the storage type. Choose Next to continue.

  3. Enter a name for the new SR and then the IP address or DNS name of the iSCSI target.

    Note:

    The iSCSI storage target must be configured to enable every XenServer host in the pool to have access to one or more LUNs.

  4. If you have configured the iSCSI target to use CHAP authentication, enter the User and Password.

  5. Click the Discover IQNs button, and then choose the iSCSI target IQN from the Target IQN list.

    Warning:

    The iSCSI target and all servers in the pool must have unique IQNs.

  6. Click the Discover LUNs button, and then choose the LUN on which to create the SR from the Target LUN list.

    Warning:

    Each individual iSCSI storage repository must be contained entirely on a single LUN and cannot span more than one LUN. Any data present on the chosen LUN is destroyed.

  7. Click Finish.

    The new SR appears in the Resources pane, at the pool level.

To create an SR on the iSCSI share at the pool level by using the xe CLI:

Warning:

When you create XenServer SRs on iSCSI or HBA storage, any existing contents of the volume are destroyed.

  1. On the console of any server in the pool, run the command:

    xe sr-create name-label=name_for_sr \
        host-uuid=host_uuid device-config:target=iscsi_server_ip_address \
        device-config:targetIQN=iscsi_target_iqn device-config:SCSIid=scsi_id \
        content-type=user type=lvmoiscsi shared=true \
    

    The device-config:target argument refers to the name or IP address of the iSCSI server. Since the shared argument is set to true, the shared storage is automatically connected to every host in the pool. Any hosts that later join are also connected to the storage.

    The command returns the UUID of the created storage repository.

  2. Find the UUID of the pool by running the pool-list command.

  3. Set the new SR as the pool-wide default by entering the following:

    xe pool-param-set uuid=pool_uuid default-SR=iscsi_shared_sr_uuid
    

    As shared storage has been set as the pool-wide default, all future VMs have their disks created on this SR.