Index: trunk/src/VBox/Main/include/ApplianceImpl.h
===================================================================
--- trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 90423)
+++ trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 90424)
@@ -306,5 +306,5 @@
 
     std::list<VirtualSystemDescriptionEntry*> i_findByType(VirtualSystemDescriptionType_T aType);
-    const VirtualSystemDescriptionEntry* i_findControllerFromID(uint32_t id);
+    const VirtualSystemDescriptionEntry* i_findControllerFromID(const Utf8Str &id);
 
     void i_importVBoxMachineXML(const xml::ElementNode &elmMachine);
Index: trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 90423)
+++ trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 90424)
@@ -1757,7 +1757,6 @@
  * virtual disk.
  */
-const VirtualSystemDescriptionEntry* VirtualSystemDescription::i_findControllerFromID(uint32_t id)
-{
-    Utf8Str strRef = Utf8StrFmt("%RI32", id);
+const VirtualSystemDescriptionEntry* VirtualSystemDescription::i_findControllerFromID(const Utf8Str &id)
+{
     vector<VirtualSystemDescriptionEntry>::const_iterator it;
     for (it = m->maDescriptions.begin();
@@ -1773,5 +1772,5 @@
             case VirtualSystemDescriptionType_HardDiskControllerVirtioSCSI:
             case VirtualSystemDescriptionType_HardDiskControllerSAS:
-                if (d.strRef == strRef)
+                if (d.strRef == id)
                     return &d;
                 break;
Index: trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 90423)
+++ trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 90424)
@@ -511,4 +511,8 @@
                     }
 #endif /* VBOX_WITH_E1000 */
+                    else if (   !ea.strAdapterType.compare("VirtioNet", Utf8Str::CaseInsensitive)
+                             || !ea.strAdapterType.compare("virtio-net", Utf8Str::CaseInsensitive)
+                             || !ea.strAdapterType.compare("3", Utf8Str::CaseInsensitive))
+                        nwAdapterVBox = NetworkAdapterType_Virtio;
 
                     pNewDesc->i_addEntry(VirtualSystemDescriptionType_NetworkAdapter,
@@ -572,5 +576,4 @@
             {
                 const ovf::HardDiskController &hdc = hdcIt->second;
-                Utf8Str strControllerID = Utf8StrFmt("%RI32", (uint32_t)hdc.idController);
 
                 switch (hdc.system)
@@ -588,7 +591,7 @@
                                 strType = "ICH6";
                             pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE,
-                                                 strControllerID,         // strRef
-                                                 hdc.strControllerType,   // aOvfValue
-                                                 strType);                // aVBoxValue
+                                                 hdc.strIdController,       // strRef
+                                                 hdc.strControllerType,     // aOvfValue
+                                                 strType);                  // aVBoxValue
                         }
                         else
@@ -609,5 +612,5 @@
                             /* We only support a plain AHCI controller, so use them always */
                             pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerSATA,
-                                                 strControllerID,
+                                                 hdc.strIdController,
                                                  hdc.strControllerType,
                                                  "AHCI");
@@ -640,5 +643,5 @@
                                 hdcController = "BusLogic";
                             pNewDesc->i_addEntry(vsdet,
-                                                 strControllerID,
+                                                 hdc.strIdController,
                                                  hdc.strControllerType,
                                                  hdcController);
@@ -650,5 +653,5 @@
                                             vsysThis.strName.c_str(),
                                             hdc.strControllerType.c_str(),
-                                            strControllerID.c_str());
+                                            hdc.strIdController.c_str());
                         ++cSCSIused;
                     break;
@@ -659,5 +662,5 @@
                         {
                             pNewDesc->i_addEntry(VirtualSystemDescriptionType_HardDiskControllerVirtioSCSI,
-                                                 strControllerID,
+                                                 hdc.strIdController,
                                                  hdc.strControllerType,
                                                  "VirtioSCSI");
@@ -753,11 +756,11 @@
 
                     /* find the description for the storage controller
-                     * that has the same ID as hd.idController */
+                     * that has the same ID as hd.strIdController */
                     const VirtualSystemDescriptionEntry *pController;
-                    if (!(pController = pNewDesc->i_findControllerFromID(hd.idController)))
+                    if (!(pController = pNewDesc->i_findControllerFromID(hd.strIdController)))
                         throw setError(E_FAIL,
-                                       tr("Cannot find storage controller with OVF instance ID %RI32 "
+                                       tr("Cannot find storage controller with OVF instance ID \"%s\" "
                                           "to which medium \"%s\" should be attached"),
-                                       hd.idController,
+                                       hd.strIdController,
                                        di.strHref.c_str());
 
@@ -1317,4 +1320,8 @@
 
     int vrc = VINF_SUCCESS;
+    /** @todo r=klaus This should be a MultiResult, because this can cause
+     * multiple errors and warnings which should be relevant for the caller.
+     * Needs some work, because there might be errors which need to be
+     * excluded if they happen in error recovery code paths. */
     HRESULT hrc = S_OK;
     bool fKeepDownloadedObject = false;//in the future should be passed from the caller
@@ -1789,5 +1796,5 @@
                     //It's thought that SATA is supported by any OS types
                     hdc.system = ovf::HardDiskController::SATA;
-                    hdc.idController = 0;
+                    hdc.strIdController = "0";
 
                     GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_HardDiskControllerSATA)//aVBoxValues is set in this #define
@@ -1798,5 +1805,5 @@
 
                     LogRel(("%s: Hard disk controller type is %s\n", __FUNCTION__, hdc.strControllerType.c_str()));
-                    vsys.mapControllers[hdc.idController] = hdc;
+                    vsys.mapControllers[hdc.strIdController] = hdc;
 
                     if (aVBoxValues.size() == 0)
@@ -2030,5 +2037,5 @@
 
                             ovf::VirtualDisk vd;
-                            vd.idController = vsys.mapControllers[0].idController;
+                            vd.strIdController = vsys.mapControllers[0].strIdController;
                             vd.ulAddressOnParent = 0;
                             vd.strDiskId = d.strDiskId;
@@ -5019,5 +5026,5 @@
 
                 // find the hard disk controller to which we should attach
-                ovf::HardDiskController hdc = (*vsysThis.mapControllers.find(ovfVdisk.idController)).second;
+                ovf::HardDiskController hdc = (*vsysThis.mapControllers.find(ovfVdisk.strIdController)).second;
 
                 // this is for rollback later
