VirtualBox

Ticket #10689 (closed defect: fixed)

Opened 22 months ago

Last modified 10 months ago

OVA Import Fails (when OVA Contains Multiple File References) => Fixed in SVN

Reported by: abluesongbird Owned by:
Priority: major Component: OVF
Version: VirtualBox 4.1.16 Keywords:
Cc: Guest type: other
Host type: other

Description

When I attempt to import an OVA I encounter the following error:

Failed to import appliance D:\Users\foo\Downloads\virtual-workstation-vm_OVF10.ova.

Could not open the medium storage unit 'D:\Users\foo\Downloads\system.vmdk'.

VD: error VERR_TAR_END_OF_FILE opening image file 'D:\Users\foo\Downloads\system.vmdk' (VERR_TAR_END_OF_FILE).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004) Component: Appliance Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}

The OVA's OVF descriptor contains two references, in this order:

  1. system.vmdk and
  2. sandbox.vmdk.

*The referenced files appear in the TAR archive in the same order as they do in the OVF descriptor.*

During the import, VirtualBox first loads sandbox.vmdk and then tries to load system.vmdk, resulting in the error above.

Thinking this was an alphebetization/sorting problem, I renamed the files to:

  1. 00system.vmdk and
  2. 01sandbox.vmdk.

This did not help. (VirtualBox still goes for 01sandbox.vmdk first.)

Next I tried reordering the TAR archive, putting 01sandbox.vmdk before 00system.vmdk. This time the import worked! VirtualBox still loaded 01sandbox.vmdk first, but this time it could find 00system.vmdk.

Looking at the OVF spec, I think this is a VirtualBox bug: the spec indicates that the file order of the TAR should match the file order of the descriptor, but VirtualBox expects different orders.

Change History

comment:1 Changed 22 months ago by abluesongbird

I don't see a way to make the following corrections: Host type: other -> Windows Guest type: other -> Linux

comment:2 Changed 22 months ago by abluesongbird

Also, untarring the OVA and importing the OVF file provides a workaround.

comment:3 Changed 10 months ago by klaus

Could you attach the .ovf file to this bug report? So far this is extremely ambiguous, and we have no way of analyzing the issue without knowing what this file contains.

comment:4 Changed 10 months ago by VVP

temporary, try the next workaround.

1 STEP. open OVF file, find the section <DiskSection>. for example, we have

<DiskSection>

<Disk ovf:diskId="iso1" ovf:fileRef="file1"/> <Disk ovf:diskId="vmdisk2" ovf:fileRef="file2"/> <Disk ovf:diskId="vmdisk3" ovf:fileRef="file3"/>

<DiskSection>

2 STEP. find out and remember attaching position for these disks. for example - vmdisk2 is attached to IDE0, iso1 is attached to SATA0, vmdisk3 is attached to SATA1.

3 STEP. remember traversal sequence - at first, IDE, second - SATA.

4 STEP. rename vmdisk2, iso1, vmdisk3 disks in alphabetical order in accordance with their appearance in traversal sequence. In our example, it means

vmdisk2 - a_vmdisk2, iso1 - b_iso1, vmdisk3 - c_vmdisk3

<DiskSection>

<Disk ovf:diskId="b_iso1" ovf:fileRef="file1"/> <Disk ovf:diskId="a_vmdisk2" ovf:fileRef="file2"/> <Disk ovf:diskId="c_vmdisk3" ovf:fileRef="file3"/>

<DiskSection>

5 STEP. don't forget to rename the same file names in the section <VirtualHardwareSection>.

<Item>

<rasd:AddressOnParent>0</sasd:AddressOnParent> <rasd:Caption>disk1</rasd:Caption> <rasd:Description>Disk Image</rasd:Description> <rasd:HostResource>/disk/a_vmdisk2</rasd:HostResource> <rasd:InstanceID>8</rasd:InstanceID> <rasd:Parent>3</rasd:Parent> <rasd:ResourceType>17</rasd:ResourceType>

</Item>

6 STEP. re-create SHA digest for the changed OVF file. for example "openssl dgst -sha1 vm.ovf"

7 STEP. if OVA package is used then put all files from the appliance back to the TAR archive and change the extension to ".ova".

Version 0, edited 10 months ago by VVP (next)

comment:5 Changed 10 months ago by VVP

Summary: OVA Import Fails (when OVA Contains Multiple File References) => fixed in SVN

comment:6 Changed 10 months ago by frank

  • Summary changed from OVA Import Fails (when OVA Contains Multiple File References) to OVA Import Fails (when OVA Contains Multiple File References) => Fixed in SVN

comment:7 Changed 10 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 4.2.14.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use