Peppermint OS

Support => New Users => Topic started by: carpecanem on December 25, 2015, 06:45:43 am

Title: (SOLVED) qemu-img: Invalid image size specified!
Post by: carpecanem on December 25, 2015, 06:45:43 am
Hello once again,

I tried to create a VHD file with a certain size using this command:

qemu-img create -f vpc subformat=fixed ~/media/c3po/disk/test.vhd 4464M

but all I get is this error message:

qemu-img: Invalid image size specified!

I tried other sizes, size suffixes (G, M, k, none), and destination media, but no success. What am I doing wrong?

Regards, Mike
Title: Re: qemu-img: Invalid image size specified!
Post by: PCNetSpec on December 27, 2015, 07:17:31 am
As you're trying to create an image in a location you'd probably need elevated permissions to access, have you tried either prefixing the command with "sudo" .. or even better, creating the vhd in your home directory ?
Title: Re: qemu-img: Invalid image size specified!
Post by: carpecanem on December 27, 2015, 07:59:32 am
I tried that as well, no success.

Does someone else have this problem as well?

Could it be that this older error report for another linux distribution applies here as well?
https://bugzilla.redhat.com/show_bug.cgi?id=695881

Actually, I only need an (empty, NTFS formatted, not bootable, fixed size) VHD container file (which fits on a / fills a DVD). Unfortunately my computer's processor doesn't support virtualisation, so I'm unable to run virtual machines and format the VHD with them. Are there other tools for this purpose? I tried to run the Windows tool disk2vhd on a DVD, but it recognizes only harddrives.
Title: Re: qemu-img: Invalid image size specified!
Post by: PCNetSpec on December 27, 2015, 09:00:52 am
You missed out the "-o" options switch .. try
Code: [Select]
qemu-img create -f vpc -o subformat=fixed ~/media/c3po/disk/test.vhd 4464M(if you need elevated privileges to write to "~/media/c3po/disk", don't forget to prefix that command with "sudo")
Title: Re: (SOLVED) qemu-img: Invalid image size specified!
Post by: carpecanem on December 27, 2015, 09:21:49 am
That's it! Sometimes one is too blind for the relevant detail, especially when error messages point to the "wrong" direction...

Thanks a lot again!
Mike
Title: Re: (SOLVED) qemu-img: Invalid image size specified!
Post by: PCNetSpec on December 27, 2015, 09:47:19 am
No problem Mike :)