The Linux SCSI Target Wiki
|This article needs a review and may need a cleanup or additional content. Please help improve this article to meet our quality standards. (12/3/2010)|
It consists of a set of VMware ESX, KVM and QEMU compatible VM images that contains a self-configuring iSCSI Target that runs on many diverse PC storage software and hardware configurations. When LIO-VM boots, the host local storage hardware that is made available to the guest is exported as iSCSI target ports, and made available to both local and remote iSCSI Initiator clients.
By default, the storage devices with filesystems will be exported as read-only to prevent multiple accesses by non-cluster filesystems. If you do know what you are doing with a non-cluster filesystem, and really want to enable read/write access LUNs, please see below.
i386 paravirt-OPs Ubuntu JeOS images (2.6.22-14-virtual):
- LIO-JeOS-VMware6 (99050274 bytes, md5sum)
- LIO-JeOS-KVM (88605611 bytes, md5sum)
- LIO-JeOS-Qemu (87135808 bytes, md5sum)
i386 iSCSI/Optical Debian VMware6 images (2.6.18-5-686):
There are two VMware Workstation 6.x/Fusion compatible .vmx LIO-VM image available:
- Debian Etch 4 i386: (2.6.18-5-686)
- JeOS / Ubuntu 7.10 i386: (2.6.22-14-virtual)
Host OS requirements
The host OS requirements to run the LIO-VM Demo for VMware are:
- Any i386 or x86_64 Linux v2.6 host that can run VMware Workstation 6.
- Any Apple Mac-tel hardware that can run VMware Fusion.
- Any XP or NT compatible host that can run VMware Workstation 6.
The LIO-VM has been successfully run on Linux v2.6, MacOSX Leopard, and WinXP/NT:
- USB connected flash and SATA/PATA devices.
- Internal SATA DVD and External SATA HD drives
- External USB DVD/HD devices are also supported.
The following devices and/or features should work:
- All USB direct-access (Flash, USB external PATA/SATA disk drives)
- All USB optical drives (CD, DVD, HD/DVD and BD)
- All PATA/SATA disk drives
- All PATA/SATA optical drives (CD, DVD, HD/DVD and BD)
- All PSCSI / FC / SAS hardware with correct host OS drivers.
Basically, if it works locally, and you can bring it into the guest, you can export it.
There are two images, because the Debian image has a work around to allow optical devices to work properly. Other than this difference, the two images should function as identical for other devices, host OS storage driver requirements not withstanding.
Currently with external HD optical drives, you need to use the Debian-LIO image to get USB v2.0 to work properly. On MacOSX/Fusion, this seems to be the only host of the three that work with in USB passthrough mode for USB v2.0 mode correctly. Otherwise with VMware Workstation 6 with Linux and Windows guests you need to configure a Virtual CD-ROM by editing the configuration within the VMware console and saving. At this point you will be able to boot the demo and it will be detected and configured as usual by LIO-VM.
Other than this known limitation for optical devices, everything else should work at noted above.
More network/storage configurations
New network and/or storage can be configured after the demo has booted.
For USB storage devices, make sure the LIO-VM instance has focus with VMware. Once the device is detected by the host OS, VMware will give you an message about the device going online. Wait 5-25 seconds for usb-storage in the guest to detect the device, and then run:
to reconfigure the LIO-VM demo. At this point, the storage devices will now to available as iSCSI Target Ports and Logical Units on the IP storage fabric. For non USB storage devices, if a new device can be brought online to the guest, run LIO-demo.sh once they have been registered within the Linux guest SCSI subsystem. A reboot of the guest may be required to detect changes to the VM.
The LIO-VM images are preconfigured to point at the binary repositories. To update the system, login to the shell and do:
# Stop the stack: > /etc/init.d/target stop # Update the repo > apt-get update # Install the latest tools > apt-get install target-utils # Install the latest kernel modules > apt-get install target-modules # The stack will reload.. # Restart the LIO stack in demo mode! > LIO-demo.sh
Non-clustered filesystems cannot allow multiple read/write accesses from multiple iSCSI initiators. Read/write demo mode can still be enabled on LUNs, but there's a certain risk that this will result in data corruption.
At your own risk, login to the shell, and edit
/sbin/LIO-demo.sh and set the following TPG attribute:
> /sbin/target-ctl settpgattrib demo_mode_lun_access=1
Save this file and exit. Then commit the change with:
Note that some iSCSI Initiators will require a disk rescan or reregister to move from read-only to read/write mode if they are already active on the Initiator side. Please refer to your host side SCSI disk subsystem documentation.
- Virtual Machine Interface (VMI) from Vmware to allocate iSCSI resources via the VMI hypervisor.
- Diskless boot from Dom0.
- exporting iSCSI LUNs as storage to VMs.