Bug 849564

Summary: [virtio-wini][viostor]it should report a "write protected" error to the VM even with werror=stop when initializing readonly disk on rhel 5.9 host
Product: Red Hat Enterprise Linux 5 Reporter: dawu
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9CC: bcao, bsarathy, juzhang, michen, rhod
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-17 15:45:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dawu 2012-08-20 08:27:34 UTC
Description of problem:
“write protect” error should be provided even with werror=stop when initializing readonly disk instead of stopping vm and can not continue on rhel 5.9 host.

Version-Release number of selected component (if applicable):
kernel-2.6.18-335.el5
kvm-83-259.el5
virtio-win-1.0.3-1.52454.el5

How reproducible:
always

Steps to Reproduce:
1. Start guest with CLI:
   /usr/libexec/qemu-kvm -m 2G -smp 2 -cpu qemu64,+sse2 -drive file=win2k8-R2-back.qcow2,media=disk,if=virtio,cache=none,werror=stop,format=qcow2,boot=on -net nic,model=virtio,vlan=0,macaddr=00:10:14:14:78:10 -net tap,vlan=0,script=/etc/qemu-ifup0 -uuid 494632ea-3ea5-48f9-9382-f7c6f0dfb3d4 -monitor stdio -vnc :2 -boot dc -usbdevice tablet -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -startdate now -drive file=disk1.qcow2,media=disk,if=virtio,cache=none,werror=stop,format=qcow2,readonly=on

2. in the guest ,right click computer --> management-->Storage-->Disk Management

3. after step 2, it prompts "initialize disk" ,click "OK"

  
Actual results:
guest stopped and cont can not work.

Expected results:
guest should prompt "write protect" and guest shouldn't stop even with "werror=stop".

Additional info:
can not hit this issue when remove "werror=stop".

Comment 1 dawu 2012-08-20 09:48:53 UTC
Also tried on following scenarios with the same steps in bug description, did not hit this issue: 

Rhel6.4 host with rhel6.3 virtio-win driver
   kernel-2.6.32-294.el6.x86_64
   qemu-kvm-0.12.1.2-2.302.el6.x86_64
   virtio-win-1.5.3

Rhel5.9 host with rhel6.3 virtio-win driver
    kernel-2.6.18-335.el5
    kvm-83-259.el5
    virtio-win-1.5.3

Best Regards,
Dawn

Comment 2 dawu 2012-08-20 09:55:30 UTC
(In reply to comment #0)
> Description of problem:
> “write protect” error should be provided even with werror=stop when
> initializing readonly disk instead of stopping vm and can not continue on
> rhel 5.9 host.

> Actual results:
> guest stopped and cont can not work.
> 
> Expected results:
> guest should prompt "write protect" and guest shouldn't stop even with
> "werror=stop".
> 
correct the expect result as:
  it should report a "write protected" error to the VM even with werror=stop

> Additional info:
> can not hit this issue when remove "werror=stop".

Best Regards,
Dawn

Comment 3 Ronen Hod 2012-08-21 09:08:57 UTC
Good that it was solved in RHEL6 drivers.
So far we did not make any changes to RHEL5.9 virtio-win drivers (over 5.8), and this is probably not a regression, I prefer not to make the change this late.

Postponing the bug to 5.10 for re-consideration.
Thanks, Ronen.