Page 1 of 1

Trying to attach an IMG file

Posted: 13. Jul 2013, 04:29
by Melab
I'm running VirtualBox 4.2.6 with the Extensions installed on a Windows 7 laptop. I'm trying to attach an IMG file that is 1 gigabyte in large with a block size of 4096 to my virtual machine, but all I get is:

Code: Select all

Failed to open the floppy image <path redacted by me>.

Could not get the storage format of the medium '<path redacted by me>' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: Medium
Interface: IMedium {29989373-b111-4654-8493-2e1176cba890}
Callee: IVirtualBox {3b2f08eb-b810-4715-bee0-bb06b9880ad2}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
What gives?

Re: Trying to attach an IMG file

Posted: 13. Jul 2013, 16:20
by Perryg
I don't think that a floppy controller can handle that size.
What is the image? Is it from dd?

Re: Trying to attach an IMG file

Posted: 13. Jul 2013, 21:05
by Melab
I created the image using:

Code: Select all

dd if=/dev/zero of=DUET.img bs=4096 count=262144

Re: Trying to attach an IMG file

Posted: 14. Jul 2013, 12:10
by mpack
In that case the blocksize info given in the first post was meaningless. You created a binary file of size 4Kx256MB == 1GB filled with zeros. It has no internal structure. At one gig it's way too large to be a floppy, you could however create a VMDK text descriptor for it and mount it as a hard disk... though I'm wondering why you wouldn't just use "VBoxManage createhd" to do the whole thing in one step.

Re: Trying to attach an IMG file

Posted: 15. Jul 2013, 00:54
by Melab
It's my experience that USB images are usually stored as IMG files and I used an IMG to install Android before, so I figured that an IMG file would be the best way to approximate a real USB since I can't seem to get the guest to recognize it [my USB drive].

Re: Trying to attach an IMG file

Posted: 15. Jul 2013, 12:23
by mpack
A flash drive image is basically the same as a hard disk image. The file extension is not important, the internal structure is. As I mentioned earlier, if your goal is to manipulate a fixed size image then the best way IMHO is via a VMDK descriptor as discussed e.g. in this thread.