15
Before you create an SR, you need to configure the iSCSI storage. To be part of a pool, the iSCSI storage must have
a static IP address or be DNS addressable. You will also need to provide an iSCSI target LUN on the SAN for the
VM storage, and then configure XenServer hosts to be able to see and access it. 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 need to 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 using XenCenter to create SRs for iSCSI and NetApp 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 LUN(s).
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 may
not span more than one LUN. Any data present on the chosen LUN will be 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 using the xe CLI:
1. On the console of any server in the pool, run 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 name or IP address of the iSCSI server. The
device-config-LUNid argument can be a list of LUN IDs (separated by commas). Since the shared