Hi.
I have Virtualbox on a Windows 7 Host. I have found in the forum two similar problems but not exactly the same.
there's a virtual machine with windows xp SP3. The disk was 10 gb and it was full. So I looked for a way to expand its size to 20gb and found vboxmanage.
I ran this command:
VBoxManage modifyhd "mydisk.vdi" --resize 20480
and this is what i got:
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%
then the following error:
"Could not get the storage format of the medium".
After this operation, I get the same error when I try to re-create the vm adding the disk (detail:VERR_NOT_SUPPORTED).
Unfortunately I was lazy and I don't have a backup of it, so do I have to give up? is it corrupt forever?
Any ideas? Right now I 'm not home. if you need more information I'll tell when I'll be back.
Thanks
Federico
"Could not get the storage format of the medium" on resize
-
fredericks
- Posts: 8
- Joined: 18. Jul 2010, 12:59
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Windows Xp
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: "Could not get the storage format of the medium" on resi
Why do you need to recreate the VM? The whole point of an in place modification (a practice I think is inherently unwise) is that its done... in place. No need to make any other changes.
Does the original VM still boot up? If yes then I would run Disk2VHD inside the VM to create a new (VHD) image of that "PC". Then on the host I'd convert the image to VDI format using CloneVDI - which incidentally provides a far more useful IMHO (and not in-place) tool for resizing a disk. You would build a new VM around the VDI.
Oh, and check how much free disk space you have, as that would be my first suspicion when encountering a problem like this (that and ensuring that the VDI is not on a FAT or network volume).
Does the original VM still boot up? If yes then I would run Disk2VHD inside the VM to create a new (VHD) image of that "PC". Then on the host I'd convert the image to VDI format using CloneVDI - which incidentally provides a far more useful IMHO (and not in-place) tool for resizing a disk. You would build a new VM around the VDI.
Oh, and check how much free disk space you have, as that would be my first suspicion when encountering a problem like this (that and ensuring that the VDI is not on a FAT or network volume).
-
fredericks
- Posts: 8
- Joined: 18. Jul 2010, 12:59
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Windows Xp
Re: "Could not get the storage format of the medium" on resi
I've done so many tries that I'm not even able to tell you whether I deleted the vm before o after the error (but I suspect after). The disk space is not a problem, the vdi is stored inside the main partition and the available space is enough.
the original VM is not there anymore. When I create a new one trying to use the same vdi, I get the error above, so I can't even boot up the disk.
the original VM is not there anymore. When I create a new one trying to use the same vdi, I get the error above, so I can't even boot up the disk.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: "Could not get the storage format of the medium" on resi
If you have no backup, no original to fall back on, and if neither VBoxManage nor CloneVDI can read the VDI to clone it then no, I have no idea how you could recover from that.
-
fredericks
- Posts: 8
- Joined: 18. Jul 2010, 12:59
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Windows Xp
Re: "Could not get the storage format of the medium" on resi
I understand...it's what I was afraid of. Actually, it was perfectly fine before I ran vboxmanage. Something must have happened somewhere after 90% of resize. I checked the size of the vdi before and after resize execution and it's nearly the same, about 9gb, and still the vdi seems useless now.
do you think is there any way to read the content of it to recover some of the data?
Thanks
do you think is there any way to read the content of it to recover some of the data?
Thanks
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: "Could not get the storage format of the medium" on resi
Have you checked if CloneVDI will read it?
As to what caused the error, I can only assume that it must have been an I/O error of some kind. Resizing (as done by VBoxManage anyway), involves enlarging the block table (which follows the header) to a sufficient size to cater for the new disk size, and moving displaced 1MB blocks to the end of the file, rewriting them there. If it got a seek error or a write error on the latter steps then you would expect an error message, though I find "could not get storage format" surprisingly opaque for VDI. For VHD it would be more understandable, since the operation described would involve overwriting the footer - which if interrupted might give this error. VDI however doesn't have a footer, and nothing I know of should result in a corrupted header.
It would be worthwhile to run a disk check on the drive that hosts this file.
As to whether anything is recoverable, that rather depends on your programming skills and on what is left of the header. If the block table is intact then it might be possible to write a program to recover most of the 1MB blocks. Unfortunately this cannot be diagnosed from a distance. However, you could open the VDI partially using a hex editor (e.g. frhed), save off the first 256KB, zip it, and post it here for me to look at if I find some time.
As to what caused the error, I can only assume that it must have been an I/O error of some kind. Resizing (as done by VBoxManage anyway), involves enlarging the block table (which follows the header) to a sufficient size to cater for the new disk size, and moving displaced 1MB blocks to the end of the file, rewriting them there. If it got a seek error or a write error on the latter steps then you would expect an error message, though I find "could not get storage format" surprisingly opaque for VDI. For VHD it would be more understandable, since the operation described would involve overwriting the footer - which if interrupted might give this error. VDI however doesn't have a footer, and nothing I know of should result in a corrupted header.
It would be worthwhile to run a disk check on the drive that hosts this file.
As to whether anything is recoverable, that rather depends on your programming skills and on what is left of the header. If the block table is intact then it might be possible to write a program to recover most of the 1MB blocks. Unfortunately this cannot be diagnosed from a distance. However, you could open the VDI partially using a hex editor (e.g. frhed), save off the first 256KB, zip it, and post it here for me to look at if I find some time.
-
fredericks
- Posts: 8
- Joined: 18. Jul 2010, 12:59
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Windows Xp
Re: "Could not get the storage format of the medium" on resi
Well. I just tried CloneVDI and it says (in the "validation result" textbox) "not enough memory to map source file" when I select the source vdi.
If I try to open the vdi with frhed I get more or less the same message "not enough memory to load file"...
update: I used another hex editor (tried to replace the first 72 bytes of header with the same bytes from a working vdi, but no success) and I extracted 250kb.
Here you go...Hope it means something
If I try to open the vdi with frhed I get more or less the same message "not enough memory to load file"...
update: I used another hex editor (tried to replace the first 72 bytes of header with the same bytes from a working vdi, but no success) and I extracted 250kb.
Here you go...Hope it means something
- Attachments
-
- vdiexport.zip
- (93.21 KiB) Downloaded 63 times