Bug 1462700 - [virtio-win]Win2016 identify hotplug disk as readonly device
[virtio-win]Win2016 identify hotplug disk as readonly device
Status: CLOSED DUPLICATE of bug 1466100
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Vadim Rozenfeld
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-19 06:56 EDT by aihua liang
Modified: 2017-06-28 23:22 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-28 23:22:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Server Manager display (deleted)
2017-06-19 06:56 EDT, aihua liang
no flags Details
data disk property check by cmd (75.24 KB, image/png)
2017-06-19 06:57 EDT, aihua liang
no flags Details
Ide disk in win2016 guest (98.88 KB, image/png)
2017-06-26 23:25 EDT, aihua liang
no flags Details
virtio blk disk online with read-only (100.07 KB, image/png)
2017-06-27 22:21 EDT, aihua liang
no flags Details

  None (edit)
Description aihua liang 2017-06-19 06:56:10 EDT
Description of problem:
Win2016 identify hotplug disk as readonly device

Version-Release number of selected component (if applicable):


How reproducible:
70%

Steps to Reproduce:
1.Start Win2016 guest with cmds:
   /usr/libexec/qemu-kvm \
    -sandbox off  \
    -machine pc  \
    -nodefaults  \
    -vga cirrus  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmpmonitor1-20170614-233639-etu9X2zc,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/monitor-catch_monitor-20170614-233639-etu9X2zc,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idhq2DAN  \
    -chardev socket,id=serial_id_serial0,path=/var/tmp/serial-serial0-20170614-233639-etu9X2zc,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20170614-233639-etu9X2zc,path=/var/tmp/seabios-20170614-233639-etu9X2zc,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20170614-233639-etu9X2zc,iobase=0x402 \
    -device ich9-usb-ehci1,id=usb1,addr=0x1d.7,multifunction=on,bus=pci.0 \
    -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=0x1d.0,firstport=0,bus=pci.0 \
    -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=0x1d.2,firstport=2,bus=pci.0 \
    -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=0x1d.4,firstport=4,bus=pci.0 \
    -drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=raw,serial=aliang,file=/home/kvm_autotest_root/images/win2016-64-virtio.raw \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=1,bus=pci.0,addr=0x3 \
    -device virtio-net-pci,mac=9a:43:44:45:46:47,id=idvMp6XX,vectors=4,netdev=id9qJxPT,bus=pci.0,addr=0x5  \
    -netdev tap,id=id9qJxPT,vhost=on \
    -m 6144  \
    -smp 6,cores=2,threads=1,sockets=3  \
    -cpu 'Broadwell',+kvm_pv_unhalt \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off,strict=off  \
    -no-shutdown \
    -enable-kvm \
    -monitor stdio \
    -spice ipv4,port=5000,disable-ticketing \

2.Hotplug a data disk.
  (qemu)__com.redhat_drive_add file=/home/data_disk.img,format=raw,id=data_disk,aio=native,cache=none
  (qemu)device_add virtio-blk-pci,id=data,drive=data_disk,bus=pci.0

3.Check data disk property in qemu
  (qemu)info block
