Bug 752743 - Windows guest stopped with EIO when trying to initialize readonly disk
Summary: Windows guest stopped with EIO when trying to initialize readonly disk
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 825987
TreeView+ depends on / blocked
 
Reported: 2011-11-10 10:13 UTC by Mike Cao
Modified: 2013-01-10 00:31 UTC (History)
10 users (show)

Fixed In Version: buiild 21
Doc Type: Bug Fix
Doc Text:
Cause: Viostor driver doesn't reject write requests to read-only volume. Consequence: Attempt to format a read-only volume leads to qemu error. Fix: complete write requests with error if the target volume has read-only flag. Result: Attempts to format/write a read-only volume are rejected by viostor driver now.
Clone Of:
: 825987 (view as bug list)
Environment:
Last Closed: 2012-06-20 11:58:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0751 0 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2012-06-19 19:31:22 UTC

Description Mike Cao 2011-11-10 10:13:22 UTC
Description of problem:
Windows uest stopped with EIO after formatting readonly disk

Version-Release number of selected component (if applicable):
uname -r;rpm -q qemu-kvm virtio-win
2.6.32-216.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6.x86_64
virtio-win-1.3.2-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1.qemu-img create -f raw /home/tt.img 2G
2.start VM with readonly data image : -drive file=/home/tt.img,if=none,*readonly=on*,format=raw,werror=stop,rerror=stop,cache=none,id=drive-test,media=disk -device virtio-blk-pci,drive=drive-test,id=test
3.in the guest ,right click computer --> management-->Storage-->Disk Management
4.after step 3, it prompts "initialize disk" ,all click "OK" 
  
Actual results:
Guest stop due to block I/O error in device 'drive-test':Input/output error(5)
(qemu)cont does not help.

Expected results:
Guest should not stop.

Additional info:
CLI:
usr/libexec/qemu-kvm -M rhel6.2.0 -usb -device usb-tablet -cpu cpu64-rhel6,+x2apic -enable-kvm -m 4G -smp 2 -name win2k3_64 -uuid 411e21b1-1740-4117-8328-c8ae7c94068b -monitor stdio -rtc base=localtime,driftfix=slew -boot c -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/home/backup/test/win2003_32,if=none,id=drive-virtio-disk0,format=raw,serial=83-befe-af9a2dbb0177,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:0b:01,bus=pci.0 -chardev socket,id=channel0,host=127.0.0.1,port=12345,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=channel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -usb -vnc :10 -qmp tcp:0:4445,server,nowait -device virtio-balloon-pci,id=balloon0 -drive file=/home/tt.img,if=none,readonly=on,format=raw,werror=stop,rerror=stop,cache=none,id=drive-test,media=disk -device virtio-blk-pci,drive=drive-test,id=test

Comment 1 Vadim Rozenfeld 2011-11-27 10:50:36 UTC
Hi Mike,
 
What is the guest OS/service pack in your case?

Best,
Vadim.

Comment 2 Mike Cao 2011-11-28 03:26:07 UTC
(In reply to comment #1)
> Hi Mike,
> 
> What is the guest OS/service pack in your case?
> 
> Best,
> Vadim.

win7 32 and win7 64 ,I did not try other guest .

*note* remove werror=stop,rerror=stop will not hit this issue .
after adding the 2 params ,guest will can never continue any more .

Best Regards,
Mike

Comment 3 Vadim Rozenfeld 2012-01-23 10:19:36 UTC
Hi Mike,
Could you please check the latest driver from 
http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/21/win/virtio-win-prewhql-0.1.zip

best regards,
Vadim.

Comment 4 dawu 2012-01-30 08:16:55 UTC
(In reply to comment #3)
> Hi Mike,
> Could you please check the latest driver from 
> http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/21/win/virtio-win-prewhql-0.1.zip
> 
> best regards,
> Vadim.

Hi Vadim,

Verified this issue with the latest build on win2k3-64, win7-32/64, function of "initialize disk" is disabled and guest won't stop,so this issue fixed now.

Best Regards,
Dawn

Comment 5 Mike Cao 2012-02-10 02:53:24 UTC
Hi,Vadim

Could you add this bug to errata ?

Best Regards,
Mike

Comment 6 Vadim Rozenfeld 2012-02-10 08:12:14 UTC
Hi Mike,
It's already there:
https://errata.devel.redhat.com/errata/showrequest.cgi?id=12358

Kind regards,
Vadim.

Comment 7 Mike Cao 2012-02-10 08:21:15 UTC
(In reply to comment #6)
> Hi Mike,
> It's already there:
> https://errata.devel.redhat.com/errata/showrequest.cgi?id=12358
> 
> Kind regards,
> Vadim.

Oops, Sorry .
I did not receive errata notice about this bug .

Comment 8 Mike Cao 2012-02-10 09:01:31 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Hi Mike,
> > Could you please check the latest driver from 
> > http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/21/win/virtio-win-prewhql-0.1.zip
> > 
> > best regards,
> > Vadim.
> 
> Hi Vadim,
> 
> Verified this issue with the latest build on win2k3-64, win7-32/64, function of
> "initialize disk" is disabled and guest won't stop,so this issue fixed now.
> 
> Best Regards,
> Dawn

Re-veirifed with win7_64 bit guest 
steps:
1.qemu-img create -f raw /home/tt.img 2G
2.start VM with readonly data image : -drive
file=/home/tt.img,if=none,*readonly=on*,format=raw,werror=stop,rerror=stop,cache=none,id=drive-test,media=disk
-device virtio-blk-pci,drive=drive-test,id=test
3.in the guest ,right click computer --> management-->Storage-->Disk Management
4.after step 3, it prompts "initialize disk" ,all click "OK" 

Actual Results :
 on virtio-win-1.3.2 ,after clicking OK in Initialize dialog ,guest stop and will never continue.
 on virtio-win-prewhql-21 ,after clicking OK in Initialize dialog ,it prompts "The request could not be performed because of an I/O Device error

Based on above ,this issue has been fixed ald

Comment 9 Vadim Rozenfeld 2012-05-03 09:59:58 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Viostor driver doesn't reject write requests to read-only volume.  
Consequence: Attempt to format a read-only volume leads to qemu error.
Fix: complete write requests with error if the target volume has read-only flag.
Result: Attempts to format/write a read-only volume are rejected by viostor driver now.

Comment 10 errata-xmlrpc 2012-06-20 11:58:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0751.html


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