Bug 461310 - could not open qemu qcow image
Summary: could not open qemu qcow image
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 9
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-05 18:41 UTC by Michael Ploujnikov
Modified: 2009-06-15 01:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-06-15 01:52:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Ploujnikov 2008-09-05 18:41:33 UTC
Description of problem:
From time to time my qemu disk images seem to get corrupted so that qemu can't open them anymore. It seems to start happening after I turn off a virtual machine using a disk through the "quit" command in qemu. Last time this happened when I tried to quit a machine that hasn't gotten to the point of loading the bootloader. The VM was at the boot device selection menu. I ran a "savevm name" command and then I ran the "quit" command.

Version-Release number of selected component (if applicable):
qemu.i386                                0.9.1-6.fc9
kvm.i386                                 65-7.fc9

I've noticed this happen with qemu in Fedora 7 as well as in Fedora 9.

How reproducible:
Now that the disk image is "corrupted", I can reproduce the error all the time. However, I don't know how to reproduce the "corruption".

Steps to Reproduce:
1. qemu-kvm -hda /local/virtual-machines/debian.disk -m 300
  
Actual results:
qemu: could not open disk image /local/virtual-machines/debian.disk

Expected results:
Qemu should load this image without problems since it was not modified by external programs.

Additional info:

Here is the last bit of the output I get from `strace qemu-img info /local/virtual-machines/debian.disk`:
stat64("/local/virtual-machines/debian.disk", {st_mode=S_IFREG|0644, st_size=2485100671, ...}) = 0
open("/local/virtual-machines/debian.disk", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [2485100671], SEEK_END)   = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "QFI\373\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\31\0\0\0\0"..., 2048) = 2048
close(3)                                = 0
open("/local/virtual-machines/debian.disk", O_RDWR|O_LARGEFILE) = 3
_llseek(3, 0, [2485100671], SEEK_END)   = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "QFI\373\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\31\0\0\0\0"..., 72) = 72
mmap2(NULL, 413696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f1d000
_llseek(3, 4096, [4096], SEEK_SET)      = 0
read(3, "\0\0\0\0\216\364 \0\0\0\0\0c\317 \0\0\0\0\0\217\37p\0\0\0\0\0\216\363\360\0"..., 409600) = 409600
_llseek(3, 413696, [413696], SEEK_SET)  = 0
read(3, "\0\0\0\0\0\6`\0\0\0\0\0\0\200\20\0\0\0\0\0\1\0\20\0\0\0\0\0\1\200\20\0"..., 4096) = 4096
munmap(0xb7f1d000, 413696)              = 0
close(3)                                = 0
write(2, "qemu-img: ", 10qemu-img: )              = 10
write(2, "Could not open \'/local/virtual-m"..., 52Could not open '/local/virtual-machines/debian.disk') = 52
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?

More information:

$ file /local/virtual-machines/debian.disk
/local/virtual-machines/debian.disk: Qemu Image, Format: Qcow , Version: 2

$ qemu -hda /local/virtual-machines/debian.disk -m 300
qemu: could not open disk image /local/virtual-machines/debian.disk

Comment 1 Michael Ploujnikov 2008-09-05 19:17:26 UTC
Actually, I was able to reproduce this "corruption" with an old copy of the disk image.
I did exactly what I mentioned originally:
1. $ qemu-kvm -hda /local/virtual-machines/debian.disk -m 300
2. quickly press F10 to open the boot device selection menu
3. press ctrl+alt+2 to go to the qemu console
4. type "savevm configured-ssh"
5. type "quit"
6. $ qemu-kvm -hda /local/virtual-machines/debian.disk -m 300

This gives me the error again:

qemu: could not open disk image /local/virtual-machines/debian.disk

Anyone can try this with my disk image: http://plouj.com/debian.disk.gz (265MB).

Comment 2 Bug Zapper 2009-06-10 02:38:02 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Michael Ploujnikov 2009-06-15 01:52:42 UTC
Not a problem with:

qemu-0.10.4-4.fc11.x86_64


Note You need to log in before you can comment on or make changes to this bug.