[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Using vhost scsi

From: Yehuda Yitschak
Subject: Re: [Qemu-discuss] Using vhost scsi
Date: Tue, 26 Jul 2016 18:35:30 +0000

Hi Stefan

Thanks a lot for the detailed answer 

I managed to run virtio-scsi and i am benchmarking the performance

just curios, does virtio-scsi deliver about the same performance as vhost-scsi 

i was surprised to learn that vhost-scsi isn't widely used.
i thought vhost-scsi should be the favored solution since it should be faster 
but i guess the features you mentioned are also a significant factor.



From: Stefan Hajnoczi <address@hidden>
Sent: Tuesday, July 26, 2016 3:52 PM
To: Yehuda Yitschak
Cc: address@hidden; Shadi Ammouri; address@hidden
Subject: Re: Using vhost scsi

> i figured out how to use virtio-blk but i can't find any reference on
> how to use vhost scsi

Back in 2012 I used the following host CD-ROM passthrough script for
testing.  Nowadays I would suggest looking into targetcli
(http://linux-iscsi.org/wiki/Targetcli) instead of poking configfs

I haven't touched vhost-scsi for years so I'm afraid I can't answer many
questions about it.

Note that QEMU supports virtio-scsi (where the SCSI target is emulated
by QEMU instead of by the host kernel SCSI target).  vhost-scsi isn't
widely used and does not support QEMU block layer features (migrating
storage, backups/snapshots, image formats like qcow2, etc).  Therefore
you may wish to look at virtio-scsi instead.  It is supported by
libvirt and virt-manager so configuration is well-documented.

mount -t configfs none /sys/kernel/config
modprobe target_core_mod
modprobe target_core_pscsi
modprobe tcm_vhost
cd /sys/kernel/config/target/
mkdir -p /sys/kernel/config/target/vhost/naa.60014059811d880b/tpgt_1/lun/lun_0
mkdir -p /sys/kernel/config/target/core/pscsi_0/sr0
echo -n 'scsi_host_id=1,scsi_channel_id=0,scsi_target_id=0,scsi_lun_id=0' 
echo -n '/dev/sr0' >/sys/kernel/config/target/core/pscsi_0/sr0/udev_path
echo -n 1 >/sys/kernel/config/target/core/pscsi_0/sr0/enable
echo -n naa.60014059811d880d 
cd /sys/kernel/config/target/vhost/naa.60014059811d880b/tpgt_1/lun/lun_0
ln -s ../../../../../core/pscsi_0/sr0/ .
cd - >/dev/null
    -enable-kvm -m 512 -nographic \
    -kernel arch/x86/boot/bzImage \
    -initrd virtio_scsi_guest_initramfs.gz \
    -append console=ttyS0 \
    -vhost-scsi id=vhost-scsi0,wwpn=naa.60014059811d880b,tpgt=1 \
    -device virtio-scsi-pci,vhost-scsi=vhost-scsi0,event_idx=off

reply via email to

[Prev in Thread] Current Thread [Next in Thread]