qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1075252] [NEW] qemu-img cannot read VMDK4 file


From: Robert Hubbard
Subject: [Qemu-devel] [Bug 1075252] [NEW] qemu-img cannot read VMDK4 file
Date: Mon, 05 Nov 2012 17:32:50 -0000

Public bug reported:

Unable to  read any vmdk4 type files. Goal was to convert to a qcow2,
this worked after emitting code.

OS is  Centos linux 2.6.32. I pulled the latest git tree down for qemu
to see if this was resolved, it is not.

Starting program: /home/rhubbard/QEMU/qemu/qemu-img info -f vmdk
/root/Juniper/beta1candidate-07122012-disk1.vmdk


There seems a mismatch with the l1_backup_tble_offset.  this is now a uint64 
type.  The value is actually "-512" because of this and this causes the code 
check at line 418 in vmdk.c to erroneously  think there is a backup table. This 
causes vmdk open to fail.
and message 
qemu failed to open ....


from debug;
gdb) x/4x &(s->l1_backup_table_offset)
0xa61cd0:       0xfffffe00      0xffffffff      0x00a62770      0x00000000

(gdb) p *s
$1 = {hd = 0x0, l1_table_offset = 0, l1_backup_table_offset = -512, l1_table = 
0xa62770, 
  l1_backup_table = 0x0, l1_size = 64, l1_entry_sectors = 65536, l2_size = 512, 
l2_cache = 0x0, 
  l2_cache_offsets = {0 <repeats 16 times>}, l2_cache_counts = {0 <repeats 16 
times>}, 
  cluster_sectors = 128, parent_cid = 4294967295}

typedef struct BDRVVmdkState {
    BlockDriverState *hd;
    int64_t l1_table_offset;                                          <==== ??? 
- what should this be , don't know what the actual layout on the vmdk spec says 
, is this a 64bit / 8 byte field ?

    int64_t l1_backup_table_offset;
    uint32_t *l1_table;
    uint32_t *l1_backup_table;
    unsigned int l1_size;
    uint32_t l1_entry_sectors;

    unsigned int l2_size;

from vmdk.c
    /*!!!  if (s->l1_backup_table_offset) {
        s->l1_backup_table = qemu_malloc(l1_size);
        if (bdrv_pread(bs->file, s->l1_backup_table_offset, s->l1_backup_table, 
l1_size) != l1_size)
            goto fail;

Breaks here..

Don't know the correct fix , thanks for help.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1075252

Title:
  qemu-img cannot  read VMDK4 file

Status in QEMU:
  New

Bug description:
  Unable to  read any vmdk4 type files. Goal was to convert to a qcow2,
  this worked after emitting code.

  OS is  Centos linux 2.6.32. I pulled the latest git tree down for qemu
  to see if this was resolved, it is not.

  Starting program: /home/rhubbard/QEMU/qemu/qemu-img info -f vmdk
  /root/Juniper/beta1candidate-07122012-disk1.vmdk

  
  There seems a mismatch with the l1_backup_tble_offset.  this is now a uint64 
type.  The value is actually "-512" because of this and this causes the code 
check at line 418 in vmdk.c to erroneously  think there is a backup table. This 
causes vmdk open to fail.
  and message 
  qemu failed to open ....

  
  from debug;
  gdb) x/4x &(s->l1_backup_table_offset)
  0xa61cd0:     0xfffffe00      0xffffffff      0x00a62770      0x00000000

  (gdb) p *s
  $1 = {hd = 0x0, l1_table_offset = 0, l1_backup_table_offset = -512, l1_table 
= 0xa62770, 
    l1_backup_table = 0x0, l1_size = 64, l1_entry_sectors = 65536, l2_size = 
512, l2_cache = 0x0, 
    l2_cache_offsets = {0 <repeats 16 times>}, l2_cache_counts = {0 <repeats 16 
times>}, 
    cluster_sectors = 128, parent_cid = 4294967295}

  typedef struct BDRVVmdkState {
      BlockDriverState *hd;
      int64_t l1_table_offset;                                          <==== 
??? - what should this be , don't know what the actual layout on the vmdk spec 
says , is this a 64bit / 8 byte field ?

      int64_t l1_backup_table_offset;
      uint32_t *l1_table;
      uint32_t *l1_backup_table;
      unsigned int l1_size;
      uint32_t l1_entry_sectors;

      unsigned int l2_size;

  from vmdk.c
      /*!!!  if (s->l1_backup_table_offset) {
          s->l1_backup_table = qemu_malloc(l1_size);
          if (bdrv_pread(bs->file, s->l1_backup_table_offset, 
s->l1_backup_table, l1_size) != l1_size)
              goto fail;

  Breaks here..

  Don't know the correct fix , thanks for help.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1075252/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]