From: Anthony Liguori <anthony@codemonkey.ws>
To: Randy Smith <perlstalker@vuser.org>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: kvm-87: qemu-img creates raw file with wrong size
Date: Mon, 13 Jul 2009 16:40:31 -0500 [thread overview]
Message-ID: <4A5BA9CF.9000205@codemonkey.ws> (raw)
In-Reply-To: <4A5BA908.7080003@vuser.org>
Randy Smith wrote:
> Greetings,
>
> Running `qemu-img create -f raw file.raw 1000` creates a 512 byte file
> rather than the 1000K file the docs imply.
>
> From the help message:
> "
> 'size' is the disk image size in kilobytes. Optional suffixes
> 'M' (megabyte, 1024 * 1024) and 'G' (gigabyte, 1024 * 1024 * 1024) are
> supported any 'k' or 'K' is ignored
> "
>
> Did the default change or is there bug with the create?
>
No suffix assumes bytes. It truncates to the nearest sector which is
why you see a 512 byte file. If you did `qemu-img create -f raw
file.raw 1024` you would see a file of 1024 bytes.
Not sure if the docs is wrong or this behavior changed. Patch either
way would be appreciated/accepted.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-07-13 21:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 21:37 kvm-87: qemu-img creates raw file with wrong size Randy Smith
2009-07-13 21:40 ` Anthony Liguori [this message]
2009-07-13 21:48 ` Randall Smith
2009-07-13 22:15 ` Lynn Kerby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A5BA9CF.9000205@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kvm@vger.kernel.org \
--cc=perlstalker@vuser.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.