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 612093 - virt-convert: Find incorrect vmdk file via reading vmx
Summary: virt-convert: Find incorrect vmdk file via reading vmx
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-07 10:02 UTC by zhanghaiyan
Modified: 2011-12-06 16:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2011-12-06 16:15:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmdk file (482 bytes, text/plain)
2011-07-15 03:07 UTC, zhe peng
no flags Details
vmx file (2.74 KB, text/plain)
2011-07-15 03:11 UTC, zhe peng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1643 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2011-12-06 00:50:36 UTC

Description zhanghaiyan 2010-07-07 10:02:37 UTC
Description of problem:
ESX4-RHEL3U9-i386-flat.vmdk is the extender of ESX4-RHEL3U9-i386.vmdk, but virt-convert didn't read this

Version-Release number of selected component (if applicable):
- python-virtinst-0.500.3-5.el6.noarch
- qemu-kvm-0.12.1.2-2.90.el6.x86_64
- qemu-img-0.12.1.2-2.90.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. [root@dhcp-66-70-184 ESX4-RHEL3U9-i386]# ll -h
total 11G
-rw-r--r--. 1 root root  10G Jun 28 21:34 ESX4-RHEL3U9-i386-flat.vmdk
-rw-r--r--. 1 root root  456 Jun 24 19:54 ESX4-RHEL3U9-i386.vmdk
-rw-r--r--. 1 root root 2.8K Jul  7 12:59 ESX4-RHEL3U9-i386.vmx
2. # cat ESX4-RHEL3U9-i386.vmx 
......
scsi0:0.present = "TRUE"
scsi0:0.fileName = "ESX4-RHEL3U9-i386.vmdk"
scsi0:0.mode = "independent-persistent"
scsi0:0.deviceType = "scsi-hardDisk"
.........
3. # cat ESX4-RHEL3U9-i386.vmdk 
...........
# Extent description
RW 20971520 VMFS "ESX4-RHEL3U9-i386-flat.vmdk"
.........
4. # virt-convert -i vmx -o virt-image  ESX35-RHEL3U9-i386/ virt/

  
Actual results:
ESX4-RHEL3U9-i386.vmdk, the not true disk file, is converted to image file. Seems virt-convert doesn't read the direction in .vmdk file.

Expected results:
ESX4-RHEL3U9-i386-flat.vmdk, the true disk file, should be converted to image file. virt-convert should not only read .vmx file, but also read .vmdk file. According to step2, step3, the direction is clear: 
ESX4-RHEL3U9-i386.vmx -> ESX4-RHEL3U9-i386.vmdk -> ESX4-RHEL3U9-i386-flat.vmdk

Additional info:

Comment 2 RHEL Program Management 2010-07-15 14:54:48 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Cole Robinson 2010-08-06 18:23:33 UTC
virt-convert is kind of influx since it's basically deprecated by virt-v2v, so this isn't a priority for 6.0.

Comment 5 Suzanne Logcher 2011-03-28 21:10:21 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.

Red Hat invites you to ask your support representative to 
propose this request, if appropriate and relevant, in the 
next release of Red Hat Enterprise Linux.

Comment 6 Cole Robinson 2011-04-07 15:48:57 UTC
Missed the boat (and low priority), deferring to 6.2

Comment 7 Cole Robinson 2011-04-07 16:20:57 UTC
Can someone provide the full test files that to reproduce this issue? The disk image doesn't need to be posted, just the vmx descriptor files.

Comment 8 zhanghaiyan 2011-04-08 02:34:00 UTC
http://fileshare.englab.nay.redhat.com/pub/section1/v2v/esx4.0/ESX4.0-rhel4u8-32b/
# cat ESX4.0-rhel4u8-32b.vmx
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "7"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
nvram = "ESX4.0-rhel4u8-32b.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
unity.customColor = "|23C0C0C0"
tools.upgrade.policy = "useGlobal"
powerType.powerOff = "soft"
powerType.powerOn = "default"
powerType.suspend = "hard"
powerType.reset = "soft"

