[Solved] Cannot import appliance.ova due to SCSI issue?

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
martyscholes
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

[Solved] Cannot import appliance.ova due to SCSI issue?

Post by martyscholes »

I do not know if this is a Solaris thing or just a regular VirtualBox issue. I am trying to import a VMWare appliance into VirtualBox 4.3.30 under Solaris 11.2 but it fails:

Code: Select all

bash-4.1$ VBoxManage import appliance.ova 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/marty/appliance.ova...
VBoxManage: warning: The virtual system "vm" requests support for an additional SCSI controller of type "lsilogic" with ID 4, but VirtualBox presently supports only one SCSI controller..
VBoxManage: error: Cannot find hard disk controller with OVF instance ID 4 to which disk "disk1.vmdk" should be attached
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Appliance, interface IAppliance, callee IAppliance
VBoxManage: error: Context: "Interpret" at line 328 of file VBoxManageAppliance.cpp
Does anyone know how to get around this and import the appliance?

Thanks,
Marty
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot import appliance.ova due to SCSI issue?

Post by mpack »

The error seems clear: VirtualBox can't create a VM with this recipe.

The only workaround I know of (that doesn't require much knowledge of OVF) would be to unpack the OVA (use untar), then convert the VMDKs to VDI (trust me, this step is necessary), then build a new VM around the VDIs. I suggest a switch to SATA if the guest supports it, otherwise attach the drives to an IDE controller.

Actually, you could probably attach both drives to the same SCSI controller. I bet that was the intention before someone messed up the OVA.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: Cannot import appliance.ova due to SCSI issue?

Post by michaln »

martyscholes wrote:I do not know if this is a Solaris thing or just a regular VirtualBox issue.
It probably has nothing to do with Solaris. It may be a VirtualBox limitation. Hard to say anything intelligent without seeing the OVF file (not the whole OVA blob, just the small OVF text file).

What mpack said is a good advice. I will add that it is not strictly necessary to convert the VMDK files, but the VMDK files inside an OVA archive are special compressed VMDK images that are not writable. VirtualBox can handle that and automatically creates differencing images but it's probably not what you want.
martyscholes
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

Re: Cannot import appliance.ova due to SCSI issue?

Post by martyscholes »

mpack and michaln, many thanks for the responses.

I had no idea that ova was a tar, or that ovf was a recipe. I believe the appliance is based on CentOS, so SATA should be fine. I am guessing that the offending part is here:

Code: Select all

      <Item>
        <rasd:Address>1</rasd:Address>
        <rasd:Description>SCSI Controller</rasd:Description>
        <rasd:ElementName>scsiController1</rasd:ElementName>
        <rasd:InstanceID>3</rasd:InstanceID>
        <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
        <rasd:ResourceType>6</rasd:ResourceType>
      </Item>
      <Item>
        <rasd:Address>0</rasd:Address>
        <rasd:Description>SCSI Controller</rasd:Description>
        <rasd:ElementName>scsiController0</rasd:ElementName>
        <rasd:InstanceID>4</rasd:InstanceID>
        <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
        <rasd:ResourceType>6</rasd:ResourceType>
      </Item>
Assuming that is the section that VB dislikes, what needs to change to make it acceptable to VB? Once fixed, how can I turn it all back into an importable VM? Should I just tar it back into an ova file and import it?

Thanks again,
Marty
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot import appliance.ova due to SCSI issue?

Post by mpack »

You would delete the second controller definition, you would rename the first controller from "scsiController1" to "scsiController", and you would move any hdds currently assigned to the deleted controller.

Or, you could just go ahead and create the VM using VDI clones of the VDMKs as I suggested, and manually make the recipe close to what you see in the OVF. If necessary you can then re-export the VM (though I'm not sure why!).
martyscholes
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

Re: Cannot import appliance.ova due to SCSI issue?

Post by martyscholes »

mpack wrote:Or, you could just go ahead and create the VM using VDI clones of the VDMKs as I suggested, and manually make the recipe close to what you see in the OVF. If necessary you can then re-export the VM (though I'm not sure why!).
Thanks for the quick reply. Please forgive my lack of knowledge here. Do I create the VM using VDI clones with a VirtualBox command? Do I need some VMWare software? Something else? I am familiar with the VirtualBox GUI, VBoxManage, and standard Unix tools, but not much else, and I cannot seem to translate the steps you mention into commands I am familiar with.

Thanks again,
Marty
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot import appliance.ova due to SCSI issue?

Post by mpack »

Create the VM as normal. When you get to disk creation step, select "use existing" and nominate your primary VDI clone file.

It's a good idea, just before nominating the VDI, to move it inside the new VM folder. That keeps everything in the expected place, which is useful if you need help in future.

Before running the VM you edit VM settings | Storage and add the secondary VDI, which you should also locate inside the VM folder.

While you're in among the settings you would compare the settings for compatibility with the OVF. Particularly RAM size, network card type and MAC address etc.
martyscholes
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

Re: Cannot import appliance.ova due to SCSI issue?

Post by martyscholes »

mpack wrote:Create the VM as normal. When you get to disk creation step, select "use existing" and nominate your primary VDI clone file.

It's a good idea, just before nominating the VDI, to move it inside the new VM folder. That keeps everything in the expected place, which is useful if you need help in future.

Before running the VM you edit VM settings | Storage and add the secondary VDI, which you should also locate inside the VM folder.

While you're in among the settings you would compare the settings for compatibility with the OVF. Particularly RAM size, network card type and MAC address etc.
That worked. Many thanks.
Post Reply