Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
vol-create-as should not allow to create image which capacity << allocation
it will generate virt-v2v get wrong image size from libvirt(capacity) ,it look very confusing if capacity << allocation
virt-v2v create a image metadata file when it convert a guest to rhevm , the metadata file's "SIZE=16777216"(read it from image's capacity),but actually image size is 8G
it is not correct
Version-Release number of selected component (if applicable):
libvirt-0.9.2-1.el6.x86_64
qemu-kvm-0.12.1.2-2.165.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.create a vol with virsh vol-create-as capacity << allocation
#virsh vol-create-as default vol-create.img 1G --allocation 8G --format raw
Vol vol-create.img created
# virsh vol-info /var/lib/libvirt/images/vol-create.img
Name: vol-create.img
Type: file
Capacity: 1.00 GB
Allocation: 8.00 GB
2.install a guest with vol-create.img ,guest named vol-create
3.virt-v2v convert this guest to rhevm NFS storage
#virt-v2v -o rhev -os 10.66.72.122:/mnt/sdb/manual_export -n rhevm vol-create
4. check the metadata file in NFS storage
## cat ./987c21e1-0e85-4c2f-a13d-dd7477015186/images/4be3ca79-445b-4414-b42c-b2196a1439ef/234013e8-23eb-4ddb-b430-75fc62c9ae11.meta
DOMAIN=987c21e1-0e85-4c2f-a13d-dd7477015186
VOLTYPE=LEAF
CTIME=1309501737
FORMAT=RAW
IMAGE=4be3ca79-445b-4414-b42c-b2196a1439ef
DISKTYPE=1
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=1309501737
POOL_UUID=00000000-0000-0000-0000-000000000000
SIZE=16777216
TYPE=PREALLOCATED
DESCRIPTION=Exported by virt-v2v
EOF
5.check the actually image size
# ll -sh ./987c21e1-0e85-4c2f-a13d-dd7477015186/images/4be3ca79-445b-4414-b42c-b2196a1439ef/234013e8-23eb-4ddb-b430-75fc62c9ae11
8.1G -rw-r--r-- 1 36 kvm 8.0G Jul 1 13:45 ./987c21e1-0e85-4c2f-a13d-dd7477015186/images/4be3ca79-445b-4414-b42c-b2196a1439ef/234013e8-23eb-4ddb-b430-75fc62c9ae11
Actual results:
vol-create can create a image capacity << allocation
Expected results:
vol-create can not create a image capacity << allocation
Additional info: