XenSource
Skip navigation links
Overview Expand Overview
Products Expand Products
Solutions Expand Solutions
Support Services Expand Support Services
Partners Expand Partners
About Us Expand About Us
How to Buy

3.3. Installation and deployment scenarios

This section describes several common installation and deployment scenarios:

  • one or more XenServer Hosts with local storage
  • two or more XenServer Hosts with shared NFS storage
  • two or more XenServer Hosts with shared iSCSI storage

and details the steps that differ between scenarios.

3.3.1. XenServer Hosts with local storage

The simplest use of XenServer is to set up a simple network of VMs running on one or more XenServer Hosts without shared storage. This, of course, means that live relocation of VMs from one XenServer Host to another is not possible, as this requires shared storage.

Requirements

  • one or more x86 servers with local storage
  • one or more Windows workstations, on same network as the XenServer Hosts

Basic procedure

  1. Install XenServer Host software on server(s)

  2. Install XenCenter on workstation(s)

  3. Run XenCenter and connect to XenServer Hosts

3.3.2. XenServer Hosts with shared NFS storage

Adding shared storage to the XenServer network enables grouping of XenServer Hosts into Resource Pools, enabling live relocation of VMs and sharing of server resources.

Requirements

  • two or more x86 servers with local storage
  • one or more Windows workstations, on same network as the XenServer Hosts
  • a server exporting a shared directory via NFS

Note

To be part of a Resource Pool, the XenServer Hosts and the server or servers providing the shared NFS storage need to have static IP addresses.

Basic procedure

  1. Install XenServer Host software on server(s)

  2. Install XenCenter on workstation(s)

  3. Set up the NFS server

  4. Run XenCenter and connect to XenServer Hosts

  5. Choose one XenServer Host as a Pool master and join other XenServer Hosts to its Pool.

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

For this procedure, a server running a typical Linux distribution is assumed as the NFS server. Consult your Linux distribution documentation for further information.

Set up NFS share on NFS server

  1. Check to see if the portmap daemon is installed and running:

    # chkconfig --list portmap
    portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
    					

    Note that in the preceding example, runlevels 3, 4, and 5 say "on". That means that at boot, for runlevels 3, 4 and 5, the portmap daemon is started automatically. If either 3, 4 or 5 say "off," turn them on with the following command:

    chkconfig portmap on
    					
  2. Check to see if the NFS daemon is installed and running:

    # chkconfig --list nfs
    nfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
    					

    If either 3, 4 or 5 say "off," turn them on with the following command:

    chkconfig nfs on
    					
  3. Make a directory for the shared storage to live in:

    mkdir /<vm_share_dir>
    					
  4. Edit the file /etc/exports and add the line

    /<vm_share_dir>      *(rw,no_root_squash,sync)
    					

    Save and close the file.

  5. Restart the portmap and nfs daemons as follows:

    service portmap restart
    service nfs restart
    					

    The <vm_share_dir> should now be exported on the network and you should be able to use XenCenter to point to it using the Storage wizard. See the XenCenter online help for details.

Create an SR on the NFS share at the Pool level

  1. Open a host text console on any XenServer Host in the Pool.

  2. Create the Storage Repository on server:/path

    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 refers to the hostname of the NFS server and device-config-serverpath refers to the path on the server. Since shared is set to true, the shared storage will be automatically connected to every host in the Pool and any hosts that subsequently join will also be connected to the storage. The UUID of the created Storage Repository will be printed on the screen.

  3. Find the UUID of the Pool

    xe pool-list
  4. Set the shared storage as the Pool-wide default

    xe pool-param-set uuid=<UUID of the Pool> default-SR=<UUID of the Storage Repository>

    Since the shared storage has been set as the Pool-wide default, all future VMs will have their disks created on shared storage by default.

3.3.3. XenServer Hosts with shared iSCSI storage

Adding shared storage to the XenServer network enables grouping of XenServer Hosts into Resource Pools, enabling live relocation of VMs and sharing of server resources.

Requirements

  • two or more x86 servers with local storage
  • one or more Windows workstations, on same network as the XenServer Hosts
  • a server providing a shared directory via iSCSI

Note

To be part of a Resource Pool, the XenServer Hosts and the server or servers providing the shared iSCSI storage need to have static IP addresses.

Basic procedure

  1. Install XenServer Host software on server(s)

  2. Install XenCenter on workstation(s)

  3. Prepare the iSCSI storage

  4. If necessary, enable your iSCSI device for multiple initiators

  5. Run XenCenter and connect to XenServer Hosts

  6. Choose one XenServer Host as a Pool master and join other XenServer Hosts to its Pool.

  7. Configure the iSCSI IQN for each XenServer Host

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

The details of how to set up iSCSI storage differ between the various iSCSI solutions on the market. In general, though, you need to provide an iSCSI target on the SAN for the VM storage, and then configure XenServer Hosts to be able to see and connect to it. This is done by providing a valid iSCSI Qualified Name (IQN) to the iSCSI target and to the iSCSCI initiator on each XenServer Host.

Prepare the iSCSI storage

  1. Assign a virtual storage volume on the iSCSI SAN for VM storage
  2. Create IQNs on the SAN for each XenServer Host that will use the storage.

You can use either XenCenter or the CLI to configure the IQN for each XenServer Host and to create the SR. The following describes using the CLI; see the XenServer Help for details on using XenCenter.

To configure the iSCSI IQN for each XenServer Host via the CLI

  1. In the Text Console, issue the command:

    xe-set-iscsi-iqn <iSCSI-IQN>
    					

    Alternatively, the CLI can be used directly:

    xe host-param-set uuid=<host-UUID> other-config-iscsi_iqn=<iSCSI-IQN>
    					
  2. Repeat for each XenServer Host in the Pool.

To create an SR on the iSCSI share at the Pool level via the CLI

  1. In the Text Console of any server in the Pool, issue the command:

    xe sr-create name-label=<name for SR>
    content-type=user device-config-target=<iSCSI server IP address> 
    device-config-targetIQN=<iSCSI target IQN> 
    device-config-localIQN=<iSCSI local IQN>
    type=lvmoiscsi shared=true device-config-LUNid=<LUN ID>
    

    The device-config-target argument refers to the hostname or IP address of the iSCSI server. The device-config-LUNid argument can be a comma-separated list of LUN IDs. Since the shared argument is set to true, the shared storage will be automatically connected to every host in the Pool and any hosts that subsequently join will also be connected to the storage.

    The command returns the UUID of the created Storage Repository.

  2. Find the UUID of the Pool by issuing the command

    xe pool-list
    
  3. Set the shared storage as the Pool-wide default as follows:

    xe pool-param-set uuid=<UUID of the Pool> default-SR=<UUID of the iSCSI shared SR>
    

    Now that the shared storage has been set as the Pool-wide default, all future VMs will have their disks created on shared storage by default.