defaulting to "disk".
<p>
Using "lun" (<span class="since">since 0.9.10</span>) is only
- valid when type is "block" or "network" using the iSCSI protocol,
- and behaves identically to "disk",
+ valid when the <code>type</code> is "block" or "network" for
+ <code>protocol='iscsi'</code> or when the <code>type</code>
+ is "volume" when using an iSCSI source <code>pool</code>.
+ Configured in this manner, the LUN behaves identically to "disk",
except that generic SCSI commands from the guest are accepted
and passed through to the physical device. Also note that
device='lun' will only be recognized for actual raw devices,
Using "host" as the <code>mode</code> value indicates to use the
LUN's path as it shows up on host (e.g.
'file=/dev/disk/by-path/ip-example.com:3260-iscsi-iqn.2013-07.com.example:iscsi-pool-lun-1').
+
+ Using a LUN from an iSCSI source pool provides the same
+ features as a <code>disk</code> configured using
+ <code>type</code> 'block' or 'network and <code>device</code>
+ of 'lun' with respect to how the LUN is presented to and
+ may used by the guest.
+
</p>
</dd>
</dl>
<choice>
<ref name="diskSourceNetwork"/>
<ref name="diskSourceBlock"/>
+ <ref name="diskSourceVolume"/>
</choice>
<ref name="diskSpecsExtra"/>
</interleave>
static int
qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
virDomainDefPtr vmdef,
- virDomainDeviceDefPtr dev)
+ virDomainDeviceDefPtr dev,
+ virConnectPtr conn)
{
virDomainDiskDefPtr disk;
virDomainNetDefPtr net;
_("target %s already exists"), disk->dst);
return -1;
}
+ if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
+ return -1;
if (qemuCheckDiskConfig(disk) < 0)
return -1;
if (virDomainDiskInsert(vmdef, disk))
VIR_DOMAIN_DEVICE_ACTION_ATTACH) < 0)
goto endjob;
- if ((ret = qemuDomainAttachDeviceConfig(qemuCaps, vmdef, dev)) < 0)
+ if ((ret = qemuDomainAttachDeviceConfig(qemuCaps, vmdef, dev,
+ dom->conn)) < 0)
goto endjob;
}