Red Hat Bugzilla – Bug 633096
virt-resize calculates block device size incorrectly, doesn't work with qcow2 target
Last modified: 2011-07-14 15:14:40 EDT
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
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a qcow2 target file.
2. Try to resize with the qcow2 device as the target.
Will fail or say the target image is too small.
Should calculate the target size correctly and thus not fail.
Originally reported by Sean Darcy here:
Current code that calculates image size: