LIO-VM

The Linux SCSI Target Wiki

Jump to: navigation, search

LIO-VM is the www.linux-iscsi.org virtual machine for 32-bit x86 on Ubuntu 7.10 and Debian 4.

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.

Note that the iSCSI Target default configuration is to grant all iSCSI Initiators read-only access to all iSCSI Target Ports across all available iSCSI Network Portals.

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.

Virtualized Linux/iSCSI Targets in JeOS/VMware, JeOS/QEMU and Debian/QEMU i386 VMs on a Debian Etch i386 host. The PlayStation 3 is running iSCSI HD.

Contents

Downloads

Ubuntu/JeOS

i386 paravirt-OPs Ubuntu JeOS images (2.6.22-14-virtual):

Debian

i386 iSCSI/Optical Debian VMware6 images (2.6.18-5-686):

Notes

Images

There are two VMware Workstation 6.x/Fusion compatible .vmx LIO-VM image available:

Host OS requirements

The host OS requirements to run the LIO-VM Demo for VMware are:

OS support

The LIO-VM has been successfully run on Linux v2.6, MacOSX Leopard, and WinXP/NT:

Features

The following devices and/or features should work:

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.

Limitations

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:

> /sbin/LIO-demo.sh

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.

Updates

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

Read/Write LUNs

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:

> LIO-demo.sh

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.

New features

VMI
Virtual Machine Interface (VMI) from Vmware to allocate iSCSI resources via the VMI hypervisor.
Xen
Diskless boot from Dom0.
QEMU
exporting iSCSI LUNs as storage to VMs.

See also

External links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense