From: Asias He <asias@redhat.com>
To: Libaiqing <libaiqing@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"nab@linux-iscsi.org" <nab@linux-iscsi.org>,
Haofeng <haofeng@huawei.com>, Paolo Bonzini <pbonzini@redhat.com>,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module
Date: Thu, 20 Jun 2013 17:38:36 +0800 [thread overview]
Message-ID: <20130620093836.GA19790@hj.localdomain> (raw)
In-Reply-To: <5D9ACBBCF6B270468D615C4719A59BE359CD3EF9@szxeml548-mbx.china.huawei.com>
On Thu, Jun 20, 2013 at 08:49:50AM +0000, Libaiqing wrote:
> Hi Asias,
> Thanks for your config.
> According to you config,I test booting from vhost device with upstream kernel and qemu,but failed.
>
> 1 installing guest from cdrom,ok.
> 2 booting vhost-scsi,guest fs error occurs.
> 3 using fileio backstores,the error is same..
> 4 rebooting guest,a log printed:
> (qemu) hw/scsi/virtio-scsi.c:533:virtio_scsi_handle_event: Object 0x7fccae7f2c88 is not an instance of type virtio-scsi-device
Paolo, I remember you fixed a similar issue?
> 5 using upstream seabios,core dumped.
>
> Could you give me some advise to debug this problem ? I can provide more information if need.
Can you show me qemu commit id you used? Can you verity that if using the
host kernel for guest helps? Does booting directly (without the install
and reboot process) work?
> The qemu cmd:
> [root@fedora121 x86_64-softmmu]# ./qemu-system-x86_64 -enable-kvm -name fedora -M pc -m 1024 -smp 2 -drive file=/home/fedora18.iso,if=ide,media=cdrom -device vhost-scsi-pci,wwpn=naa.50014057133e25dc -monitor stdio -vga qxl -vnc :1
>
> The vnc output:
> Dracut-initqueue[189]:/dev/mapper/fedora-root:UNEXPECTED INCONSISTENCY;RUN FSCK MANUALLY.
> Dracut-initqueue[189]: Warning: e2fsck returned with 4
> Dracut-initqueue[189]: Warning: ***An error occurred during the file system check.
>
> The guest kernel log:
> Kernel: virtio-pci 0000:00:04.0: irq 40 for MSI/MSI-X
> Kernel: virtio-pci 0000:00:04.0: irq 41 for MSI/MSI-X
> Kernel: virtio-pci 0000:00:04.0: irq 42 for MSI/MSI-X
> Kernel: virtio-pci 0000:00:04.0: irq 43 for MSI/MSI-X
> Kernel: scsi2 : Virtio SCSI HBA
> Kernel: scsi 2:0:1:0: Direct-Access LIO-ORG r0
> Kernel: sd 2:0:1:0: Attached scsi generic sg1 type 0
> Kernel: sd 2:0:1:0: [sda]1258912 512-byte logical .....
> Kernel: sd 2:0:1:0: [sda]write protect is off
> Kernel: sd 2:0:1:0: [sda]Mode sense :43 00 00 08
> Kernel: sd 2:0:1:0: [sda]write cache: disabled, read .....
> Kernel: sda sda1 sda2
> Kernel: sd 2:0:1:0: [sda] Attached SCSI disk
> Dracut-initqueue[189]: Scanning devices sda2 for LVM
> Dracut-initqueue[189]: inactive '/dev/fedora/swap'...
> Dracut-initqueue[189]: inactive '/dev/fedora/root'...
>
> The info of host:
> [root@fedora121 x86_64-softmmu]# uname -a
> Linux fedora121 3.10.0-rc6 #1 SMP Wed Jun 19 19:34:24 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
> [root@fedora121 x86_64-softmmu]# lsmod |grep vhost_scsi
> vhost_scsi 49456 5
> target_core_mod 282163 14 target_core_iblock,target_core_pscsi,iscsi_target_mod,target_core_file,vhost_scsi
> [root@fedora121 x86_64-softmmu]# targetcli
> targetcli shell version v2.1.fb26
> Copyright 2011 by RisingTide Systems LLC and others.
> For help on commands, type 'help'.
>
> /> ls
> o- / ......................................................................................................................... [...]
> o- backstores .............................................................................................................. [...]
> | o- block .................................................................................................. [Storage Objects: 0]
> | o- fileio ................................................................................................. [Storage Objects: 0]
> | o- pscsi .................................................................................................. [Storage Objects: 0]
> | o- ramdisk ................................................................................................ [Storage Objects: 1]
> | o- r0 ................................................................................................... [(6.0GiB) activated]
> o- iscsi ............................................................................................................ [Targets: 0]
> o- loopback ......................................................................................................... [Targets: 0]
> o- vhost ............................................................................................................ [Targets: 1]
> o- naa.50014057133e25dc .............................................................................................. [TPGs: 1]
> o- tpg1 ............................................................................................... [naa.5001405a70ac3421]
> o- acls .......................................................................................................... [ACLs: 0]
> o- luns .......................................................................................................... [LUNs: 1]
> o- lun0 ..................................................................................................... [ramdisk/r0]
>
> Regards,
> baiqing
> > -----Original Message-----
> > From: Asias He [mailto:asias@redhat.com]
> > Sent: Thursday, June 20, 2013 9:34 AM
> > To: Libaiqing
> > Cc: Paolo Bonzini; Wenchao Xia; qemu-devel@nongnu.org;
> > nab@linux-iscsi.org; Michael S. Tsirkin; Haofeng
> > Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the
> > tcm_vhost Linux kernel module
> >
> > On Wed, Jun 19, 2013 at 12:55:10PM +0000, Libaiqing wrote:
> > > Hi paolo,
> > > The vhost-scsi device can be used as boot device?
> > > I tested with your config + 3.10 rc6 + seabios 1.7.2.2,but failed.
> > > Could you give me some advise to debug this problem ? I can provide
> > more information if need.
> >
> > Boot from vhost-scsi is supposed to work. The seabios you used should be
> > fine which contains the fixes for vhost-scsi.
> >
> > Instead of playing with the /sys/kernel/config/target directly, I really
> > recommend using targetcli utils.
> >
> > Nab, I think we really should write some docs for people to use
> > vhost-scsi.
> >
> > This is how I install and use targetcli in RHEL6. Note you need upstream
> > kernel and qemu bits for vhost-scsi.
> >
> > # yum groupinstall 'Development tools'
> > # yum install python-devel epydoc python-simpleparse
> >
> > # git clone git://github.com/agrover/rtslib-fb.git
> > # git clone git://github.com/agrover/targetcli-fb.git
> > # git clone git://github.com/agrover/configshell-fb.git
> > # for i in rtslib-fb configshell-fb targetcli-fb; do
> > make -C $i rpm
> > yum localinstall $i/dist/*.noarch.rpm
> > done
> >
> > In targetcli, create a backstore and vhost wwpn, e.g.
> > # targetcli
> > /> /backstores/ramdisk create r0 1g
> > /> /vhost create
> > /> cd /vhost/naa.500140527cb6616b/tpg1/luns
> > /> create /backstores/ramdisk/r0
> >
> > # qemu -device vhost-scsi-pci,wwpn=naa.500140527cb6616b ...
> >
> > Hope this helps.
> >
> > > Regards,
> > > baiqing
> > >
> > > > -----Original Message-----
> > > > From: qemu-devel-bounces+libaiqing=huawei.com@nongnu.org
> > > > [mailto:qemu-devel-bounces+libaiqing=huawei.com@nongnu.org] On
> > > > Behalf Of Paolo Bonzini
> > > > Sent: Tuesday, May 28, 2013 4:01 PM
> > > > To: Wenchao Xia
> > > > Cc: asias@redhat.com; qemu-devel@nongnu.org; nab@linux-iscsi.org;
> > > > Michael S. Tsirkin
> > > > Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting
> > the
> > > > tcm_vhost Linux kernel module
> > > >
> > > > Il 28/05/2013 09:13, Wenchao Xia ha scritto:
> > > > >> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> > > > >> >
> > > > >> > The WWPN specified in configfs is passed to "-device
> > vhost-scsi-pci".
> > > > >> > The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not
> > > > >> > available from the QEMU command-line. Instead, I hardcode it to
> > > > zero.
> > > > >> >
> > > > > Hi, Paolo
> > > > > Any document about how to config it correctly in configfs, before
> > > > > invoking qemu with the WWPN number?
> > > >
> > > > Unfortunately no, but vhost-scsi doesn't have many knobs (unlike
> > > > iSCSI for example) so it's quite simple. Here is an example:
> > > >
> > > > cd /sys/kernel/config/target
> > > > mkdir -p core/fileio_0/fileio
> > > > echo
> > 'fd_dev_name=/home/pbonzini/test.img,fd_dev_size=5905580032' >
> > > > core/fileio_0/fileio/control
> > > > echo 1 > core/fileio_0/fileio/enable
> > > > mkdir -p vhost/naa.600140554cf3a18e/tpgt_0/lun/lun_0
> > > > cd vhost/naa.600140554cf3a18e/tpgt_0
> > > > ln -sf ../../../../../core/fileio_0/fileio/ lun/lun_0/virtual_scsi_port
> > > > echo naa.60014053226f0388 > nexus
> > > >
> > > > The "nexus" value is the initiator WWN. naa.600140554cf3a18e is the
> > > > target WWN that you have to pass to "-device vhost-scsi-pci".
> > > >
> > > > Paolo
> > >
> >
> > --
> > Asias
--
Asias
next prev parent reply other threads:[~2013-06-20 9:39 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 14:24 [Qemu-devel] [PULL 0/9] SCSI updates for 2013-04-13 Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 1/9] scsi: avoid assertion failure on VERIFY command Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 2/9] scsi: VMWare PVSCSI paravirtual device implementation Paolo Bonzini
2013-06-21 3:47 ` Libaiqing
2013-06-21 7:36 ` Paolo Bonzini
2013-06-21 11:44 ` Dmitry Fleytman
2013-06-21 12:00 ` Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 3/9] vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 4/9] virtio-scsi: create VirtIOSCSICommon Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 5/9] virtio: simplify Makefile conditionals Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module Paolo Bonzini
2013-05-28 7:13 ` Wenchao Xia
2013-05-28 8:01 ` Paolo Bonzini
2013-05-28 8:33 ` Asias He
2013-05-28 9:00 ` Wenchao Xia
2013-05-29 9:05 ` Wenchao Xia
2013-05-29 9:27 ` Asias He
2013-05-29 15:10 ` Badari Pulavarty
2013-05-29 22:17 ` Asias He
2013-05-30 4:29 ` Nicholas A. Bellinger
2013-05-30 5:36 ` Nicholas A. Bellinger
2013-05-30 18:00 ` Badari Pulavarty
2013-06-06 22:53 ` [Qemu-devel] vhost-scsi and pscsi Badari
2013-05-30 2:09 ` [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module Wenchao Xia
2013-06-19 12:55 ` Libaiqing
2013-06-20 1:33 ` Asias He
2013-06-20 3:22 ` Wenchao Xia
2013-06-20 8:49 ` Libaiqing
2013-06-20 9:38 ` Asias He [this message]
2013-06-21 10:16 ` Libaiqing
2013-07-03 3:08 ` Libaiqing
2013-07-03 3:18 ` Asias He
2013-07-03 3:23 ` Asias He
2013-07-03 8:08 ` Asias He
2013-07-03 12:33 ` Libaiqing
2013-07-04 11:23 ` Paolo Bonzini
2013-07-08 0:59 ` Libaiqing
2013-07-04 7:00 ` Libaiqing
2013-07-05 0:00 ` Asias He
2013-07-05 6:52 ` Asias He
2013-07-05 11:17 ` Vadim Rozenfeld
2013-07-10 1:50 ` Asias He
2013-04-19 14:24 ` [Qemu-devel] [PATCH 7/9] vhost-scsi-pci: " Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 8/9] vhost-scsi-ccw: " Paolo Bonzini
2013-04-19 14:24 ` [Qemu-devel] [PATCH 9/9] vhost-scsi-s390: " Paolo Bonzini
2013-04-23 23:17 ` [Qemu-devel] [PULL 0/9] SCSI updates for 2013-04-13 Nicholas A. Bellinger
2013-04-24 5:59 ` [Qemu-devel] seabios for qemu 1.5 Gerd Hoffmann
2013-04-24 6:11 ` Amos Kong
2013-05-16 4:46 ` Amos Kong
2013-05-27 6:17 ` Gerd Hoffmann
2013-04-30 16:01 ` Paolo Bonzini
2013-04-24 4:56 ` [Qemu-devel] [PULL 0/9] SCSI updates for 2013-04-13 Stefan Weil
2013-04-24 8:19 ` Paolo Bonzini
2013-04-24 16:56 ` Stefan Weil
2013-04-26 8:40 ` Paolo Bonzini
2013-06-17 21:18 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130620093836.GA19790@hj.localdomain \
--to=asias@redhat.com \
--cc=haofeng@huawei.com \
--cc=libaiqing@huawei.com \
--cc=mst@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiawenc@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).