On Fri, Aug 17, 2012 at 12:26 PM, Asias He <[email protected]> wrote:
> This patch brings virito-scsi support to kvm tool.
>
> With the introduce of tcm_vhost (vhost-scsi)
>
> tcm_vhost: Initial merge for vhost level target fabric driver
>
> we can implement virito-scsi by simply having vhost-scsi to handle the
> SCSI command.
>
> Howto use:
> 1) Setup the tcm_vhost target through /sys/kernel/config
>
> [Stefan Hajnoczi, Thanks for the script to setup tcm_vhost]
>
> ** Setup wwpn and tpgt
> $ wwpn="naa.0"
> $ tpgt=/sys/kernel/config/target/vhost/$wwpn/tpgt_0
> $ nexus=$tpgt/nexus
> $ mkdir -p $tpgt
> $ echo -n $wwpn > $nexus
>
> ** Setup lun using /dev/ram
> $ n=0
> $ lun=$tpgt/lun/lun_${n}
> $ data=/sys/kernel/config/target/core/iblock_0/data_${n}
> $ ram=/dev/ram${n}
> $ mkdir -p $lun
> $ mkdir -p $data
> $ echo -n udev_path=${ram} > $data/control
> $ echo -n 1 > $data/enable
> $ ln -s $data $lun
>
> 2) Run kvm tool with the new disk option '-d scsi:$wwpn:$tpgt', e.g
> $ lkvm run -k /boot/bzImage -d ~/img/sid.img -d scsi:naa.0:0
>
> Signed-off-by: Asias He <[email protected]>
> Cc: Nicholas A. Bellinger <[email protected]>
> Cc: Stefan Hajnoczi <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
Looks good to me. I'll sit on this for a little while if the
virtio-scsi folks want to comment on the code.
Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html