Trying to convert from .img to .vdi using "convertfromraw": VERR_VD_INVALID_SIZE

Discussions related to using VirtualBox on Linux hosts.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Trying to convert from .img to .vdi using "convertfromraw": VERR_VD_INVALID_SIZE

Post by fth0 »

socratis wrote:So, unless you specifically set the 'bs' operand to something non-default, it should be a 512-byte multiple.
No, dd doesn't fill up the last partial block read when writing. You can easily test this with dd if=<existing file> of=testfile bs=512 (with or without the bs argument).
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Trying to convert from .img to .vdi using "convertfromraw": VERR_VD_INVALID_SIZE

Post by socratis »

Oh, I get that. You can't have a 1-byte file that gets automagically to 512-bytes when copied. But it will occupy a minimum of 512 on the disk, usually more, like 4096 usually these days.

But if you're doing a 'dd' (which is a sector-level copy) of a disk (not a file), I wouldn't expect a 814188811483 bytes file size output. I would expect either a 814188811264, or a 814188811776 bytes file size (512 divisible), unless an unusual setup occurred. Truth of the matter is, that we haven't even seen the command that the OP used, they just mentioned "I used dd". Yeah, right, I use a computer too... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply