[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 01/38] Documentation: Add section about iSCSI LUN
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH v3 01/38] Documentation: Add section about iSCSI LUNS to qemu-doc |
Date: |
Wed, 23 Nov 2011 11:44:51 +0000 |
From: Ronnie Sahlberg <address@hidden>
Add a new section about using iSCSI LUNs with qemu
and provide a short example on how to set up a target and access it
using the built-in initiator
Signed-off-by: Ronnie Sahlberg <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qemu-doc.texi | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 149e9bd..1abba98 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -421,6 +421,7 @@ snapshots.
* disk_images_fat_images:: Virtual FAT disk images
* disk_images_nbd:: NBD access
* disk_images_sheepdog:: Sheepdog disk images
+* disk_images_iscsi:: iSCSI LUNs
@end menu
@node disk_images_quickstart
@@ -695,6 +696,61 @@ qemu-img create
sheepdog:@var{hostname}:@var{port}:@var{image} @var{size}
qemu sheepdog:@var{hostname}:@var{port}:@var{image}
@end example
address@hidden disk_images_iscsi
address@hidden iSCSI LUNs
+
+iSCSI is a popular protocol used to access SCSI devices across a computer
+network.
+
+There are two different ways iSCSI devices can be used by QEMU.
+
+The first method is to mount the iSCSI LUN on the host, and make it appear as
+any other ordinary SCSI device on the host and then to access this device as a
+/dev/sd device from QEMU. How to do this differs between host OSes.
+
+The second method involves using the iSCSI initiator that is built into
+QEMU. This provides a mechanism that works the same way regardless of which
+host OS you are running QEMU on. This section will describe this second method
+of using iSCSI together with QEMU.
+
+In QEMU, iSCSI devices are described using special iSCSI URLs
+
address@hidden
+URL syntax:
+iscsi://[<username>[%<password>]@@]<host>[:<port>]/<target-iqn-name>/<lun>
address@hidden example
+
+Username and password are optional and only used if your target is set up
+using CHAP authentication for access control.
+Alternatively the username and password can also be set via environment
+variables to have these not show up in the process list
+
address@hidden
+export LIBISCSI_CHAP_USERNAME=<username>
+export LIBISCSI_CHAP_PASSWORD=<password>
+iscsi://<host>/<target-iqn-name>/<lun>
address@hidden example
+
+Howto set up a simple iSCSI target on loopback and accessing it via QEMU:
address@hidden
+This example shows how to set up an iSCSI target with one CDROM and one DISK
+using the Linux STGT software target. This target is available on Red Hat based
+systems as the package 'scsi-target-utils'.
+
+tgtd --iscsi portal=127.0.0.1:3260
+tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.qemu.test
+tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 \
+ -b /IMAGES/disk.img --device-type=disk
+tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 \
+ -b /IMAGES/cd.iso --device-type=cd
+tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
+
+qemu-system-i386 -boot d -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
+ -cdrom iscsi://127.0.0.1/iqn.qemu.test/2
address@hidden example
+
+
+
@node pcsys_network
@section Network emulation
--
1.7.7.1
- [Qemu-devel] [PATCH v3 00/38] block: generic copy-on-read, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 02/38] scsi: fix fw path, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 01/38] Documentation: Add section about iSCSI LUNS to qemu-doc,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v3 09/38] scsi-block: always use SG_IO for MMC devices, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 07/38] scsi: remove block descriptors from CDs, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 05/38] scsi: update list of commands, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 04/38] atapi: kill MODE SENSE(6), fix MODE SENSE(10), Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 08/38] scsi: pass down REQUEST SENSE to the device when there is no stored sense, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 06/38] scsi: fix parsing of allocation length field, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 13/38] scsi-generic: add as boot device, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 12/38] scsi: fix fw path, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 10/38] virtio-blk: fix cross-endian config space, Stefan Hajnoczi, 2011/11/23
- [Qemu-devel] [PATCH v3 03/38] scsi-disk: guess geometry, Stefan Hajnoczi, 2011/11/23