Let's look at a slightly more complicated example of using storage pools by defining an iSCSI-backed pool.
Creating an iSCSI target and logging it on the initiator server is beyond the scope of this recipe, so we assume that you have an iSCSI target ready to be used from a remote server. The new storage pool definition is as follows:
<pool type='iscsi'> <name>iscsi_virtimages</name> <source> <host name='iscsi-target.linux-admins.net'/> <device path='iqn.2004-04.ubuntu:ubuntu16:iscsi.libvirtkvm'/> </source> <target> <path>/dev/disk/by-path</path> </target></pool>
The file is very similar to the directory-backed storage pool, the main difference are the following attributes:
- The <host> attribute specifies the hostname of ...