mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Introduce new XML tag "mode" for disk source
There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI from the storage pool source element host attribute, e.g. iscsi://demo.org:6000/iqn.1992-01.com.example/1 For a "volume" type disk, if the specified "pool" is of iscsi type, we should support to use the LUN in either of above 2 ways. That's why to introduce a new XML tag "mode" for the disk source (libvirt should support iscsi pool with libiscsi, but it's another new feature, which should be done later). The "mode" can be either of "host" or "direct". Use "host" to indicate use of the LUN with the path as it shows up on host. Use "direct" to indicate to use it with the source pool host URI (future patches may support to use network type libvirt storage too, e.g. Ceph)
This commit is contained in:
@@ -1601,7 +1601,16 @@
|
||||
<code>pool</code> and <code>volume</code>. Attribute <code>pool</code>
|
||||
specifies the name of storage pool (managed by libvirt) where the disk
|
||||
source resides, and attribute <code>volume</code> specifies the name of
|
||||
storage volume (managed by libvirt) used as the disk source.
|
||||
storage volume (managed by libvirt) used as the disk source. For a
|
||||
"volume" type disk, if the underlying storage pool is "iscsi", attribute
|
||||
<code>mode</code> (<span class="since">since 1.1.1</span>) can be used
|
||||
to indicate how to represent the LUN as the disk source. The value
|
||||
"host" indicates to use the LUN's path as it shows up on host, e.g.
|
||||
/dev/disk/by-path/ip-10.11.12.9:3260-iscsi-iqn.2013-06.fc:iscsi.iscsi0-lun-1).
|
||||
The value "direct" indicates to use the storage pool's
|
||||
<code>source</code> element <code>host</code> attribute as the
|
||||
disk source for the libiscsi URI, e.g.
|
||||
file=iscsi://demo.org:6000/iqn.1992-01.com.example/1.
|
||||
<span class="since">Since 0.0.3; <code>type='dir'</code> since
|
||||
0.7.5; <code>type='network'</code> since
|
||||
0.8.7; <code>protocol='iscsi'</code> since 1.0.4;
|
||||
|
||||
@@ -1173,6 +1173,14 @@
|
||||
<attribute name="volume">
|
||||
<ref name="volName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>host</value>
|
||||
<value>direct</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="startupPolicy"/>
|
||||
</optional>
|
||||
|
||||
Reference in New Issue
Block a user