Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 885047

Summary: Improve error message after block_resize with big size
Product: Red Hat Enterprise Linux 7 Reporter: langfang <flang>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, flang, hhuang, juli, juzhang, knoel, michen, mrezanin, qzhang, sluo, virt-maint, xfu, xigao
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: 2014-06-13 12:52:59 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 langfang 2012-12-07 11:11:13 UTC
Description of problem:
Improve error message after block_resize big size

Version-Release number of selected component (if applicable):
Host:
# uname -r
3.6.0-0.29.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.2.0-18.el7.x86_64

Guest:
uname -r 
2.6.32-344.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest
2.Block_resize big size         
(qemu) block_resize drive-virtio-disk0 10240--->sucessfully
(qemu) block_resize drive-virtio-disk0 20480--->succesfully
(qemu) block_resize drive-virtio-disk0 2242424242
An undefined error has occurred
(qemu) block_resize drive-virtio-disk0 2242424242
An undefined error has occurred
(qemu) block_resize drive-virtio-disk0 2242424242
An undefined error has occurred
(qemu) block_resize drive-virtio-disk0 2242424242
An undefined error has occurred

Actual results:


After block_resize big size,show "An undefined error has occurred".

Expected results:
Shoud give the error info can be described in detail.


Additional info:
1)virtio-blk virtio-scsi disk both have same problem.
2)Img type raw
3)After hit the problem,guest work well.
4)QMP
# telnet 10.66.85.215 4445
Trying 10.66.85.215...
Connected to 10.66.85.215.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 1}, "package": " (qemu-kvm-1.2.0)"}, "capabilities": []}}
{"execute": "qmp_capabilities"}
{"return": {}}
{ "execute": "block_resize", "arguments": { "device": "drive-ide0-0-0","size":47924729472947294729472947294729}}
{"error": {"class": "GenericError", "desc": "An undefined error has occurred"}}

CLI:
/usr/libexec/qemu-kvm -M  pc-1.2 -cpu Westmere -enable-kvm -uuid `uuidgen` -rtc base=localtime,clock=host,driftfix=slew -m 10G -smp 4,sockets=2,cores=2,threads=1 -name rhel6.3.z -drive file=/home/rhel6.4-latest.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=bus1,addr=0x4 -device scsi-hd,bus=bus1.0,drive=drive-virtio-disk0,id=virtio-scsi-pci0 -monitor stdio -boot c -vnc :0

Comment 1 Kevin Wolf 2013-05-06 09:18:21 UTC
Fixed in upstream qemu.git commit 8732901e.

Comment 2 Miroslav Rezanina 2013-05-23 11:57:28 UTC
Build in qemu-kvm-1.5.0-1.el7

Comment 3 Jun Li 2013-10-21 09:05:35 UTC
Reproduce this bug:
Version-Release number of selected component (if applicable):
Host:
qemu-kvm-1.4.0-4.el7.x86_64
1.Boot guest
# <cli> -drive file=/root/test-bkl.qcow2_v3,if=none,id=drive-virtio0-2-1,media=disk,werror=stop,rerror=stop,cache=none,format=qcow2 \
-device virtio-blk-pci,bus=pcie.0,drive=drive-virtio0-2-1,id=virtio0-2-1 \
-drive file=/root/test-bkl-1.raw,if=none,id=drive

2.block_resize via qmp.
{ "execute": "block_resize", "arguments": { "device": "drive-virtio0-2-1", "size":50000000000000000000000000000}}
{"error": {"class": "GenericError", "desc": "An undefined error has occurred"}}

----------
Verify this bug:
both virtio-blk and virtio-scsi interface, and qcow2_v3 and raw format disk.

Version-Release number of selected component (if applicable):
Host:
qemu-kvm-rhev-1.5.3-9.el7.x86_64
3.10.0-34.el7.x86_64

Scenarios 1(virtio-scsi and qcow2_v3):
#<cli> -drive file=/root/test-scsi.qcow2_v3,if=none,id=storage1-1,media=disk,cache=none,format=qcow2 \
-device virtio-scsi-pci,id=scsi2,ioeventfd=off \
-device scsi-hd,drive=storage1-1,bus=scsi2.0,scsi-id=0,lun=0,id=juli-2

# qemu-img info /root/test-scsi.qcow2_v3
image: /root/test-scsi.qcow2_v3
file format: qcow2
virtual size: 69G (73741824000 bytes)
disk size: 140K
cluster_size: 65536

(qemu) block_resize storage1-1 20G
qcow2 doesn't support shrinking images yet

{ "execute": "block_resize", "arguments": { "device": "storage1-1", "size":5368709120}}
{"error": {"class": "GenericError", "desc": "this feature or command is not currently supported"}}


Scenarios 2(virtio-scsi and raw):
# <cli> -drive file=/root/test-scsi-1.raw,if=none,id=storage1-2,media=disk,cache=none,format=raw \
-device virtio-scsi-pci,id=scsi3,ioeventfd=off \
-device scsi-hd,drive=storage1-2,bus=scsi3.0,scsi-id=0,lun=0,id=juli-3 

# qemu-img info /root/test-scsi-1.raw
image: /root/test-scsi-1.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0

(qemu) block_resize storage1-2 5G
(qemu) block_resize storage1-2 10G
{ "execute": "block_resize", "arguments": { "device": "storage1-2", "size":5368709120}}
{"return": {}}
{ "execute": "block_resize", "arguments": { "device": "storage1-2", "size":21474836480}}
{"return": {}}

Scenarios 3(virtio-blk and qcow2_v3):
# <cli> -drive file=/root/test-bkl.qcow2_v3,if=none,id=drive-virtio0-2-1,media=disk,werror=stop,rerror=stop,cache=none,format=qcow2 \
-device virtio-blk-pci,bus=pcie.0,drive=drive-virtio0-2-1,id=virtio0-2-1 

# qemu-img info /root/test-bkl.qcow2_v3 
image: /root/test-bkl.qcow2_v3
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 136K
cluster_size: 65536

(qemu) block_resize drive-virtio0-2-1 5G
qcow2 doesn't support shrinking images yet
this feature or command is not currently supported

{ "execute": "block_resize", "arguments": { "device": "drive-virtio0-2-1", "size":5368709120}}
{"error": {"class": "GenericError", "desc": "this feature or command is not currently supported"}}

(qemu) block_resize drive-virtio0-2-1 20G
{ "execute": "block_resize", "arguments": { "device": "drive-virtio0-2-1", "size":21474836480}}
{"return": {}}


Scenarios 4(virtio-blk and raw):
# <cli> -drive file=/root/test-bkl-1.raw,if=none,id=drive-virtio0-2-2,media=disk,werror=stop,rerror=stop,cache=none,format=raw \
-device virtio-blk-pci,bus=pcie.0,drive=drive-virtio0-2-2,id=virtio0-2-2

# qemu-img info /root/test-bkl-1.raw 
image: /root/test-bkl-1.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0

(qemu) block_resize drive-virtio0-2-2 5G
(qemu) block_resize drive-virtio0-2-2 20G
{ "execute": "block_resize", "arguments": { "device": "drive-virtio0-2-2", "size":5368709120}}
{"return": {}}
{ "execute": "block_resize", "arguments": { "device": "drive-virtio0-2-2", "size":21474836480}} 
{"return": {}}
--

Based on above test, I think this bug is verified.

Comment 6 Ludek Smid 2014-06-13 12:52:59 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.