Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 612093 - virt-convert: Find incorrect vmdk file via reading vmx
virt-convert: Find incorrect vmdk file via reading vmx
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-07 06:02 EDT by zhanghaiyan
Modified: 2011-12-06 11:15 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 11:15:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1643 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2011-12-05 19:50:36 EST

  None (edit)
Description zhanghaiyan 2010-07-07 06:02:37 EDT
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 Product and Program Management 2010-07-15 10:54:48 EDT
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 14:23:33 EDT
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 Yeghiayan 2011-03-28 17:10:21 EDT
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 11:48:57 EDT
Missed the boat (and low priority), deferring to 6.2
Comment 7 Cole Robinson 2011-04-07 12:20:57 EDT
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-07 22:34:00 EDT
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 18:52:18 EDT
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-14 23:07:47 EDT
Created attachment 513309 [details]
vmdk file
Comment 12 zhe peng 2011-07-14 23:11:06 EDT
Created attachment 513310 [details]
vmx file
Comment 13 zhe peng 2011-07-14 23:14:58 EDT
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 11:34:34 EDT
Fixed in python-virtinst-0.600.0-1.el6
Comment 17 Huming Jiang 2011-08-02 06:53:21 EDT
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 11:50:26 EST
    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 11:15:39 EST
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.