Skip to contentSkip to conversation

qemu-img bug with dynamic vhd

Qemu-devel z22lad 3 participants 11 messages Nov 23, 2011 – Jun 7, 2017

lore
Share & tools
lore

z22lad

author
#0 lore raw

Public bug reported:

Hye, i found a problem with qemu-img when trying to get info of a dynamic vhd. I made imgae of my 60GB computer hard drive with disk2vhd. The dynamic vhd is 21gb size.

With 1.0-rc3 version :
running command: qemu-img info 60_GB.VHD
qemu-img: Could not open '60_GB.VHD' : File too large

0.14.1 version give me wrong information :
image: 60_GB.VHD
file format: vpc
virtual size: 127G (136899993600 bytes)
disk size: 21G

Thanks for reply.

** Affects: qemu
Importance: Undecided
Status: New

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  New

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#1 lore raw
Quoted 8 lines · On Wed, Nov 23, 2011 at 11:33 AM, z22lad <[email protected]> wrote:

Hye, i found a problem with qemu-img when trying to get info of a dynamic vhd. I made imgae of my 60GB computer hard drive with disk2vhd. The dynamic vhd is 21gb size.

With 1.0-rc3 version :
running command: qemu-img info 60_GB.VHD
qemu-img:  Could not open '60_GB.VHD' : File too large

Quoted 5 lines

0.14.1 version give me wrong information :
image: 60_GB.VHD
file format: vpc
virtual size: 127G (136899993600 bytes)
disk size: 21G

Which host OS are you running qemu-img on? Is it 32- or 64-bit?

I wonder if you get the same behavior when using qemu-img convert instead of "disk2vhd" to create a vhd file.

Stefan

author
#2 lore raw
In reply to z22lad

Hi,

I'm having the same problem. I'm using qemu-img 1.0, running from a Ubuntu Server 12.04 x64 on a SW RAID, ext4.

The .VHD has 29GB and was made using disk2vhd.

Here is the command and the results:
sudo kvm-img convert -f vpc -O raw image.VHD image.img [sudo] password for sysop:
kvm-img: Could not open 'image.VHD': File too large
kvm-img: Could not open 'image.VHD'

Same error doing a simple qemu-img info image.vhd

Thanks for your help

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  New

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#3 lore raw
Quoted 7 lines · franxico

Hi,

I'm having the same problem. I'm using qemu-img 1.0, running from a Ubuntu Server 12.04 x64 on a SW RAID, ext4.

The .VHD has 29GB and was made using disk2vhd.

Quoted 7 lines

Here is the command and the results:
sudo kvm-img convert -f vpc -O raw image.VHD image.img [sudo] password for sysop:
kvm-img: Could not open 'image.VHD': File too large
kvm-img: Could not open 'image.VHD'

Same error doing a simple qemu-img info image.vhd

Serge Hallyn introduced the size check when VHD files are opened, you can read about the background here:
http://patchwork.ozlabs.org/patch/106736/

I'm not sure if QEMU has a bug or lacks support for the file format version used by disk2vhd.

Quoted 34 lines

Thanks for your help

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

Title:
qemu-img bug with dynamic vhd

Status in QEMU:
New

Bug description:
Hye, i found a problem with qemu-img when trying to get info of a dynamic vhd. I made imgae of my 60GB computer hard drive with disk2vhd. The dynamic vhd is 21gb size.

With 1.0-rc3 version :
running command: qemu-img info 60_GB.VHD
qemu-img: Could not open '60_GB.VHD' : File too large

0.14.1 version give me wrong information :
image: 60_GB.VHD
file format: vpc
virtual size: 127G (136899993600 bytes)
disk size: 21G

Thanks for reply.

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

#4 lore raw
In reply to franxico
Quoted 7 lines · franxico

Hi,

I'm having the same problem. I'm using qemu-img 1.0, running from a Ubuntu Server 12.04 x64 on a SW RAID, ext4.

The .VHD has 29GB and was made using disk2vhd.

Quoted 7 lines

