Bug 960803

Summary: The guest failed to start when having a file image disk created on host disk with 4096 sector
Product: Red Hat Enterprise Linux 7 Reporter: Shanzhi Yu <shyu>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, hhuang, huding, juzhang, mzhan, sluo, virt-maint, xutian
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-06 12:17:25 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 Shanzhi Yu 2013-05-08 03:19:48 UTC
Description of problem:
The guest failed to start when having a file image disk created on host disk with 4096 sector

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

libvirt-1.0.4-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Find the test machine with 4096 sector in Beaker:dell-per300-01.rhts.eng.bos.redhat.com

2. Confirm it has a disk of 4096 sector.

[root@dell-per300-01 ~]# fdisk -l /dev/sda

Disk /dev/sda: 160.0 GB, 160000000000 bytes, 312500000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
......................
[root@dell-per300-01 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 162.8 GB, 162842222592 bytes, 39756402 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0008e73a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     2622611    10490196   83  Linux
/dev/sdb2         2622720     3622720     4000004   83  Linux

3. create a guest named kvm-rhel6.4  on default dir pool backed on  sda

4. create a image backed on sdb
# mount /dev/sdb2/ /var/lib/libvirt/test/
# #qemu-img create -f qcow2 /var/lib/libvirt/test/test.qcow2 5G

5. add test.qcow2 to guest, make below configurations

<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/test/test.qcow2'/>
      <blockio logical_block_size='4096' physical_block_size='4096'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
7. start guest
# virsh start kvm-rhel6.4
error: Failed to start domain kvm-rhel6.4
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 (label charserial0)
qemu-kvm: -drive file=/var/lib/libvirt/test/test.qcow2,if=none,id=drive-virtio-disk1,format=qcow2,cache=none: could not open disk image /var/lib/libvirt/test/test.qcow2: Invalid argument

Actual results:


Expected results:


Additional info:

Comment 2 Xu Tian 2013-06-25 03:49:49 UTC
It is very similar to bz911990;

Comment 3 Ademar Reis 2013-12-06 12:17:25 UTC

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