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.

Bug 1088788

Summary: qemu-img creates truncated VMDK image with subformat=twoGbMaxExtentFlat
Product: Red Hat Enterprise Linux 6 Reporter: Fam Zheng <famz>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: bsarathy, chayang, juzhang, knoel, mkenneth, qzhang, rbalakri, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.432.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1039791 Environment:
Last Closed: 2014-10-14 06:58:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1039791    
Bug Blocks:    

Description Fam Zheng 2014-04-17 07:55:25 UTC
+++ This bug was initially created as a clone of Bug #1039791 +++

Description of problem:
The command:
qemu-img create -f vmdk -o subformat=twoGbMaxExtentFlat test.vmdk 1000G

will create a test.vmdk with truncated content, because of vmdk driver has a fixed size buffer.

Expected results:
A correct image should be created.

=====================================
$ cat test.vmdk 
# Disk DescriptorFile
version=1
CID=52a672ff
parentCID=ffffffff
createType="twoGbMaxExtentFlat"

# Extent description
RW 4194304 FLAT "test-f001.vmdk" 0
RW 4194304 FLAT "test-f002.vmdk" 0
RW 4194304 FLAT "test-f003.vmdk" 0
RW 4194304 FLAT "test-f004.vmdk" 0
RW 4194304 FLAT "test-f005.vmdk" 0
RW 4194304 FLAT "test-f006.vmdk" 0
RW 4194304 FLAT "test-f007.vmdk" 0
RW 4194304 FLAT "test-f008.vmdk" 0
RW 4194304 FLAT "test-f009.vmdk" 0
RW 4194304 FLAT "test-f010.vmdk" 0
RW 4194304 FLAT "test-f011.vmdk" 0
RW 4194304 FLAT "test-f012.vmdk" 0
RW 4194304 FLAT "test-f013.vmdk" 0
RW 4194304 FLAT "test-f014.vmdk" 0
RW 4194304 FLAT "test-f015.vmdk" 0
RW 4194304 FLAT "test-f016.vmdk" 0
RW 4194304 FLAT "test-f017.vmdk" 0
RW 4194304 FLAT "test-f018.vmdk" 0
RW 4194304 FLAT "test-f019.vmdk" 0
RW 4194304 FLAT "test-f020.vmdk" 0
RW 4194304 FLAT "test-f021.vmdk" 0
RW 4194304 FLAT "test-f022.vmdk" 0
RW 4194304 FLAT "test-f023.vmdk" 0
RW 4194304 FLAT "test-f024.vmdk" 0
RW 4194304 FLAT "test-f025.vmdk" 0
RW 4194304 FLAT "test-f026.vmdk" 0
RW 4194304 FLAT "test-f027.vmdk" 0
RW 4194304 FLAT "test-f028.vmdk" 0
RW 4194304 FLAT "test-f029.vmdk" 0
RW 4194304 FLAT "test-f030.vmdk" 0
RW 4194304 FLAT "test-f031.vmdk" 0
RW 4194304 FLAT "test-f032.vmdk" 0
RW 4194304 FLAT "test-f033.vmdk" 0
RW 4194304 FLAT "test-f034.vmdk" 0
RW 4194304 FLAT "test-f035.vmdk" 0
RW 4194304 FLAT "test-f036.vmdk" 0
RW 4194304 FLAT "test-f037.vmdk" 0
RW 4194304 FLAT "test-f038.vmdk" 0
RW 4194304 FLAT "test-f039.vmdk" 0
RW 4194304 FLAT "test-f040.vmdk" 0
RW 4194304 FLAT "test-f041.vmdk" 0
RW 4194304 FLAT "test-f042.vmdk" 0
RW 4194304 FLAT "test-f043.vmdk" 0
RW 4194304 FLAT "test-f044.vmdk" 0
RW 4194304 FLAT "test-f045.vmdk" 0
RW 4194304 FLAT "test-f046.vmdk" 0
RW 4194304 FLAT "test-f047.vmdk" 0
RW 4194304 FLAT "test-f048.vmdk" 0
RW 4194304 FLAT "test-f049.vmdk" 0
RW 4194304 FLAT "test-f050.vmdk" 0
RW 4194304 FLAT "test-f051.vmdk" 0
RW 4194304 FLAT "test-f052.vmdk" 0
RW 4194304 FLAT "test-f053.vmdk" 0
RW 4194304 FLAT "test-f054.vmdk" 0
RW 4194304 FLAT "test-f055.vmdk" 0
RW 4194304 FLAT "test-f056.vmdk" 0
RW 4194304 FLAT "test-f057.vmdk" 0
RW 4194304 FLAT "test-f058.vmdk" 0
RW 4194304 FLAT "test-f059.vmdk" 0
RW 4194304 FLAT "test-f060.vmdk" 0
RW 4194304 FLAT "test-f061.vmdk" 0
RW 4194304 FLAT "test-f062.vmdk" 0
RW 4194304 FLAT "test-f063.vmdk" 0
RW 4194304 FLAT "test-f064.vmdk" 0
RW 4194304 FLAT "test-f065.vmdk" 0
RW 4194304 FLAT "test-f066.vmdk" 0
RW 4194304 FLAT "test-f067.vmdk" 0
RW 4194304 FLAT "test-f068.vmdk" 0
RW 4194304 FLAT "test-f069.vmdk" 0
RW 4194304 FLAT "test-f070.vmdk" 0
RW 4194304 FLAT "test-f071.vmdk" 0
RW 4194304 FLAT "test-f072.vmdk" 0
RW 4194304 FLAT "test-f073.vmdk" 0
RW 4194304 FLAT "test-f074.vmdk" 0
RW 4194304 FLAT "test-f075.vmdk" 0
RW 4194304 FLAT "test-f076.vmdk" 0
RW 4194304 FLAT "test-f077.vmdk" 0
RW 4194304 FLAT "test-f078.vmdk" 0
RW 4194304 FLAT "test-f079.vmdk" 0
RW 4194304 FLAT "test-f080.vmdk" 0
RW 4194304 FLAT "test-f081.vmdk" 0
RW 4194304 FLAT "test-f082.vmdk" 0
RW 4194304 FLAT "test-f083.vmdk" 0
RW 4194304 FLAT "test-f084.vmdk" 0
RW 4194304 FLAT "test-f085.vmdk" 0
RW 4194304 FLAT "test-f086.vmdk" 0
RW 4194304 FLAT "test-f087.vmdk" 0
RW 4194304 FLAT "test-f088.vmdk" 0
RW 4194304 FLAT "test-f089.vmdk" 0
RW 4194304 FLAT "test-f090.vmdk" 0
RW 4194304 FLAT "test-f091.vmdk" 0
RW 4194304 FLAT "test-f092.vmdk" 0
RW 4194304 FLAT "test-f093.vmdk" 0
RW 4194304 FLAT "test-f094.vmdk" 0
RW 4194304 FLAT "test-f095.vmdk" 0
RW 4194304 FLAT "test-f096.vmdk" 0
RW 4194304 FLAT "test-f097.vmdk" 0
RW 4194304 FLAT "test-f098.vmdk" 0
RW 4194304 FLAT "test-f099.vmdk" 0
RW 4194304 FLAT "test-f100.vmdk" 0
RW 4194304 FLAT "test-f101.vmdk" 0
RW 4194304 FLAT "test-f102.vmdk" 0
RW 4194304 FLAT "test-f103.vmdk" 0
RW 4194304 FLAT "test-f104.vmdk" 0
RW 4194304 FLAT "test-f105.vmdk" 0
RW 4194304 FLAT "test-f106.vmdk" 0
RW 4194304 FLAT "test-f107.vmdk" 0
RW 4194304 FLAT "test-f108.vmdk" 0
RW 4194304 FLAT "test-f109.vmdk" 0
RW 4194304 FLAT "test-f110.vmdk" 0
RW 4194304 FLAT "test-f111.vmdk" 0
RW 4194304 FLAT "test-f112.vmdk" 0
RW 4194304 FLAT "test-f113.vmdk" 0
RW 4194304 FLAT "test-                        <- From here the description file is truncated