drive_image1 (#block115): /home/kvm_autotest_root/images/win2016-64-virtio.raw (raw)
    Cache mode:       writeback, direct

data_disk (#block390): /home/data_disk.img (raw)
    Cache mode:       writeback, direct

    
4.Check data disk property in Win2016 guest
   4.1 Server Manager-->File and Storage Services-->Volumes-->Disks
   4.2 cmd->diskpart->select disk 1->detail disk

Actual results:
   In step 3.1, data disk is readonly, see attachment 1 [details].
   In step 3.2, data disk readonly=yes, see attachment 2 [details]

Expected results:
   Hotplug disk is not readonly.

Additional info:
Comment 2 aihua liang 2017-06-19 06:57 EDT
Created attachment 1289062 [details]
data disk property check by cmd
Comment 3 aihua liang 2017-06-23 01:33:13 EDT
Info for test version:
  kernel: 3.10.0-680.el7.x86_64
  qemu-kvm-rhev:qemu-kvm-rhev-2.9.0-10.el7.x86_64
  virtio-win version:virtio-win-1.9.1-0.el7.iso
Comment 4 lijin 2017-06-26 01:53:39 EDT
According to attachment2 [details],the disk is offline,I guess that's why it's read-only.
We tried with ide disk,it behaves same with blk:disk is readonly when it's offline.


Aihua,
Could you have a double confirm from your side whether ide hit the same issue?
If yes,this should be not-a-bug.
Comment 5 aihua liang 2017-06-26 22:43:10 EDT
Hi,lijin

  
  When i start guest with ide blk, it shows just offline, but not "read-only".


BR,
aliang
Comment 6 aihua liang 2017-06-26 23:25 EDT
Created attachment 1292164 [details]
Ide disk in win2016 guest
Comment 7 aihua liang 2017-06-27 22:21 EDT
Created attachment 1292542 [details]
virtio blk disk online with read-only
Comment 8 aihua liang 2017-06-27 22:25:49 EDT
(In reply to aihua liang from comment #5)
> Hi,lijin
> 
>   
>   When i start guest with ide blk, it shows just offline, but not
> "read-only".
> 
> 
> BR,
> aliang

Wrong info here, and useless attachment in comment 6, the fact is as bellow:
  When i start guest with ide blk, it shows online without read-only.
  When i bring virtio-blk disk online(diskpart-->select disk x-->online disk), it shows "online" with "read-only".

  Captured screen is as comment7.
Comment 9 lijin 2017-06-28 01:31:23 EDT
(In reply to aihua liang from comment #8)
> (In reply to aihua liang from comment #5)
> > Hi,lijin
> > 
> >   
> >   When i start guest with ide blk, it shows just offline, but not
> > "read-only".
> > 
> > 
> > BR,
> > aliang
> 
> Wrong info here, and useless attachment in comment 6, the fact is as bellow:
>   When i start guest with ide blk, it shows online without read-only.
>   When i bring virtio-blk disk online(diskpart-->select disk x-->online
> disk), it shows "online" with "read-only".
> 
>   Captured screen is as comment7.


ide disk behave the same as blk.
Seem the the default readonly value is Yes.
I think you need to run “attribute disk clear readonly” after online disk to clear the readonly.

aihua,could you have a confirm?
Comment 10 aihua liang 2017-06-28 03:28:47 EDT
(In reply to lijin from comment #9)
> (In reply to aihua liang from comment #8)
> > (In reply to aihua liang from comment #5)
> > > Hi,lijin
> > > 
> > >   
> > >   When i start guest with ide blk, it shows just offline, but not
> > > "read-only".
> > > 
> > > 
> > > BR,
> > > aliang
> > 
> > Wrong info here, and useless attachment in comment 6, the fact is as bellow:
> >   When i start guest with ide blk, it shows online without read-only.
> >   When i bring virtio-blk disk online(diskpart-->select disk x-->online
> > disk), it shows "online" with "read-only".
> > 
> >   Captured screen is as comment7.
> 
> 
> ide disk behave the same as blk.
> Seem the the default readonly value is Yes.

  virtio-blk has different behavior with ide disk. When start win2016 guest with both ide and virtio-blk disks, ide disk shows "online" and virtio-blk shows "offline+readonly".


> I think you need to run “attribute disk clear readonly” after online disk to
> clear the readonly.

Yes, when i bring disk online by cmd, i need to run "attribute disk clear readonly" to clear the readonly tag.

> 
> aihua,could you have a confirm?
Comment 11 lijin 2017-06-28 03:39:12 EDT
(In reply to aihua liang from comment #10)
> (In reply to lijin from comment #9)
> > (In reply to aihua liang from comment #8)
> > > (In reply to aihua liang from comment #5)
> > > > Hi,lijin
> > > > 
> > > >   
> > > >   When i start guest with ide blk, it shows just offline, but not
> > > > "read-only".
> > > > 
> > > > 
> > > > BR,
> > > > aliang
> > > 
> > > Wrong info here, and useless attachment in comment 6, the fact is as bellow:
> > >   When i start guest with ide blk, it shows online without read-only.
> > >   When i bring virtio-blk disk online(diskpart-->select disk x-->online
> > > disk), it shows "online" with "read-only".
> > > 
> > >   Captured screen is as comment7.
> > 
> > 
> > ide disk behave the same as blk.
> > Seem the the default readonly value is Yes.
> 
>   virtio-blk has different behavior with ide disk. When start win2016 guest
> with both ide and virtio-blk disks, ide disk shows "online" and virtio-blk
> shows "offline+readonly".
> 
> 
> > I think you need to run “attribute disk clear readonly” after online disk to
> > clear the readonly.
> 
> Yes, when i bring disk online by cmd, i need to run "attribute disk clear
> readonly" to clear the readonly tag.
> 
> > 
> > aihua,could you have a confirm?

So the issue you want to track now becomes virtio-blk sometimes goes to offline,nothing related to readonly,right?

Could you change the bug title and describe the detailed steps(btw,only hotpluged disks hit this issue?).

And could you share the images somewhere as we can not reproduce from our side?

Thanks a lot
Comment 12 aihua liang 2017-06-28 23:22:45 EDT
Close the bug for mess, open a new one ---1466100 to track it.

*** This bug has been marked as a duplicate of bug 1466100 ***

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