Installation guide

Chapter 26. Storage pools
230
3. Add a new pool (part 2)
Enter the target path for the device, the host name of the target and the source path (the IQN).
The Format option is not available as formatting is handled by the guests. It is not advised to edit
the Target Path. The default target path value, /dev/disk/by-path/, adds the drive path to
that folder. The target path should be the same on all hosts for migration.
Enter the hostname or IP address of the iSCSI target. This example uses
server1.example.com.
Enter the source path, the IQN for the iSCSI target. This example uses
iqn.2010-05.com.example.server1:trial1.
Press Finish to create the new storage pool.
26.1.5.3. Creating an iSCSI-based storage pool with virsh
1. Create the storage pool definition
The example below is an XML definition file for a iSCSI-based storage pool.
<name>trial1</name>
The name element sets the name for the storage pool. The name is required and must be
unique.
<uuid>afcc5367-6770-e151-bcb3-847bc36c5e28</uuid>
The optional uuid element provides a unique global identifier for the storage pool. The uuid
element can contain any valid UUID or an existing UUID for the storage device. If a UUID is
not provided, virsh will generate a UUID for the storage pool.
<host name='server1.example.com'/>
The host element with the name attribute specifies the hostname of the iSCSI server. The
host element attribute can contain a port attribute for a non-standard iSCSI protocol port
number.