Bug 642826

Summary: virt-resize converts any other image format to raw without notifying user, instructions do not account for this
Product: [Community] Virtualization Tools Reporter: Adam Williamson <awilliam>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-14 19:18:36 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 Adam Williamson 2010-10-13 21:42:06 UTC
When resizing a disk image with virt-resize, the resulting image will be in raw format, no matter what format the input image was in. This is not explicitly called out in the output you get when using the tool or the manpage, and the instructions in the man page, if followed dumbly, fail to work because of this. The man page - http://libguestfs.org/virt-resize.1.html - in stage 6, 'Test', says to run 'virsh edit guestname' and then 'Change <source ...>', but it does not say to change the <driver> statement as well, which you will need to do unless the input image was also raw.

Possible solutions: output a disk image in the same format as the input image, or better document in the man page that the output image will always be in raw format, and add instructions to change the <driver> statement as well as the <source> statement in the machine definition.

Comment 1 Richard W.M. Jones 2010-10-14 07:50:59 UTC
This is actually a documentation bug.  You can create qcow2
from virt-resize by setting up a qcow2 container, eg:

qemu-img create -f qcow2 new.qcow 10G
virt-resize old.qcow new.qcow

(or even convert to/from qcow using this method).  However
since this is not in the documentation, no one knows about
it.

We will endeavour to fix this for 1.6.

Comment 2 Richard W.M. Jones 2010-10-18 12:36:14 UTC
Patch proposed upstream:
https://www.redhat.com/archives/libguestfs/2010-October/msg00031.html