qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: qemu disk on vfat


From: Anthony Liguori
Subject: [Qemu-devel] Re: qemu disk on vfat
Date: Mon, 08 May 2006 16:12:33 -0500
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux))

On Sun, 07 May 2006 08:13:01 +0000, Yann Le Doaré wrote:

> Hi,
> 
> It seems like qemu 0.8.0 does not accept image file from a vfat partition.
> Is it a bug ?
> 
> Greetings.
> 
> Yann Le Doaré.
> 
> 
> strace :
> 
> open("/mnt/partitions/windows0/qmeu-disk", O_RDONLY|O_LARGEFILE) = 7
> read(7, "", 1024)                       = 0 close(7)                      
>          = 0 open("/mnt/partitions/windows0/qmeu-disk",
> O_RDONLY|O_LARGEFILE) = 7 _llseek(7, 128, [128], SEEK_SET)        = 0
> read(7, "", 4)                          = 0 close(7)                      
>          = 0 write(2, "qemu: could not open hard disk i"..., 74qemu: could
> not open hard disk image '/mnt/partitions/windows0/qmeu-disk' ) = 74
> exit_group(1)                           = ?

It's pretty clear that what's happening is that qemu opening the file and
the filesystem is claiming it's an empty file.

So, I recommend you do the following:

First:

du -sh /mnt/partitions/windows0/qmeu-disk
ls -al /mnt/partitions/windows0/qmeu-disk

And make sure both report a non-zero result.  If either reports 0 as the
size, then you screwed up copying the file to your vfat partition.

Second:

In vl.h, change:

#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif

To:

#ifdef O_LARGEFILE
#undef O_LARGEFILE
#endif
#define O_LARGEFILE 0

And if that fixes your problem, then vfat is broken when open()'d with
O_LARGEFILE.  If that's the case, you should report it as a vfat bug.

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]