Received: from eggs.gnu.org ([208.118.235.92]:53379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeU5G-0006gQ-HG for qemu-devel@nongnu.org; Mon, 20 May 2013 13:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeU53-0000Db-Ii for qemu-devel@nongnu.org; Mon, 20 May 2013 13:41:18 -0400 Received: from indium.canonical.com ([91.189.90.7]:50055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeU53-0000DU-Co for qemu-devel@nongnu.org; Mon, 20 May 2013 13:41:05 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UeU52-0001dX-Us for ; Mon, 20 May 2013 17:41:04 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E299C2E807D for ; Mon, 20 May 2013 17:41:04 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 20 May 2013 17:33:51 -0000 From: Aurelien Jarno Sender: bounces@canonical.com References: <20121105173251.17934.47567.malonedeb@soybean.canonical.com> Message-Id: <20130520173352.20087.14447.launchpad@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1075252] Re: qemu-img cannot read VMDK4 file Reply-To: Bug 1075252 <1075252@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Changed in: qemu Status: Fix Committed =3D> Fix Released -- = 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: Fix Released 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 uin= t64 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 t= able. 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 =3D {hd =3D 0x0, l1_table_offset =3D 0, l1_backup_table_offset =3D -51= 2, l1_table =3D 0xa62770, = l1_backup_table =3D 0x0, l1_size =3D 64, l1_entry_sectors =3D 65536, l2= _size =3D 512, l2_cache =3D 0x0, = l2_cache_offsets =3D {0 }, l2_cache_counts =3D {0 }, = cluster_sectors =3D 128, parent_cid =3D 4294967295} typedef struct BDRVVmdkState { BlockDriverState *hd; int64_t l1_table_offset; <= =3D=3D=3D=3D ??? - 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 =3D qemu_malloc(l1_size); if (bdrv_pread(bs->file, s->l1_backup_table_offset, s->l1_backup_= table, l1_size) !=3D 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