Bug 587605

Summary: Failed to re-base qcow2 snapshot
Product: Red Hat Enterprise Linux 5 Reporter: Qunfang Zhang <qzhang>
Component: kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.6CC: ehabkost, kwolf, lihuang, llim, mjenner, ndai, tburke, virt-maint, ykaul
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-180.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 23:35:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qunfang Zhang 2010-04-30 11:19:38 UTC
Description of problem:
Install a RHEL5.5-64 guest and create snapshot chains
Base image (RHEL5.5-64.qcow2) -- > sn1 --> sn2 --> sn3 --> sn4 --> sn5

Then rebase sn2 to base image, failed.
#qemu-img rebase -b sn3 -F qcow2 -f qcow2 sn5

Version-Release number of selected component (if applicable):
kvm-83-172.el5
2.6.18-194.el5

How reproducible:
100%

Steps to Reproduce:
1.Install a rhel5.5-64 qcow2 format image and create snapshot chain.
2.Rebase snapshot
3.
  
Actual results:
#qemu-img rebase -b sn3 -F qcow2 -f qcow2 sn5
qemu-img: Error while writing to COW image: Permission denied

Expected results:
Rebase successfully.

Additional info:

Comment 1 Kevin Wolf 2010-04-30 12:02:55 UTC
Does this work with 170? Looks like it's related to Naphtali's read-only support which was added in 171. Adding him to CC.

Comment 2 Qunfang Zhang 2010-05-04 05:19:28 UTC
Re-test in kvm-170, and this issue does not exist.

This time I only create sn1,sn2 and sn3, write some file in each snapshot, and then rebase sn3 to sn1.
# qemu-img rebase -b sn1 -F qcow2 -f qcow2 sn3

in kvm-170:
# qemu-img rebase -b sn1 -F qcow2 -f qcow2 sn3
# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 80G (85899345920 bytes)
disk size: 230M
cluster_size: 65536
backing file: sn1 (actual path: sn1)

in kvm-172:
[root@localhost ~]# qemu-img rebase -b sn1 -F qcow2 -f qcow2 sn3
qemu-img: Error while writing to COW image: Permission denied

Comment 8 Qunfang Zhang 2010-05-14 07:00:30 UTC
Verified on kvm-83-180.el5, passed.

Comment 10 Qunfang Zhang 2010-11-02 06:31:29 UTC
Verified on kvm-83-207.el5, host install tree: RHEL5.6-Server-20101029.0, with the steps in bug description. passed.
So, I will change the status to VERIFIED.

Comment 12 errata-xmlrpc 2011-01-13 23:35:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0028.html