Red Hat Bugzilla – Bug 642826
virt-resize converts any other image format to raw without notifying user, instructions do not account for this
Last modified: 2011-07-14 15:18:36 EDT
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.
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
We will endeavour to fix this for 1.6.
Patch proposed upstream: