Choose style:

Author Topic: (SOLVED) qemu-img: Invalid image size specified!  (Read 2461 times)

0 Members and 1 Guest are viewing this topic.

Offline carpecanem

  • Jr. Member
  • **
  • Posts: 25
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
(SOLVED) qemu-img: Invalid image size specified!
« on: December 25, 2015, 09: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
« Last Edit: December 27, 2015, 12:19:17 pm by carpecanem »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25946
  • Karma: 2836
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: qemu-img: Invalid image size specified!
« Reply #1 on: December 27, 2015, 10: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 ?
« Last Edit: December 27, 2015, 12:15:16 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline carpecanem

  • Jr. Member
  • **
  • Posts: 25
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Re: qemu-img: Invalid image size specified!
« Reply #2 on: December 27, 2015, 10: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.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25946
  • Karma: 2836
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: qemu-img: Invalid image size specified!
« Reply #3 on: December 27, 2015, 12:00:52 pm »
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")
« Last Edit: December 27, 2015, 12:10:13 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline carpecanem

  • Jr. Member
  • **
  • Posts: 25
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Re: (SOLVED) qemu-img: Invalid image size specified!
« Reply #4 on: December 27, 2015, 12:21:49 pm »
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

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25946
  • Karma: 2836
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: (SOLVED) qemu-img: Invalid image size specified!
« Reply #5 on: December 27, 2015, 12:47:19 pm »
No problem Mike :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec