Comment 8 for bug 893956

Revision history for this message
Bobby Dimmette (bjdimmette) wrote :

qemu-img fails to read a disk2vhd (VHD) image created from a Windows Server 2003.
qemu-img will read and convert a VDI image created from that VHD

VHD header/footer details:

[root@T3400 ]# qemu-img info vhd/p.vhd
qemu-img: Could not open 'vhd/p.vhd': File too large

[root@T3400 ]# ./vhddump -vv -s vhd/p.vhd
Positioning descriptor to VHD footer...
Reading VHD footer...
------------------------
 VHD Footer (512 bytes)
------------------------
 Cookie = conectix
 Features = 0x00000002
 File Format Version = 0x00010000
 Data Offset = 0x0000000000000200
 Time Stamp = 0x1893342A
 Creator Application = 0x64327600
 Creator Version = 0x00010000
 Creator Host OS = 0x5769326B
 Original Size = 0x000000222E6F4000
                     = 140006 MB + 976 KiB
 Current Size = 0x000000222E6F4000
                     = 140006 MB + 976 KiB
 Disk Geometry = 0xFFFF10FF
           Cylinders = 65535
               Heads = 16
       Sectors/Track = 255
 Disk Type = 0x00000003
                     = Dynamic hard disk
 Checksum = 0xFFFFEDD8
 Unique ID = 765e24b9-1e33-594a-864e-f39aea210f24
 Saved State = 0x00
 Reserved = <...427 bytes...>
===============================================
Detecting disk type...
Dynamic hard disk detected.
Positioning descriptor to read VHD footer copy...
Reading VHD footer copy...
------------------------
 VHD Footer (512 bytes)
------------------------
 Cookie = conectix
 Features = 0x00000002
 File Format Version = 0x00010000
 Data Offset = 0x0000000000000200
 Time Stamp = 0x1893342A
 Creator Application = 0x64327600
 Creator Version = 0x00010000
 Creator Host OS = 0x5769326B
 Original Size = 0x000000222E6F4000
                     = 140006 MB + 976 KiB
 Current Size = 0x000000222E6F4000
                     = 140006 MB + 976 KiB
 Disk Geometry = 0xFFFF10FF
           Cylinders = 65535
               Heads = 16
       Sectors/Track = 255
 Disk Type = 0x00000003
                     = Dynamic hard disk
 Checksum = 0xFFFFEDD8
 Unique ID = 765e24b9-1e33-594a-864e-f39aea210f24
 Saved State = 0x00
 Reserved = <...427 bytes...>
===============================================
Reading VHD dynamic disk header...
--------------------------------------
 VHD Dynamic Disk Header (1024 bytes)
--------------------------------------
 Cookie = cxsparse
 Data Offset = 0xFFFFFFFFFFFFFFFF
 Table Offset = 0x0000000000000600
 Header Version = 0x00010000
 Max Table Entries = 0x00011174
 Block Size = 0x00200000
 Checksum = 0xFFFFF3F1
 Parent UUID = 00000000-0000-0000-0000-000000000000
 Parent TS = 0x00000000
                       0 (10)
 Reserved = <...4 bytes...>
 Parent Unicode Name = <...512 bytes...>
 Parent Loc Entry 1 = <...24 bytes...>
 Parent Loc Entry 2 = <...24 bytes...>
 Parent Loc Entry 3 = <...24 bytes...>
 Parent Loc Entry 4 = <...24 bytes...>
 Parent Loc Entry 5 = <...24 bytes...>
 Parent Loc Entry 6 = <...24 bytes...>
 Parent Loc Entry 7 = <...24 bytes...>
 Parent Loc Entry 8 = <...24 bytes...>