Here is the command and the results:
sudo kvm-img convert -f vpc -O raw image.VHD image.img [sudo] password for sysop:
kvm-img: Could not open 'image.VHD': File too large
kvm-img: Could not open 'image.VHD'

Same error doing a simple qemu-img info image.vhd

Please post the output of the following commands:

$ hexdump -C -n 512 image.VHD
$ hexdump -C -n 512 -s $(($(ls -l image.VHD | awk '{ print $5 }') -
512)) image.VHD

This will show the file header/footer, which contains fields that are validated when opening the file.

Thanks,
Stefan

#5 lore raw
In reply to z22lad

Though that commit and the comments were about 127G images. HIs is only 27G.

Also, 'qemu-img info' is also showing the error, which shows that this is not being done on vpc_create().

So I think this is a case of qemu-img actually failing to properly parse the FHD file.

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  New

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#6 lore raw
Quoted 2 lines · Serge Hallyn

Though that commit and the comments were about 127G images. HIs is only 27G.

The 127 GB limit applies to the virtual disk size, not to the size of the image file itself.

Quoted 2 lines

Also, 'qemu-img info' is also showing the error, which shows that this is not being done on vpc_create().

I'm not sure what you mean. Your commit (efc8243d00) added an -EFBIG return to vcp_open(), not vpc_create(). This will affect qemu-img info.

We need the header/footer contents to be sure what's going on here.

Stefan

#7 lore raw
Quoted 6 lines · Stefan Hajnoczi
Quoted 2 lines · Serge Hallyn

Though that commit and the comments were about 127G images. HIs is only 27G.

The 127 GB limit applies to the virtual disk size, not to the size of the image file itself.

I thought he had converted a roughly 26GB physical disk, assumed (perhaps wrongly) that was the virtual disk size.

Quoted 6 lines
Quoted 2 lines

Also, 'qemu-img info' is also showing the error, which shows that this is not being done on vpc_create().

I'm not sure what you mean. Your commit (efc8243d00) added an -EFBIG return to vcp_open(), not vpc_create(). This will affect qemu-img info.

Oops, good point. Thanks.

Quoted 1 line

We need the header/footer contents to be sure what's going on here.

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  New

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#8 lore raw
In reply to z22lad

Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)?

** Changed in: qemu
Status: New => Incomplete

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  Incomplete

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#9 lore raw

No, sorry. The environment was retired in 2014 and we took a different direction.

-Bobby

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Huth
Sent: Wednesday, June 07, 2017 4:44 AM
To: [email protected]
Subject: [Bug 893956] Re: qemu-img bug with dynamic vhd

Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)?

** Changed in: qemu
Status: New => Incomplete

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/893956

Title:
qemu-img bug with dynamic vhd

Status in QEMU:
Incomplete

Bug description:
Hye, i found a problem with qemu-img when trying to get info of a dynamic vhd. I made imgae of my 60GB computer hard drive with disk2vhd. The dynamic vhd is 21gb size.

With 1.0-rc3 version :
running command: qemu-img info 60_GB.VHD
qemu-img: Could not open '60_GB.VHD' : File too large

0.14.1 version give me wrong information :
image: 60_GB.VHD
file format: vpc
virtual size: 127G (136899993600 bytes)
disk size: 21G

Thanks for reply.

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

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  Incomplete

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/893956/+subscriptions
#10 lore raw
In reply to z22lad

** Changed in: qemu
Status: Incomplete => Won't Fix

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

Title:
  qemu-img bug with dynamic vhd

Status in QEMU:
  Won't Fix

Bug description:
  Hye, i found a problem with qemu-img when trying to get info of a
  dynamic vhd. I made imgae of my 60GB computer hard drive with
  disk2vhd. The dynamic vhd is 21gb size.

  With 1.0-rc3 version :
  running command: qemu-img info 60_GB.VHD
  qemu-img:  Could not open '60_GB.VHD' : File too large

  0.14.1 version give me wrong information :
  image: 60_GB.VHD
  file format: vpc
  virtual size: 127G (136899993600 bytes)
  disk size: 21G

  Thanks for reply.

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