displayName = "esx4.0-rhel4.8-i386"
extendedConfigFile = "ESX4.0-rhel4u8-32b.vmxf"
floppy0.present = "TRUE"

scsi0.present = "TRUE"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
memsize = "512"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "ESX4.0-rhel4u8-32b.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
ide1:0.present = "TRUE"
ide1:0.clientDevice = "TRUE"
ide1:0.deviceType = "cdrom-raw"
ide1:0.startConnected = "FALSE"
floppy0.startConnected = "FALSE"
floppy0.clientDevice = "TRUE"
ethernet0.present = "TRUE"
ethernet0.networkName = "VM Network"
ethernet0.addressType = "generated"
guestOSAltName = "Red Hat Enterprise Linux 4 (32-bit)"
guestOS = "rhel4"
uuid.location = "56 4d 94 07 db 8e 72 ac-bd dd 1d 03 ec 93 bc e3"
uuid.bios = "56 4d 94 07 db 8e 72 ac-bd dd 1d 03 ec 93 bc e3"
vc.uuid = "52 64 d7 f7 aa a7 d2 cd-33 ed 78 96 41 e8 c2 76"

numvcpus = "2"
floppy0.fileName = "/dev/fd0"

ethernet0.generatedAddress = "00:0c:29:93:bc:e3"
cleanShutdown = "FALSE"
replay.supported = "FALSE"
sched.swap.derivedName = "/vmfs/volumes/243b31a4-14eedb7f/ESX4.0-rhel4u8-32b/ESX4.0-rhel4u8-32b-a0f223ea.vswp"
scsi0:0.redo = ""
vmotion.checkpointFBSize = "4194304"
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "16"
ethernet0.pciSlotNumber = "32"
vmci0.pciSlotNumber = "33"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "-325862173"
tools.remindInstall = "TRUE"
hostCPUID.0 = "0000000d756e65476c65746e49656e69"
guestCPUID.0 = "0000000d756e65476c65746e49656e69"
userCPUID.0 = "0000000d756e65476c65746e49656e69"
hostCPUID.1 = "0001067a000408000408e3fdbfebfbff"
guestCPUID.1 = "0001067a00010800800822010febfbff"
userCPUID.1 = "0001067a00040800000822010febfbff"
hostCPUID.80000001 = "00000000000000000000000120100800"
guestCPUID.80000001 = "00000000000000000000000120100800"
userCPUID.80000001 = "00000000000000000000000120100800"
evcCompatibilityMode = "FALSE"

bios.forceSetupOnce = "FALSE"

Comment 10 Cole Robinson 2011-07-14 22:52:18 UTC
Can you also post the vmdk descriptor file as well in it's entirety? I don't have permissions to access it at that link, though I can read the vmx file.

Also, even if we read that file, virt-convert isn't going to be able to do much with it, since qemu-img can't convert vmfs style vmdk files.

Comment 11 zhe peng 2011-07-15 03:07:47 UTC
Created attachment 513309 [details]
vmdk file

Comment 12 zhe peng 2011-07-15 03:11:06 UTC
Created attachment 513310 [details]
vmx file

Comment 13 zhe peng 2011-07-15 03:14:58 UTC
I can reproduce this bug with:
- python-virtinst-0.500.3-5.el6.noarch
- qemu-kvm-0.12.1.2-2.134.el6.x86_64
- qemu-img-0.12.1.2-2.134.el6.x86_64
I can reproduce this bug with:
- python-virtinst-0.500.3-5.el6.noarch
- qemu-kvm-0.12.1.2-2.134.el6.x86_64
- qemu-img-0.12.1.2-2.134.el6.x86_64

