Bug 1047254 - qemu-img failed to commit image
Summary: qemu-img failed to commit image
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-30 07:01 UTC by xhan
Modified: 2014-06-18 08:09 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-1.5.3-47.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:33:44 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description xhan 2013-12-30 07:01:39 UTC
Description of problem:

After creating snapshot image, then commit the image, qemu-img prompts "qemu-img: Error while committing image". 


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

qemu-kvm-rhev-1.5.3-30.el7.x86_64
qemu-img-1.5.3-30.el7.x86_64
kernel-3.10.0-64.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. create snapshot
  qemu-img create -f qcow2 -b sles11-32-virtio.qcow2 -F qcow2 sn1.qcow2 20G
2. start the guest with the snapshot image
   qemu \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga qxl  \
    -global qxl-vga.vram_size=33554432  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20131227-183708-YpvJERPo,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20131227-183708-YpvJERPo,path=/tmp/seabios-20131227-183708-YpvJERPo,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20131227-183708-YpvJERPo,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=unsafe,snapshot=off,aio=native,file=sn1.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \
    -m 8192  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
    -cpu 'Opteron_G3' \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off  \
    -no-kvm-pit-reinjection \
    -enable-kvm
3. commit snapshot to backingfile
   qemu-img commit -f qcow2 sn1.qcow2

Actual results:
qemu-img: Error while committing image

Expected results:
commit snapshot to backingfile should work normally.

Additional info:

image: sles11-64-virtio.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 2.4G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

Comment 2 Jeff Cody 2014-01-13 20:20:28 UTC
The offline commit, and active layer live commits, did not resize the base image file if the top image file was larger.  Patches submitted upstream.

Comment 3 Jeff Cody 2014-01-27 22:36:34 UTC
Patches for this are all in upstream master, but waiting on one final patch (removal of .bdrv_make_empty stubs in qcow2 and qed drivers) prior to posting this to rhvirt-patches.

Comment 5 Miroslav Rezanina 2014-02-12 12:02:26 UTC
Fix included in qemu-kvm-1.5.3-47.el7

Comment 7 Sibiao Luo 2014-02-13 09:20:33 UTC
Reproduce and Verify this issue with the same steps as comment #0.

#### Reproduce:
host info:
host info:
# uname -r && rpm -q qemu-kvm-rhev
3.10.0-86.el7.x86_64
qemu-kvm-rhev-1.5.3-39.el7.x86_64

Results:
after step 3, qemu-img: Error while committing image

#### Verify:
host info:
# uname -r && rpm -q qemu-kvm-rhev
3.10.0-86.el7.x86_64
qemu-kvm-rhev-1.5.3-47.el7.x86_64

Results:
after step 3, commit snapshot to backingfile work normally.
#  qemu-img commit -f qcow2 sn1.qcow2
Image committed.

Base on above, this issue has been fixed correctly, move to VERIFIED status.

Best Regards,
sluo

Comment 8 Ludek Smid 2014-06-13 10:33:44 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.


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