On Tue, Nov 1, 2011 at 9:03 PM, Thomas Schmitt <scdbac...@gmx.net> wrote: > Hi, > > Stefan Hajnoczi wrote: >> In the future I think it's appropriate to CC qemu-devel since others >> in the community may be interested in virtio-scsi discussions too. > > Ok. I'll forward my original mail and this reply to qemu-devel. > > >> The current state is that CD-ROM passthrough with virtio-scsi does not >> work yet because the in-kernel SCSI target needs a patch to allow the >> GET EVENT STATUS NOTIFICATION command which newish Linux kernel use to >> poll CD-ROMs. > > I have the exploration of this command on my own TODO list. > Good to know that it might make problems in the kernel. > > -------------------------------------------------------------------------- > >> In theory QEMU with -drive file=/dev/sg0,if=scsi,... should provide >> SCSI passthrough. QEMU is a userspace process so it uses the >> scsi-generic driver to pass through SCSI commands. You could try that >> (note this is without virtio-scsi and should work today in theory). > > The following experiments show quite ill effects. > > I could need instructions how to install and use qemu from git > on Debian GNU/Linux 6.0.2 without disturbing the installed > qemu-0.12.5 from apt-get. > > Currently i run 0.15.1 from release tarball as > ./qemu-0.15.1/i386-softmmu/qemu > with no special indication that this would cause the problems. > The installed 0.12.5 capsizes at the same occasionsi, albeit with > different symptoms. > > Nevertheless i get a message at startup > Could not open option rom 'sgabios.bin': No such file or directory > which indicates that this is not the intended way to have a qemu > for testing. > So when i get a git clone, it would be best to have a more > conventional test setup. (Be it only for kvm acceleration.)
If you want to ensure a self-contained environment try: qemu-0.15.1/i386-softmmu/qemu -L qemu-0.15.1/pc-bios ... The -L option sets QEMU's "data_dir" which is used as the base directory. There is code to auto-detect but it will prefer the system-wide /usr/share/qemu path instead of ../pc-bios, so explicitly setting this option is the right thing to do. > > -------------------------------------------------------------------------- > > First try is on qemu-0.15.1: > > ./qemu-0.15.1/i386-softmmu/qemu \ > -nographic \ > -m 512 \ > -net nic,model=ne2k_pci \ > -net user,hostfwd=tcp::5557-:22 \ > -hda /dvdbuffer/i386-install.qemu \ > -drive file=/dev/sg2,if=scsi,bus=4,unit=0,media=cdrom > > Now i have two drives by one option. > xorriso -devices reports > 0 -dev '/dev/sr0' rwrw-- : 'TSSTcorp' 'CDDVDW SH-S223B' > 1 -dev '/dev/sr1' rwrw-- : 'QEMU ' 'QEMU DVD-ROM' > with /dev/sr1 being an empty drive. (Is this a known bug ?) Off the top of my head I'd say this is an empty IDE CD-ROM drive which is added by default. Would need to check the code to be sure though. > But /dev/sr0 seems to work well, on the first glimpse. > > Trying to burn something, being logged in via SSH > > $ xorriso -dev /dev/sr0 -add /usr/lib > > reads old session, adds files, but when writing should begin: > > Connection to localhost closed by remote host. > Connection to localhost closed. > > and i get the host system prompt. > > The window where i ran qemu says: > > qemu: ./qemu_dir/qemu-0.15.1/hw/lsi53c895a.c:540: > lsi_do_dma: Assertion `s->current' failed. That's a bug in the LSI SCSI HBA emulation or a generic SCSI emulation problem in QEMU. I have CCed Paolo and Kevin who have recently been working on SCSI and IDE much more than me and know more. > With the installed qemu-0.12.5: Thanks for the extensive testing. I actually suggest focussing just on qemu.git/master because that is where developers mostly invest their time. The data points on older versions can be interesting but my guess is folks won't have time to debug them - instead let's make qemu.git/master work. Stefan