# ll ESX/
total 3414348
-rw-r--r--. 1 root root 6442450944 Jul 14 22:43 ESX4.0-rhel4u8-32b-flat.vmdk
-rw-r--r--. 1 root root        482 Jul 14 22:44 ESX4.0-rhel4u8-32b.vmdk
-rwxr-xr-x. 1 root root       2805 Jul 14 22:44 ESX4.0-rhel4u8-32b.vmx
# virt-convert -i vmx -o virt-image ESX/ virt/ --debug
Thu, 14 Jul 2011 23:06:52 DEBUG    Launched with command line:
/usr/bin/virt-convert -i vmx -o virt-image ESX/ virt/ --debug
Thu, 14 Jul 2011 23:06:52 DEBUG    Creating directory virt/
Thu, 14 Jul 2011 23:06:52 DEBUG    input_file: ESX/ESX4.0-rhel4u8-32b.vmx
Thu, 14 Jul 2011 23:06:52 DEBUG    input_dir: ESX/
Thu, 14 Jul 2011 23:06:52 DEBUG    output_file: virt/esx4.0-rhel4.8-i386.virt-image.xml
Thu, 14 Jul 2011 23:06:52 DEBUG    output_dir: ESX/
Generating output in 'virt-image' format to virt//
Converting disk 'ESX4.0-rhel4u8-32b.vmdk' to type raw...
Thu, 14 Jul 2011 23:06:52 DEBUG    Running command: qemu-img convert -O raw /tmp/ESX/ESX4.0-rhel4u8-32b.vmdk /tmp/virt/ESX4.0-rhel4u8-32b.raw
Done.
# ll virt/
total 4
-rw-r--r--. 1 root root 509 Jul 14 23:06 esx4.0-rhel4.8-i386.virt-image.xml
-rw-r--r--. 1 root root   0 Jul 14 23:06 ESX4.0-rhel4u8-32b.raw

Comment 15 Cole Robinson 2011-07-28 15:34:34 UTC
Fixed in python-virtinst-0.600.0-1.el6

Comment 17 Huming Jiang 2011-08-02 10:53:21 UTC
Verified with the following components:
python-virtinst-0.600.0-1.el6.
libvirt-0.9.4-0rc1.el6.x86_64
kernel-2.6.32-171.el6.x86_64
qemu-kvm-0.12.1.2-2.174.el6.x86_64

Steps:
1.prepare vmx and vmdk file
download 3 files from link below:
http://fileshare.englab.nay.redhat.com/pub/section3/libvirtauto/vmware/
2. # ls -l ESX/
total 10485772
-rw-r--r--. 1 root root 10737418240 Apr  2 14:02 ESX3.5-RHEL6-x64-20100807.0-flat.vmdk
-rw-r--r--. 1 root root         282 Apr  2 14:02 ESX3.5-RHEL6-x64-20100807.0.vmdk
-rw-r--r--. 1 root root        2154 Apr  2 14:02 ESX3.5-RHEL6-x64-20100807.0.vmx
3.# virt-convert -i vmx -o virt-image ESX/ virt/ --debug
Tue, 02 Aug 2011 18:52:50 DEBUG    Creating directory virt/
Tue, 02 Aug 2011 18:52:50 DEBUG    input_file: ESX/ESX3.5-RHEL6-x64-20100807.0.vmx
Tue, 02 Aug 2011 18:52:50 DEBUG    input_dir: ESX/
Tue, 02 Aug 2011 18:52:50 DEBUG    output_file: virt/ESX3.5-RHEL6-64b-20100909.1.virt-image.xml
Tue, 02 Aug 2011 18:52:50 DEBUG    output_dir: virt/
Generating output in 'virt-image' format to virt//
Converting disk 'ESX3.5-RHEL6-x64-20100807.0-flat.vmdk' to type raw...
Tue, 02 Aug 2011 18:52:50 DEBUG    Running command: qemu-img convert -O raw /home/ESX/ESX3.5-RHEL6-x64-20100807.0-flat.vmdk /home/virt/ESX3.5-RHEL6-x64-20100807.0-flat.raw
...
done
4. # ls -l virt/
total 4897800
-rw-r--r--. 1 root root         544 Aug  2 18:44 ESX3.5-RHEL6-64b-20100909.1.virt-image.xml
-rw-r--r--. 1 root root 10737418240 Aug  2 18:43 ESX3.5-RHEL6-x64-20100807.0-flat.raw

Comment 18 Cole Robinson 2011-11-07 16:50:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 19 errata-xmlrpc 2011-12-06 16:15:39 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-2011-1643.html


Note You need to log in before you can comment on or make changes to this bug.