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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html