Page 1 of 1

[WorksForMe] 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 13:38
by oldmanhouse
I have an OVF file, with accompanying VMDK and MF files, for a Windows XP guest, which I am trying to import on my macOS host. My VirtualBox version is 5.2.18 r124319 (Qt5.6.3).

When importing the OVF, I am getting the following error:
Failed to import appliance /Users/me/Downloads/Mercedes WIS 2006 VM.ovf.

Could not open the medium storage unit '/Users/me/Downloads/Mercedes WIS 2006 VM.vmdk'.

VMDK: descriptor does not start as expected in '/Users/me/Downloads/Mercedes WIS 2006 VM.vmdk' (VERR_VD_VMDK_INVALID_HEADER).

VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/Users/me/Downloads/Mercedes WIS 2006 VM.vmdk' (VERR_VD_VMDK_INVALID_HEADER).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: ApplianceWrap
Interface: IAppliance {8398f026-4add-4474-5bc3-2f9f2140b23e}
I have also tried creating a new VM, and attaching the VMDK, which also results in a slightly different error:
Failed to open the disk image file /Users/me/MercedesWIS2006VM/Mercedes WIS 2006 VM.vmdk.

Could not get the storage format of the medium '/Users/me/MercedesWIS2006VM/Mercedes WIS 2006 VM.vmdk' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {9570b9d5-f1a1-448a-10c5-e12f5285adad}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
I've tried a few things:
  • running in VMWare - similar errors appear. From what I read elsewhere on this forum, exported VMDKs are compressed by VirtualBox so it's probably not VMWare compatible anyway.
  • tried using the vmware-vdiskmanager utility with the -R switch to attempt to repair the VMDK file, and the utility does not give any output at all (so unclear if there is no corruption to fix, or it fixed successfully).
  • importing with an older version of VirtualBox (2.2) - that gives an error "Too many IDE controllers in OVF; VirtualBox only supports one". I'm not sure if that's a red herring, as it's such an old version.
I think either the OVF is badly formatted, or the VMDK is corrupt. Unfortunately, I do not have access to the original host so creating a new image is not possible.

I am attaching the OVF to see if anyone can spot any malformed syntax in there that might be causing the issue.

Many thanks

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 15:46
by mpack
It sounds like the VMDK is corrupted.

Incidentally, the VMDK in an OVA/OVF is compressed. While it can be attached to a VM you really shouldn't because there will be a performance hit. If you clone the VMDK to VDI then that implicitly decompresses it. You can't do that here because the VMDK is corrupted.

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 16:00
by oldmanhouse
Thanks for your reply. It certainly seems that way. I tried a VMDK to VDI conversion using the following command:
VBoxManage clonemedium disk Mercedes\ WIS\ 2006\ VM.vmdk wis.vdi --format VDI
... and got:
VBoxManage: error: Could not get the storage format of the medium '/Users/me/Downloads/Mercedes WIS 2006 VM.vmdk' (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 179 of file VBoxManageDisk.cpp

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 16:51
by mpack
What size is the VMDK or the original OVA (if there was one)? One common mistake people make is to transport files larger than 4GB on a FAT formatted drive, not noticing the error message due to 4GB being the maximum size a FAT file can be.

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 17:26
by oldmanhouse
No OVA in this case, just a VMDK which is ~6.14GB. I downloaded the VM, so may try re-downloading as other comments on the download site imply others have had it working.

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 17:44
by mpack
Look for the MD5 or other checksum listed on the download site. You can use it to verify that your copy is corrupted (or not).

Re: 'Failed to import appliance' error (VMDK)

Posted: 7. Sep 2018, 23:17
by oldmanhouse
I re-downloaded the VM, and it works! Probably should have tried that sooner. Thanks for your help :)