Page 1 of 2

Error importing .OVA file

Posted: 20. Jul 2013, 21:47
by olibleu
Hello Everyone,

I have searched for a solution to this problem for a while now, but I didn't find any.
On an Ubuntu 13.04 host, I exported a few VMs in a OVA file. Now I'm trying to import them on a Windows 8 host, and I get this error:

Code: Select all

0%...10%...
Progress state: E_FAIL
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Internal inconsistency looking up disk image 'vmdisk10'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Appliance, interface IAppliance
VBoxManage.exe: error: Context: "int __cdecl handleImportAppliance(struct HandlerArg *)" at line 781 of file VBoxManageAppliance.cpp
I looked around the web a lot, and there is no solution to this problem apparently... I don't need to recover all of the VMs, but a few of them are important. Is there a way with VBoxManage to recover a subset of the machines in an OVA package ? VBoxManage official documentation (chapter 8 ) doesn't say much about this, and it is hard to find information on the structure of OVA files. I don't mind having to unzip and recover (and eventually, repair) manually vmdk and XML files... As I said, there are 1 or 2 VMs that I really need to recover.
Thanks for your time!

- olivier

Re: Error importing .OVA file

Posted: 21. Jul 2013, 01:03
by loukingjr
On a Mac host I get the same type of errors. Apparently exporting more than one machine to the same .ova doesn't work so well even though it says you can do it. VB 4.2.16

Re: Error importing .OVA file

Posted: 21. Jul 2013, 01:14
by Perryg
You should be able to unpacked the OVA with any utility that can deal with TAR files.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 01:17
by loukingjr
well I can't because I erased the .ova file but hopefully the OP still has theirs. I was just testing it. :)

Re: Error importing .OVA file

Posted: 21. Jul 2013, 02:07
by loukingjr
I just tried this again and this time I just decompressed the .ova file. It created a folder with three files...
test-disk1.vmdk
test-disk2.vmdk
test.ovf
I tried importing the test.ovf file but it gave the same error as it did previously.
At this point it seems it would be a lot easier to just copy the VM folders if you are only using VirtualBox

Re: Error importing .OVA file

Posted: 21. Jul 2013, 02:17
by Perryg
I don't think that you can actually import it. Not sure though since I don't use import or export any more. But if they are two separate guests you should be able to build two guests and attach the vmdk to each one created.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 02:22
by loukingjr
Perryg wrote:I don't think that you can actually import it. Not sure though since I don't use import or export any more. But if they are two separate guests you should be able to build two guests and attach the vmdk to each one created.
true but that doesn't seem to be what it's suppose to do.
It seems to add a PIIX hard drive controller. it shows two on both machines but they only had one to begin with.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 02:29
by Perryg
Like I said you more than likely can't import them. But you should be able to create a guest around each. You will need to play with the settings though. You can look at the OVF file and see if the settings are there in a text editor.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 02:31
by loukingjr
Perryg wrote:Like I said you more than likely can't import them. But you should be able to create a guest around each. You will need to play with the settings though. You can look at the OVF file and see if the settings are there in a text editor.
well I wouldn't use .ova files myself.

edit: It just seems that since VirtualBox allows you to create an .ova file and with more than one VM, it should be able to import them otherwise why have the function at all? and there is a problem just creating new machines and attaching the .vdmk files. when you create the .ova files it renames the .vdis so you have no idea which .vdmk file went with which guest or what the settings were for each.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 03:04
by Perryg
I don't have any more to add. If the originals are not available this is the best to try to recover the guest if it is important. Otherwise you need to file a ticket at bugtracker

I have not looked at that part of the code since we were able to move guests around easily since they are all self contained and we can just add the critters.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 03:06
by loukingjr
like I said earlier. I wouldn't have ever even tried this except for the OP's post. I would just copy the VM folders. but that's me.

Re: Error importing .OVA file

Posted: 21. Jul 2013, 03:10
by loukingjr
Perryg wrote:Like I said you more than likely can't import them. But you should be able to create a guest around each. You will need to play with the settings though. You can look at the OVF file and see if the settings are there in a text editor.
you can get to the settings in the .ovf with a text editor but it is a large file especially if you had several VMs. But yes. it can be done.

Re: Error importing .OVA file

Posted: 27. Aug 2013, 19:56
by lcl_l10
I ran into this same exact problem today. It would import the first vmdisk then fail on the second no matter what.

You can extract the ova like mentioned above, then make a separate copy of the ovf for each VM.

Find <References> and remove all the disks that do not got with the VM
Find <DiskSection> and remove all the disks that do not got with the VM

Lastly find <VirtualSystemCollection

Identify which <VirtualSystem entry is for the VM you need and delete all the others.

Do this for all the VMs you need to import, then do the import for each VM separately with the new ovf files.

When I did this the imports worked with no problems.
Hope this helps someone.
Good luck all

Re: Error importing .OVA file

Posted: 25. Nov 2013, 18:16
by macuisdein
Thanks lcl_l10, that worked here.

Re: Error importing .OVA file

Posted: 26. Nov 2013, 14:21
by andrewcooke
Anyone trying the above - note that after a failed import the vbox client app appears to become corrupted and will fail further imports. You need to restart the client or you will see errors even when you have successfully split the ova.