Comment 9 Jeff Nelson 2014-07-29 15:56:55 UTC
Fix included in qemu-kvm-0.12.1.2-2.432.el6

Comment 11 Sibiao Luo 2014-07-30 02:41:02 UTC
Reproduce this issue on qemu-kvm-rhev-0.12.1.2-2.431.el6.x86_64 with twoGbMaxExtentSparse and twoGbMaxExtentFlat subformat.

[root@amd-2427-32-1 home]# qemu-img create -f vmdk -o subformat=twoGbMaxExtentFlat test.vmdk 1T
Formatting 'test.vmdk', fmt=vmdk size=1099511627776 compat6=off subformat='twoGbMaxExtentFlat' zeroed_grain=off 

[root@amd-2427-32-1 home]# cat test.vmdk 
# Disk DescriptorFile
version=1
CID=53d8cb19
parentCID=ffffffff
createType="twoGbMaxExtentFlat"

# Extent description
RW 4194304 FLAT "test-f001.vmdk" 0
RW 4194304 FLAT "test-f002.vmdk" 0
RW 4194304 FLAT "test-f003.vmdk" 0
...
RW 4194304 FLAT "test-f111.vmdk" 0
RW 4194304 FLAT "test-f112.vmdk" 0
RW 4194304 FLAT "test-f113.vmdk" 0
RW 4194304 FLAT "test-[root@amd-2427-32-1 home]# 

