Bug 633096

Summary: virt-resize calculates block device size incorrectly, doesn't work with qcow2 target
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
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:14:40 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 Richard W.M. Jones 2010-09-12 20:40:27 UTC
Description of problem:

virt-resize calculates the size of the block device using the host file
size.  This is completely wrong and it naturally miscalculates things
like qcow2 targets.  It should instead use the guestfs_blockdev_getsize64
API.

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

1.5.12

How reproducible:

Always.

Steps to Reproduce:
1. Create a qcow2 target file.
2. Try to resize with the qcow2 device as the target.
3.
  
Actual results:

Will fail or say the target image is too small.

Expected results:

Should calculate the target size correctly and thus not fail.

Additional info:

Originally reported by Sean Darcy here:
https://www.redhat.com/archives/libguestfs/2010-September/msg00008.html

Comment 2 Richard W.M. Jones 2010-09-27 16:21:33 UTC
Patch posted:

https://www.redhat.com/archives/libguestfs/2010-September/msg00054.html