Page 1 of 3

Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 16:14
by davidbaumann
Hello,

I am running 5.0.10_Ubuntur104061 on Ubuntu 15.10 x64.
My guest OS is Windows 7 x64 with all patches.

Maybe it's relevant: I just added "discard="True"" to my harddisk.
After this, I had running the box for about one hour.

One day later, I bootet the Box, checked out for windows updates, and wanted to shut down the box.
Somehow, the guest got unresponsive so I closed it.

After this, I could not boot anymore. I removed the .vdi and tried to attach it again, but I cannot attach it.

Code: Select all   Expand viewCollapse view
vboxmanage showhdinfo Windows\ 7\ X64.vdi
VBoxManage: error: Could not get the storage format of the medium '/home/david/VirtualBox VMs/TIA/Work/Windows 7 X64.vdi' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp


Maybe somebody can give me a hint?

Thanks.

Re: Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 17:05
by mpack
Two things:

  1. You are using the Ubuntu fork of VirtualBox. That means that you need to go to the Ubuntu forums for support.
  2. The message says that the VDI isn't a VDI. Usually this means that it has been corrupted in some way.

Re: Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 17:11
by davidbaumann
Hello,

I don't think it's so different.
Is there a way to recover the vdi?

Code: Select all   Expand viewCollapse view
VBoxManage internalcommands repairhd -dry-run -format VDI Windows\ 7\ X64.vdi
VBoxManage: error: VDI: invalid header in 'Windows 7 X64.vdi'
VBoxManage: error: Error code VERR_VD_IMAGE_REPAIR_IMPOSSIBLE at /build/virtualbox-JNluby/virtualbox-5.0.10-dfsg/src/VBox/Storage/VDI.cpp(3102) in function int vdiRepair(const char*, PVDINTERFACE, PVDINTERFACE, uint32_t)


Maybe this is helpful?

Re: Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 17:28
by loukingjr
davidbaumann wrote:I don't think it's so different.

Don already answered your question. If you want VirtualBox support on this forum you need to be using the official version.

Re: Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 18:26
by Perryg
I see no indication that the OP is running a distro version. Perhaps if they post a log file of the guest ( as an attachment ) it would clear that up.

I can say that the error of "invalid header" is usually lethal, meaning it is corrupt.

Re: Could not get the storage format of the medium

PostPosted: 22. Dec 2015, 19:54
by loukingjr
FWIW, Sorry David, Perryg is correct. I should have waited for a log.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 02:01
by davidbaumann
davidbaumann wrote:[...]
I am running 5.0.10_Ubuntur104061 on Ubuntu 15.10 x64.
[...]


Actually, I was running the Ubuntu fork, yes.
Now I switched to 5.0.12 from the download section.

But still the same results.

Code: Select all   Expand viewCollapse view
Could not get the storage format of the medium '/home/david/VirtualBox VMs/TIA/Work/Windows 7 X64.vdi' (VERR_NOT_SUPPORTED).
VBOX_E_IPRT_ERROR (0x80BB0005)


Maybe you want to help me now? I want to restore the virtual box, as it took me days to set it up.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 02:18
by Perryg
I don't think there is any way to help no matter if you have the distro version or the official version. Once the header is broken it is all but a kiss of death for the guest. Don knows something about trying to repair them but it is a roll of the dice. I can say that forced powering off is more than likely what took it down, and a really good reason to make sure you have backups made to recover it just like on metal.

One other thing I have never heard of is the "I just added "discard="True"" to my harddisk." in your first post. Depending on what that really is or does it may have also been a reason.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 02:21
by Perryg
Actually I could not determine one way or the other with your original post if you were running a fork, but on your second post I do see "virtualbox-5.0.10-dfsg" which is the distro fork.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 10:14
by davidbaumann
Code: Select all   Expand viewCollapse view
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice nonrotational="true" discard="true" type="HardDisk" port="0" device="0">
          <Image uuid="{3971f499-c4c9-4775-906a-835f071fc628}"/>
        </AttachedDevice>
      </StorageController>


Discard=true enabled fstrim for me on my linux guests, and my windows guest were getting smaller after I booted them.
Maybe this option is dangerous, as the chhance to kill the box are getting higher?

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 11:52
by mpack
I would help greatly if you could indicate which part of the VirtualBox user manual told you that you could set this "Discard" option, because I'm having difficulty finding it. The only place where it rings bells is the implementation of immutable drives, for which "Discard=true" might tell the VM to delete the old difference image prior to the next launch of the VM, and create a new one. Obviously, telling the VM to delete its own primary hard disk would certainly be... unsafe.

If this feature has been repurposed to simulate SSD operation then I can't find where that is described in the user manual.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 11:55
by loukingjr
Just to add, it really doesn't make much sense to add Trim commands to a VM .vdi since they themselves are not really an SSD.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 11:59
by mpack
loukingjr wrote:Just to add, it really doesn't make much sense to add Trim commands to a VM .vdi since they themselves are not really an SSD.

Actually, the devs did add an "Is SSD" flag a while back, but I'm having difficulty finding that described too. "SSD" only occurs in the index.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 12:01
by loukingjr
Yes, there isn't any info I can find what the SSD flag actually does.

Re: Could not get the storage format of the medium

PostPosted: 23. Dec 2015, 12:09
by mpack
Going back to an older user manual I find this in the 4.1.0 changelog :-

  • Storage: ATA/SATA drives can be marked as non-rotational, i.e. the guest OS will detect
    them as a SSD if supported, which can improve performance