Bug 1428641

Summary: [virtio-win][viostor]Windows guest's physical block size change to "512" after installation with the size "4096"
Product: Red Hat Enterprise Linux 8 Reporter: aihua liang <aliang>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ailan, aliang, chayang, coli, dkutalek, jen, juzhang, kanderso, knoel, lijin, phou, virt-bugs, virt-maint, vrozenfe, xuwei, yfu
Version: 8.0   
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1645343 1721248 (view as bug list) Environment:
Last Closed: 2019-07-30 14:22:06 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:
Bug Depends On:    
Bug Blocks: 1645343, 1721248, 1725380    

Description aihua liang 2017-03-03 02:49:11 UTC
Description of problem:

   Physical block size change to "512" after installation with the size "4096" for windows guest.

Version-Release number of selected component (if applicable):
 kernel version:3.10.0-566.el7.x86_64
 qemu-kvm-rhev version:qemu-kvm-rhev-2.8.0-5.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1.Create a 20G qcow2 image:"check_block_size_image.qcow2"
  
2.Install a Win2016 guest with physical block size "4096", cmds as bellow:
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1'  \
-sandbox off  \
-machine pc  \
-nodefaults  \
-vga std  \
-chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmpmonitor1-20170302-023157-EI3EbutK,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control  \
-chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/monitor-catch_monitor-20170302-023157-EI3EbutK,server,nowait \
-mon chardev=qmp_id_catch_monitor,mode=control \
-device pvpanic,ioport=0x505,id=idV0oEZ0  \
-chardev socket,id=serial_id_serial0,path=/var/tmp/serial-serial0-20170302-023157-EI3EbutK,server,nowait \
-device isa-serial,chardev=serial_id_serial0  \
-chardev socket,id=seabioslog_id_20170302-023157-EI3EbutK,path=/var/tmp/seabios-20170302-023157-EI3EbutK,server,nowait \
-device isa-debugcon,chardev=seabioslog_id_20170302-023157-EI3EbutK,iobase=0x402 \
-device ich9-usb-ehci1,id=usb1,addr=1d.7,multifunction=on,bus=pci.0 \
-device ich9-usb
uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=1d.0,firstport=0,bus=pci.0 \
-device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=1d.2,firstport=2,bus=pci.0 \
-device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=1d.4,firstport=4,bus=pci.0 \
-drive id=drive_stg,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/check_block_size_image.qcow2 \
-device virtio-blk-pci,id=stg,drive=drive_stg,logical_block_size=512,physical_block_size=4096,bootindex=0,serial=TARGET_DISK0,bus=pci.0,addr=03 \
-device virtio-net-pci,mac=9a:56:57:58:59:5a,id=idp8F0oX,vectors=4,netdev=idRDZp3I,bus=pci.0,addr=04  \
-netdev tap,id=idRDZp3I,vhost=on \
-m 8192  \
-smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
-cpu 'SandyBridge',+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_vapic,hv_time \
-drive id=drive_cd1,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/home/kvm_autotest_root/iso/ISO/Win2016/en_windows_server_2016_x64_dvd_9327751.iso \
-device ide-cd,id=cd1,drive=drive_cd1,bootindex=1,bus=ide.0,unit=0 \
-drive id=drive_winutils,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/home/kvm_autotest_root/iso/windows/winutils.iso \
-device ide-cd,id=winutils,drive=drive_winutils,bootindex=2,bus=ide.0,unit=1 \
-drive id=drive_unattended,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/home/kvm_autotest_root/images/win2016-64/autounattend.iso \
-device ide-cd,id=unattended,drive=drive_unattended,bootindex=3,bus=ide.1,unit=0 \
-drive id=drive_virtio,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/home/kvm_autotest_root/iso/windows/virtio-win-1.9.0-3.el7.iso \
-device ide-cd,id=virtio,drive=drive_virtio,bootindex=4,bus=ide.1,unit=1 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
-vnc :0  \
-rtc base=localtime,clock=host,driftfix=slew  \
-boot order=cdn,once=d,menu=off,strict=off \
-enable-kvm
  
