Importing OVA containing an ISO image fails

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Pasi
Posts: 3
Joined: 2. Apr 2014, 10:14

Importing OVA containing an ISO image fails

Post by Pasi »

I have created a VM with no hard disk, only a bootable ISO image. It works as intended, nothing special there. The host is Windows (VirtualBox 4.3.10), guest is Linux (64-bit Ubuntu 12.04).

Now I'd like to export this VM to a single OVA file that includes the ISO image inside. It seems "vboxmanage export <name> -o <output file>.ova --options iso" does exactly this. The OVA archive includes the ISO file (and the OVF file inside looks sensible, too).

However, importing this OVA back to VirtualBox (from File / Import Appliance...) does not work. The import starts just fine (I get the "Importing appliance ... (1/3)" dialog), but after a while, I this this error message:

Code: Select all

Failed to import appliance C:\Temp\exporttest2.ova.
Could not get the storage format of the medium 'C:\Users\Pasi\VirtualBox VMs\exporttest2\exporttest2-disk1.iso' (VERR_SHARING_VIOLATION).
Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Any suggestions?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Importing OVA containing an ISO image fails

Post by loukingjr »

I'm not going to pretend to understand why you want to do what you are doing but, I expect the problem you are having is importing an .OVA appliance expects a drive present. in other words, the OVA or OVF format is for creating a virtual machine package, not to move .iso's around.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Pasi
Posts: 3
Joined: 2. Apr 2014, 10:14

Re: Importing OVA containing an ISO image fails

Post by Pasi »

The ISO image in question is a bootable Linux distibution ("live CD"), meant to be run from the CD, not for installing Linux on a hard disk.

I'm distributing this to some users on an actual bootable CD (or USB stick), but I'd like to package this in OVA so that it's easily used in VirtualBox, too. Obviously I could distribute the ISO file and instructions on how to create a new VM and attach the ISO file, but the target audience is mostly not familiar with creating new VMs, so an OVA file would be simpler...

(And BTW, exporting/importing an OVA without any disks or ISOs (just the virtual machine settings) works fine, so OVA does not expect disks to be present ...)
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: Importing OVA containing an ISO image fails

Post by mpack »

Pasi wrote:The ISO image in question is a bootable Linux distibution ("live CD"), meant to be run from the CD, not for installing Linux on a hard disk.
"Is able to" is not the same as "is meant to be". The point of a live CD is that you can test drive it without having to zap your PCs hard disk. Since that isn't an issue with a VM, you should just install it to virtual hard disk.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Importing OVA containing an ISO image fails

Post by loukingjr »

Pasi wrote: (And BTW, exporting/importing an OVA without any disks or ISOs (just the virtual machine settings) works fine, so OVA does not expect disks to be present ...)
yes, I see how well it imported for you. silly me.

:roll:
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Importing OVA containing an ISO image fails

Post by scottgus1 »

One consideration, Pasi, if you intend this distribution to be only used in Virtualbox version 4 and later: the files that define the guest are all in one folder. If you place the ISO in the guest's folder, attach the ISO to the guest and run it so the ISO is fully recognized, then shut down, you may be able to copy that whole guest folder with all the files and the ISO inside to another PC running Virtualbox v4, double-click the .vbox file within the guest folder to register the machine with the new PC's Virtualbox, and you ought to be ready to go (I think, I haven't tested it). This way you may not have to use the OVA.
Pasi
Posts: 3
Joined: 2. Apr 2014, 10:14

Re: Importing OVA containing an ISO image fails

Post by Pasi »

Thanks, scottgus1! Your suggestion indeed works, and distributing that folder (just two files, .vbox and .iso) as a .ZIP is almost as easy for the user as .OVA.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Importing OVA containing an ISO image fails

Post by scottgus1 »

Glad to help!
Post Reply