[root@amd-2427-32-1 home]# qemu-img create -f vmdk -o subformat=twoGbMaxExtentSparse test.vmdk 1T
Formatting 'test.vmdk', fmt=vmdk size=1099511627776 compat6=off subformat='twoGbMaxExtentSparse' zeroed_grain=off 
[root@amd-2427-32-1 home]# 
[root@amd-2427-32-1 home]# cat test.vmdk 
# Disk DescriptorFile
version=1
CID=53d8cb30
parentCID=ffffffff
createType="twoGbMaxExtentSparse"

# Extent description
RW 4194304 SPARSE "test-s001.vmdk"
RW 4194304 SPARSE "test-s002.vmdk"
RW 4194304 SPARSE "test-s003.vmdk"
RW 4194304 SPARSE "test-s004.vmdk"
...
RW 4194304 SPARSE "test-s111.vmdk"
RW 4194304 SPARSE "test-s112.vmdk"
RW 4194304 SPARSE "test-s113.vmdk"
RW 4194304 SPARSE "t[root@amd-2427-32-1 home]#

Comment 12 Sibiao Luo 2014-07-30 02:51:56 UTC
Verify this issue on qemu-kvm-rhev-0.12.1.2-2.432.el6.x86_64 with twoGbMaxExtentSparse and twoGbMaxExtentFlat subformat. 

host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-493.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.432.el6.x86_64

[root@amd-2427-32-1 home]# qemu-img create -f vmdk -o subformat=twoGbMaxExtentFlat test.vmdk 1T
Formatting 'test.vmdk', fmt=vmdk size=1099511627776 compat6=off subformat='twoGbMaxExtentFlat' zeroed_grain=off 
[root@amd-2427-32-1 home]# cat test.vmdk
# Disk DescriptorFile
version=1
CID=53d8cdb8
parentCID=ffffffff
createType="twoGbMaxExtentFlat"

# Extent description
RW 4194304 FLAT "test-f001.vmdk" 0
RW 4194304 FLAT "test-f002.vmdk" 0
RW 4194304 FLAT "test-f003.vmdk" 0
...
RW 4194304 FLAT "test-f510.vmdk" 0
RW 4194304 FLAT "test-f511.vmdk" 0
RW 4194304 FLAT "test-f512.vmdk" 0

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "2130440"
ddb.geometry.heads = "16"
ddb.geometry.sectors = "63"
ddb.adapterType = "ide"
[root@amd-2427-32-1 home]# 
[root@amd-2427-32-1 home]# 
[root@amd-2427-32-1 home]# qemu-img create -f vmdk -o subformat=twoGbMaxExtentSparse test.vmdk 1T
Formatting 'test.vmdk', fmt=vmdk size=1099511627776 compat6=off subformat='twoGbMaxExtentSparse' zeroed_grain=off 
[root@amd-2427-32-1 home]# cat test.vmdk
# Disk DescriptorFile
version=1
CID=53d8cdd5
parentCID=ffffffff
createType="twoGbMaxExtentSparse"

# Extent description
RW 4194304 SPARSE "test-s001.vmdk"
RW 4194304 SPARSE "test-s002.vmdk"
RW 4194304 SPARSE "test-s003.vmdk"
...
RW 4194304 SPARSE "test-s510.vmdk"
RW 4194304 SPARSE "test-s511.vmdk"
RW 4194304 SPARSE "test-s512.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "2130440"
ddb.geometry.heads = "16"
ddb.geometry.sectors = "63"
ddb.adapterType = "ide"

Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake.

Best Regards,
sluo

Comment 13 errata-xmlrpc 2014-10-14 06:58:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1490.html