Using Citrix XenServer with NetApp ONTAP

Contributors netapp-ranuk netapp-aoife


This document provides guidance on ONTAP SAN host configuration settings for Citrix XenServer 7 series OS releases with FC, FCoE and iSCSi protocols.

SAN Booting

What you’ll need

If you decide to use SAN booting, it must be supported by your configuration. You can use the NetApp Interoperability Matrix Tool to verify that your OS, HBA, HBA firmware and the HBA boot BIOS, and ONTAP version are supported.

  1. Map the SAN boot LUN to the host.

  2. Verify multiple paths are available.

    Remember, multiple paths will only be available after the host OS is up and running on the paths.

  3. Enable SAN booting in the server BIOS for the ports to which the SAN boot LUN is mapped.

    For information on how to enable the HBA BIOS, see your vendor-specific documentation.

  4. Reboot the host to verify the boot is successful.


Multipath support in Citrix XenServer is based on the Device Mapper Multipathd components. Device mapper nodes are not automatically created for all LUNs presented to the XenServer and are only provisioned when LUNs are actively used by the Storage Management Layer (API). Citrix XenServer Storage Manager API plugin handles activating and deactivating multipath nodes automatically.

Due to incompatibilities with the Integrated Multipath Management architecture, Citrix recommends that you use the Citrix XenCenter application for managing the storage configuration. If it is necessary to query the status of Device Mapper tables manually, or list active device mapper multipath nodes on the system, you can use the /sbin/mpathutil status command to verify the settings for your ONTAP LUNs. For more information refer to the standard vendor documentation for Citrix XenServer.

Non-ASA Configuration

For non-ASA configuration there should be two groups of paths with different priorities. The paths with the higher priorities are Active/Optimized, meaning they are serviced by the controller where the aggregate is located. The paths with the lower priorities are active but are non-optimized because they are served from a different controller. The non-optimized paths are only used when no optimized paths are available.


The following example displays the correct output for an ONTAP LUN with two Active/Optimized paths and two Active/Non-Optimized paths:

# mpathutil status
show topology
3600a098038303458772450714535317a dm-0 NETAPP  , LUN C-Mode
size=80G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 2:0:2:0   sdc   8:32    active ready running
| |- 12:0:5:0  sdn   8:208   active ready running
| |- 2:0:6:0   sdg   8:96    active ready running
| `- 12:0:0:0  sdi   8:128   active ready running
`-+-`policy='service-time 0' prio=10 status=enabled
  |- 2:0:0:0   sda   8:0     active ready running
  |- 2:0:1:0   sdb   8:16    active ready running
  |- 12:0:3:0  sd1   8:176   active ready running
  `-12:0:6:0   sdo   8:224   active ready running
[root@sanhost ~]#
Note Do not use an excessive number of paths to a single LUN. No more than 4 paths should be required. More than 8 paths might cause path issues during storage failures.

The Citrix XenServer 7.x OS is compiled with all settings required to recognize and correctly manage ONTAP LUNs. For Citrix XenServer 7.x, an empty zerobyte /etc/multipath.conf file must exist, but you do not need to make specific changes to the file.

Enable the host multipath service from the Xencenter Management Portal and verify that the multipath service is enabled and running.

# systemct1 status multipathd
multipathd.service - Device-Mapper Multipath Device Controller
  Loaded:  load (/usr/lib/systemd/system/multipathd.service; enabled; vendor preset: enabled)
 Drop-In:  /etc/systemd/system/multipathd.service.d
  Active:  active (running) since Fri YYYY-MM-DD 00:00:26 IST; 1 month 9 days ago
Main PID:  3789 (multipathd)
  CGroup:  /control.slice/multipathd.service
            3789  /sbin/multipathd

There is no requirement to append content to the /etc/multipath.conf file, unless you have devices that you do not want to be managed by multipath or you have existing settings that override defaults. You can add the following syntax to the multipath.conf file to exclude the unwanted devices.

# cat /etc/multipath.conf
blacklist {
     wwid    <DevId>
     devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
     devnode "^hd[a-z]"
     devnode "^cciss.*"
Note Replace the <DevID> with the WWID string of the device you want to exclude.

In this example for Citrix XenServer 7.x, sda is the local SCSI disk that we need to the blacklist.

  1. Run the following command to determine the WWID:

    # lib/udev/scsi_id -gud /dev/sda
  2. Add this WWID to the blacklist stanza in the /etc/multipath.conf:

    #cat /etc/multipath.conf
    blacklist {
      wwid    3600a098038303458772450714535317a
      devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9*]"
      devnode "^hd[a-z]"
      devnode "^cciss.*"

Refer to the multipath parameter runtime configuration by using the $multipathd show config command. You should always check your running configuration for legacy settings that might be overriding default settings, especially in the defaults section.

The following table shows the critical multipathd parameters for ONTAP LUNs and the required values. If a host is connected to LUNs from other vendors and any of these parameters are overridden, they need to be corrected by later stanzas in multipath.conf that apply specifically to ONTAP LUNs. If this is not done, the ONTAP LUNs might not work as expected. The following defaults should only be overridden in consultation with NetApp and/or the OS vendor and only when the impact is fully understood.

Parameter Setting










"3 queue_if_no_path pg_init_retries 50"










"service-time 0"
















The following example illustrates how to correct an overridden default. In this case, the multipath.conf file defines values for path_checker and detect_prio that are not compatible with ONTAP LUNs. If they cannot be removed because of other SAN arrays attached to the host, these parameters can be corrected specifically for ONTAP LUNs with a device stanza.

# cat /etc/multipath.conf
defaults {
  path_checker readsector0
  detect_prio no
                vendor "NETAPP "
                product "LUN.*"
                path_checker tur
                detect_prio yes
Note Citrix XenServer recommends use of Citrix VM tools for all Linux and Windows based guest VMs for a supported configuration.

Known Problems and Limitations

There are no known problems and limitations.