qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image
@ 2012-01-20 15:29 jbthiel
  2012-01-20 16:38 ` [Qemu-devel] [Bug 919242] " Stefan Weil
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jbthiel @ 2012-01-20 15:29 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Hello,  thanks to all for the great work on qemu, an excellent
technology.

There appears to be a serious bug in qemu-img 1.0, yielding silent
corruption when converting an image to VDI format.  After conversion to
VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
below) -- presumably due to some corruption, since the image works fine
as the source .vhd (from virtualPC6), and also when converted to QCOW2
or VMDK format.

TEST CASE:
OS X 10.6.8 on Intel i5
Qemu 1.0 from mac "ports"  (macports.org)
The source BaseDrive.vhd image is from VirtualPC6 (Mac)
$ qemu-img info BaseDrive.vhd
image: BaseDrive.vhd
file format: vpc
virtual size: 2.0G (2096898048 bytes)
disk size: 190M

The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
  qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

Now run the resulting vdi file with: 
  qemu-system-i386 -cpu pentium BaseDrive.vdi
On boot, NT4 crashes with
STOP: c000026c {Unable to Load Device Driver}
\??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
Error Status was 0xc0000221

Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
  qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
  OR
  qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi, and
in all these cases the original format boots, but the converted VDI
fails to boot as above.

Along the way, I think I also tested a VDI natively created and
installed from VirtualBox, which did boot fine in qemu.  Thus the
problem appears to be not in qemu-system-i386 reading the VDI, rather in
the qemu-img conversion to VDI.


SEVERITY: CRITICAL
The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

WORKAROUND:
The workaround is to use the VMDK format instead of VDI. 
VMDK is supported by both qemu and VirtualBox (and vmWare).


I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

-- jbthiel

** 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/919242

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  New

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
@ 2012-01-20 16:38 ` Stefan Weil
  2012-01-21 13:00 ` Stefan Weil
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2012-01-20 16:38 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
     Assignee: (unassigned) => Stefan Weil (ubuntu-weilnetz)

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

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  New

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
  2012-01-20 16:38 ` [Qemu-devel] [Bug 919242] " Stefan Weil
@ 2012-01-21 13:00 ` Stefan Weil
  2012-01-23  6:19 ` Serge Hallyn
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2012-01-21 13:00 UTC (permalink / raw)
  To: qemu-devel

There is a bug in the VDI code of all current QEMU versions:

when two new blocks (1 MiB clusters) were allocated in sequence and the
2nd new block was only partially filled with data, the unused parts of the
new block still contained data of the 1st block instead of 0.

http://patchwork.ozlabs.org/patch/137186/ fixes this bug.


** Changed in: qemu
       Status: New => Fix Committed