2.After the installation finished, check physical block size in guest.
  (Win2016)# powershell "get-disk|format list"

Actual results:
After step2, the physical block size is "512"

Expected results:
Physical block size should be "4096"

Additional info:

Comment 3 lijin 2017-03-03 05:43:34 UTC
same as https://bugzilla.redhat.com/show_bug.cgi?id=1134679#c13
If rhel guest does not hit this issue,I suggest change component to virtio-win

Comment 4 aihua liang 2017-03-03 10:52:38 UTC
The bug also exist in RHEL+qemu-kvm
 kernel version:3.10.0-568.el7.x86_64
 qemu-kvm version:qemu-kvm-1.5.3-132.el7.x86_64

Test Result:
 ERROR 1-smp_8.1024m.repeat1.run_test.Host_RHEL.m7.u4.qcow2.virtio_blk.up.virtio_net.Win2016.x86_64.io-github-autotest-qemu.check_block_size.4096_512.extra_cdrom_ks -> TestSetupFail: Block size in guest doesn't match with qemu parameter
Physical block size in guest: 512, expect: 4096
Logical block size in guest: 512, expect: 512

BTY, the problem not exist on rhel guest.

according to lijin's suggestion, change component to virtio-win.

Comment 5 Peixiu Hou 2017-11-10 06:40:33 UTC
Hit this bug on RHEL7.5 host with Win8-32 guest.

Used version info:

kernel-3.10.0-768.el7.x86_64
qemu-kvm-rhev-2.10.0-4.el7.x86_64
virtio-win-1.9.3-1.el7

Comment 6 Peixiu Hou 2018-07-12 09:50:51 UTC
*** Bug 1448021 has been marked as a duplicate of this bug. ***

Comment 7 Vadim Rozenfeld 2018-07-16 02:20:15 UTC
fix committed and merged upstream https://github.com/virtio-win/kvm-guest-drivers-windows/pull/312

Comment 8 lijin 2018-12-03 05:52:15 UTC
Hi Vadim,

I saw this bug has been in post status for a long time.

Could you help to generate a new build for it so QE can verify it?

Thanks a lot

Comment 9 Vadim Rozenfeld 2018-12-10 10:03:11 UTC
Hi Li Jin.

Please give a try to build 163 https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=812055

Thanks,
Vadim

Comment 10 Peixiu Hou 2018-12-12 05:57:34 UTC
(In reply to Vadim Rozenfeld from comment #9)
> Hi Li Jin.
> 
> Please give a try to build 163
> https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=812055
> 

I tested with build 163, cannot reproduce this issue.

Used versions:
kernel-4.18.0-48.el8.x86_64
qemu-kvm-common-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64
seabios-bin-1.11.1-2.module+el8+2179+85112f94.noarch
virtio-win-prewhql-163

Changed status to verified.

Thanks a lot~
Peixiu

Comment 11 Vadim Rozenfeld 2018-12-12 06:17:10 UTC
(In reply to Peixiu Hou from comment #10)
> (In reply to Vadim Rozenfeld from comment #9)
> > Hi Li Jin.
> > 
> > Please give a try to build 163
> > https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=812055
> > 
> 
> I tested with build 163, cannot reproduce this issue.
> 
> Used versions:
> kernel-4.18.0-48.el8.x86_64
> qemu-kvm-common-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64
> seabios-bin-1.11.1-2.module+el8+2179+85112f94.noarch
> virtio-win-prewhql-163
> 
> Changed status to verified.
> 
> Thanks a lot~
> Peixiu

Thank you.
Vadim.

Comment 12 Peixiu Hou 2018-12-12 06:17:50 UTC
*** Bug 1645343 has been marked as a duplicate of this bug. ***

Comment 16 lijin 2019-01-10 01:58:34 UTC
change status to verified according to comment#10

Comment 22 errata-xmlrpc 2019-07-30 14:22:06 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.

https://access.redhat.com/errata/RHEA-2019:1997