Bug 720271 - usb storage can not format in the guest
Summary: usb storage can not format in the guest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-11 10:00 UTC by Mike Cao
Modified: 2013-01-10 00:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-15 16:00:25 UTC
Target Upstream Version:


Attachments (Terms of Use)
Call trace in guest dmesg (8.02 KB, text/plain)
2011-07-11 10:04 UTC, Mike Cao
no flags Details

Description Mike Cao 2011-07-11 10:00:49 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# uname -r &&rpm -q qemu-kvm
2.6.32-166.el6.x86_64
qemu-kvm-0.12.1.2-2.169.el6.x86_64


How reproducible:
2/2

Steps to Reproduce:
1.prepare a pre-installed guest 
2.qemu-img create -f qcow2 test.img 20G
3.start the pre-installed guest with -drive file=test,if=none,id=test1,format=qcow2,cache=none,werror=stop,rerror=stop -device usb-storage,drive=test1,id=test1
3.in the guest fdisk /dev/sda to make it as partition :/dev/sda1
4,mkfs.ext4 /dev/sda1 

  
Actual results:
format will never completed.Call trace found in guest dmesg.

Expected results:
disk could be formatted successfully.


Additional info:
FUll commandline:
/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -name Test -uuid 2e426ce8-0cfa-48f7-13df-5cfaa2d15368 -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/Test.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=threads -device virtio-blk-pci,bus=pci.0,addr=0x5,bootindex=1,drive=drive-virtio-disk0,id=virtio-disk0,scsi=on -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:07:ce:0d,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -drive file=test,if=none,id=test1,format=qcow2,cache=none,werror=stop,rerror=stop -device usb-storage,drive=test1,id=test1 -monitor stdio

Comment 1 Mike Cao 2011-07-11 10:04:33 UTC
Created attachment 512168 [details]
Call trace in guest dmesg

Comment 2 Mike Cao 2011-07-12 05:30:26 UTC
Tried with  -device usb-ehci,id=ehci the problem was gone ,close as not a bug ,sorry for inconvenience

Comment 3 juzhang 2011-08-04 08:31:00 UTC
for now we still support usb 1.1 (UHCI controller),reopen this issue
Hit this issue with qemu-kvm-tools-0.12.1.2-2.175.el6.x86_64.
Command line
-usb -device usb-hub,bus=usb.0,port=1 -device usb-storage,bus=usb.0,port=1.1,drive=usbstick1

Comment 4 Gerd Hoffmann 2011-08-12 09:22:41 UTC
How long did you wait?  Note that usb-storage attached to UHCI is *very* slow, so it will take a while, but it should succeed in the end.

Comment 5 Mike Cao 2011-08-15 09:13:03 UTC
(In reply to comment #4)
> How long did you wait?  Note that usb-storage attached to UHCI is *very* slow,
> so it will take a while, but it should succeed in the end.

It costs me 9m15s to format 1GB UHCI usb disk ,

Comment 6 Gerd Hoffmann 2011-08-15 16:00:25 UTC
Ok, so it actually works, great.  That it can take 10 minutes is normal.
You can use smaller disks (such as 32 MB) for USB 1.1 to speed up testing.


Note You need to log in before you can comment on or make changes to this bug.