** Also affects: qemu-kvm (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: qemu-kvm (Ubuntu)
       Status: New => Fix Committed

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

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Committed
Status in “qemu-kvm” package in Ubuntu:
  Fix Committed

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
  2012-01-20 16:38 ` [Qemu-devel] [Bug 919242] " Stefan Weil
  2012-01-21 13:00 ` Stefan Weil
@ 2012-01-23  6:19 ` Serge Hallyn
  2012-02-18 18:25 ` Stefan Weil
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Serge Hallyn @ 2012-01-23  6:19 UTC (permalink / raw)
  To: qemu-devel

Hi Stefan,

thanks for the fix.  Should I queue it up in the Ubuntu package, or
should I wait on that?

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

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Committed
Status in “qemu-kvm” package in Ubuntu:
  Fix Committed

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
                   ` (2 preceding siblings ...)
  2012-01-23  6:19 ` Serge Hallyn
@ 2012-02-18 18:25 ` Stefan Weil
  2012-02-18 18:32 ` Stefan Weil
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2012-02-18 18:25 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => 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/919242

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Released
Status in “qemu-kvm” package in Ubuntu:
  Fix Committed

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
                   ` (3 preceding siblings ...)
  2012-02-18 18:25 ` Stefan Weil
@ 2012-02-18 18:32 ` Stefan Weil
  2012-02-20 19:35 ` Serge Hallyn
  2012-02-20 19:40 ` Launchpad Bug Tracker
  6 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2012-02-18 18:32 UTC (permalink / raw)
  To: qemu-devel

Hi Serge,

yes, please queue it up. The fix was committed to QEMU git master,
but it is still missing in QEMU 1.0.1 and older versions.
So if you have a QEMU patch queue for Ubuntu , it's needed there.

Thanks,

Stefan

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

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Released
Status in “qemu-kvm” package in Ubuntu:
  Fix Committed

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
                   ` (4 preceding siblings ...)
  2012-02-18 18:32 ` Stefan Weil
@ 2012-02-20 19:35 ` Serge Hallyn
  2012-02-20 19:40 ` Launchpad Bug Tracker
  6 siblings, 0 replies; 8+ messages in thread
From: Serge Hallyn @ 2012-02-20 19:35 UTC (permalink / raw)
  To: qemu-devel

Thanks very much, Stefan.  New package pushed.

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

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Released
Status in “qemu-kvm” package in Ubuntu:
  Fix Released

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [Bug 919242] Re: qemu-img convert to VDI corrupts image
  2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
                   ` (5 preceding siblings ...)
  2012-02-20 19:35 ` Serge Hallyn
@ 2012-02-20 19:40 ` Launchpad Bug Tracker
  6 siblings, 0 replies; 8+ messages in thread
From: Launchpad Bug Tracker @ 2012-02-20 19:40 UTC (permalink / raw)
  To: qemu-devel

This bug was fixed in the package qemu-kvm - 1.0+noroms-0ubuntu6

---------------
qemu-kvm (1.0+noroms-0ubuntu6) precise; urgency=low

  [ Stefan Weil ]
  * debian/patches/block_vd_zero_unused_parts: Zero unused parts when
    allocating a new block (LP: #919242)
 -- Serge Hallyn <serge.hallyn@ubuntu.com>   Mon, 20 Feb 2012 13:33:05 -0600

** Changed in: qemu-kvm (Ubuntu)
       Status: Fix Committed => 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/919242

Title:
  qemu-img convert to VDI corrupts image

Status in QEMU:
  Fix Released
Status in “qemu-kvm” package in Ubuntu:
  Fix Released

Bug description:
  Hello,  thanks to all for the great work on qemu, an excellent
  technology.

  There appears to be a serious bug in qemu-img 1.0, yielding silent
  corruption when converting an image to VDI format.  After conversion
  to  VDI, an image with WinNT4sp6 (NTFS) yields a boot failure (details
  below) -- presumably due to some corruption, since the image works
  fine as the source .vhd (from virtualPC6), and also when converted to
  QCOW2 or VMDK format.

  TEST CASE:
  OS X 10.6.8 on Intel i5
  Qemu 1.0 from mac "ports"  (macports.org)
  The source BaseDrive.vhd image is from VirtualPC6 (Mac)
  $ qemu-img info BaseDrive.vhd
  image: BaseDrive.vhd
  file format: vpc
  virtual size: 2.0G (2096898048 bytes)
  disk size: 190M

  The image has a fresh Windows NT4sp6 NTFS installation.  It's from VirtualPC6 (Connectix)  inside a .vhdp package directory on OS X.  Convert via:
    qemu-img convert -f vpc -O vdi BaseDrive.vhd  BaseDrive.vdi

  Now run the resulting vdi file with: 
    qemu-system-i386 -cpu pentium BaseDrive.vdi
  On boot, NT4 crashes with
  STOP: c000026c {Unable to Load Device Driver}
  \??\C:\WINNT\system32\win32k.sys device driver could not be loaded.
  Error Status was 0xc0000221

  Both qemu 1.0, and VirtualBox 4.1.8 yield the same error on this VDI.

  Conversion of the exact same image to QCOW2 or VMDK format yields a working image (ie. qemu and VirtualBox boot fine):
    qemu-img convert -f vpc -O qcow2 BaseDrive.vhd  BaseDrive.qcow2
    OR
    qemu-img convert -f vpc -O vmdk BaseDrive.vhd  BaseDrive.vmdk

  Furthermore, I tested converting from raw, qcow2, and vmdk  to vdi,
  and in all these cases the original format boots, but the converted
  VDI fails to boot as above.

  Along the way, I think I also tested a VDI natively created and
  installed from VirtualBox, which did boot fine in qemu.  Thus the
  problem appears to be not in qemu-system-i386 reading the VDI, rather
  in the qemu-img conversion to VDI.

  
  SEVERITY: CRITICAL
  The severity of this bug is critical as it appears to produce a silently corrupted VDI image.  (which is presumably the cause of the boot failure; though I have not explicitly check-disked the resulting VDI image).  It also impedes easy inter-use between qemu and VirtualBox.

  WORKAROUND:
  The workaround is to use the VMDK format instead of VDI. 
  VMDK is supported by both qemu and VirtualBox (and vmWare).

  
  I can supply a test VHD/QCOW2/VMDK image if desired to reproduce the bug.   (but it's large, 190M)

  -- jbthiel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-20 19:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 15:29 [Qemu-devel] [Bug 919242] [NEW] qemu-img convert to VDI corrupts image jbthiel
2012-01-20 16:38 ` [Qemu-devel] [Bug 919242] " Stefan Weil
2012-01-21 13:00 ` Stefan Weil
2012-01-23  6:19 ` Serge Hallyn
2012-02-18 18:25 ` Stefan Weil
2012-02-18 18:32 ` Stefan Weil
2012-02-20 19:35 ` Serge Hallyn
2012-02-20 19:40 ` Launchpad Bug Tracker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).