Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp	(revision 37861)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp	(revision 37862)
@@ -75,4 +75,33 @@
 
     return false;
+}
+
+static int parseImportOptions(const char *psz, com::SafeArray<ImportOptions_T> *options)
+{
+    int rc = VINF_SUCCESS;
+    while (psz && *psz && RT_SUCCESS(rc))
+    {
+        size_t len;
+        const char *pszComma = strchr(psz, ',');
+        if (pszComma)
+            len = pszComma - psz;
+        else
+            len = strlen(psz);
+        if (len > 0)
+        {
+            if (!RTStrNICmp(psz, "KeepAllMACs", len))
+                options->push_back(ImportOptions_KeepAllMACs);
+            else if (!RTStrNICmp(psz, "KeepNATMACs", len))
+                options->push_back(ImportOptions_KeepNATMACs);
+            else
+                rc = VERR_PARSE_ERROR;
+        }
+        if (pszComma)
+            psz += len + 1;
+        else
+            psz += len;
+    }
+
+    return rc;
 }
 
@@ -112,4 +141,5 @@
 #endif
     { "--disk",                 'D', RTGETOPT_REQ_STRING },
+    { "--options",              'O', RTGETOPT_REQ_STRING },
 };
 
@@ -120,4 +150,5 @@
     Utf8Str strOvfFilename;
     bool fExecute = true;                  // if true, then we actually do the import
+    com::SafeArray<ImportOptions_T> options;
     uint32_t ulCurVsys = (uint32_t)-1;
     uint32_t ulCurUnit = (uint32_t)-1;
@@ -221,4 +252,9 @@
                     return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --unit argument.", GetState.pDef->pszLong);
                 mapArgsMapsPerVsys[ulCurVsys][Utf8StrFmt("disk%u", ulCurUnit)] = ValueUnion.psz;
+                break;
+
+            case 'O':   // --options
+                if (RT_FAILURE(parseImportOptions(ValueUnion.psz, &options)))
+                    return errorArgument("Invalid import options '%s'\n", ValueUnion.psz);
                 break;
 
@@ -747,5 +783,5 @@
                 ComPtr<IProgress> progress;
                 CHECK_ERROR_BREAK(pAppliance,
-                                  ImportMachines(progress.asOutParam()));
+                                  ImportMachines(ComSafeArrayAsInParam(options), progress.asOutParam()));
 
                 rc = showProgress(progress);
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 37861)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 37862)
@@ -345,5 +345,8 @@
     if (u64Cmd & USAGE_IMPORTAPPLIANCE)
         RTStrmPrintf(pStrm,
-                     "VBoxManage import           <ovf/ova> [--dry-run|-n] [more options]\n"
+                     "VBoxManage import           <ovf/ova>\n"
+                     "                            [--dry-run|-n]\n"
+                     "                            [--options keepallmacs|keepnatmacs]\n"
+                     "                            [more options]\n"
                      "                            (run with -n to have options displayed\n"
                      "                             for a particular OVF)\n\n");
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp	(revision 37861)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp	(revision 37862)
@@ -1088,4 +1088,7 @@
     mTvSettings->header()->setResizeMode (QHeaderView::ResizeToContents);
 
+    /* Hidden by default */
+    mReinitMACsCheckBox->setHidden(true);
+
     /* Applying language settings */
     retranslateUi();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.ui	(revision 37861)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.ui	(revision 37862)
@@ -10,5 +10,5 @@
      you can redistribute it and/or modify it under the terms of the GNU
      General Public License (GPL) as published by the Free Software
-     Foundation, in version 2 as it comes in the "COPYING" file of the
+     Foundation, in version 2 as it comes in the &quot;COPYING&quot; file of the
      VirtualBox OSE distribution. VirtualBox OSE is distributed in the
      hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
@@ -20,6 +20,6 @@
     <x>0</x>
     <y>0</y>
-    <width>459</width>
-    <height>305</height>
+    <width>548</width>
+    <height>411</height>
    </rect>
   </property>
@@ -39,4 +39,14 @@
    </item>
    <item>
+    <widget class="QCheckBox" name="mReinitMACsCheckBox">
+     <property name="toolTip">
+      <string>When checked a new unique MAC address will assigned to all configured network cards.</string>
+     </property>
+     <property name="text">
+      <string>&amp;Reinitialize the MAC address of all network cards</string>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="QWidget" name="mWarningWidget" native="true">
      <property name="sizePolicy">
@@ -47,7 +57,4 @@
      </property>
      <layout class="QVBoxLayout" name="verticalLayout">
-      <property name="sizeConstraint">
-       <enum>QLayout::SetDefaultConstraint</enum>
-      </property>
       <property name="margin">
        <number>0</number>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxImportApplianceWgt.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxImportApplianceWgt.cpp	(revision 37861)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxImportApplianceWgt.cpp	(revision 37862)
@@ -42,4 +42,6 @@
     : VBoxApplianceEditorWgt (aParent)
 {
+    /* Show the MAC check box */
+    mReinitMACsCheckBox->setHidden(false);
 }
 
@@ -134,5 +136,8 @@
         /* Start the import asynchronously */
         CProgress progress;
-        progress = mAppliance->ImportMachines();
+        QVector<KImportOptions> options;
+        if (!mReinitMACsCheckBox->isChecked())
+            options.append(KImportOptions_KeepAllMACs);
+        progress = mAppliance->ImportMachines(options);
         bool fResult = mAppliance->isOk();
         if (fResult)
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 37861)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 37862)
@@ -1927,9 +1927,9 @@
       </param>
       <param name="forceNewUuid" type="boolean" dir="in">
-        <desc>Allows the caller to request a completely new medium UUID for
-        the image which is to be opened. Useful if one intends to open an exact
-        copy of a previously opened image, as this would normally fail due to
-        the duplicate UUID.</desc>
-      </param>
+         <desc>Allows the caller to request a completely new medium UUID for
+           the image which is to be opened. Useful if one intends to open an exact
+           copy of a previously opened image, as this would normally fail due to
+           the duplicate UUID.</desc>
+         </param>
       <param name="medium" type="IMedium" dir="return">
         <desc>Opened medium object.</desc>
@@ -2356,4 +2356,23 @@
   </interface>
 
+  <enum
+    name="ImportOptions" extends="$unknown"
+    uuid="0a981523-3b20-4004-8ee3-dfd322202ace"
+    >
+
+    <desc>
+    Import options, used with <link to="IAppliance::importMachines" />.
+    </desc>
+
+    <const name="KeepAllMACs"        value="1">
+      <desc>Don't generate new MAC addresses of the attached network adapters.</desc>
+    </const>
+    <const name="KeepNATMACs"        value="2">
+      <desc>Don't generate new MAC addresses of the attached network adapters when they are using NAT.</desc>
+    </const>
+
+  </enum>
+
+
   <!--
   // IAppliance
@@ -2363,5 +2382,5 @@
   <interface
     name="IAppliance" extends="$unknown"
-    uuid="7b148032-4124-4f46-b56a-b48ac1273f5a"
+    uuid="3059cf9e-25c7-4f0b-9fa5-3c42e441670b"
     wsmap="managed"
     >
@@ -2558,4 +2577,8 @@
         retrieved from the <link to="#machines" /> array attribute.
       </desc>
+
+      <param name="options" type="ImportOptions" dir="in" safearray="yes">
+        <desc>Options for the importing operation.</desc>
+      </param>
 
       <param name="aProgress" type="IProgress" dir="return">
Index: /trunk/src/VBox/Main/include/ApplianceImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 37861)
+++ /trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 37862)
@@ -97,5 +97,5 @@
     STDMETHOD(Read)(IN_BSTR path, IProgress **aProgress);
     STDMETHOD(Interpret)(void);
-    STDMETHOD(ImportMachines)(IProgress **aProgress);
+    STDMETHOD(ImportMachines)(ComSafeArrayIn(ImportOptions_T, options), IProgress **aProgress);
     /* Export methods */
     STDMETHOD(CreateVFSExplorer)(IN_BSTR aURI, IVFSExplorer **aExplorer);
Index: /trunk/src/VBox/Main/include/ApplianceImplPrivate.h
===================================================================
--- /trunk/src/VBox/Main/include/ApplianceImplPrivate.h	(revision 37861)
+++ /trunk/src/VBox/Main/include/ApplianceImplPrivate.h	(revision 37862)
@@ -73,4 +73,5 @@
     LocationInfo        locInfo;        // location info for the currently processed OVF
     bool                fManifest;      // Create a manifest file on export
+    RTCList<ImportOptions_T> optList;
 
     ovf::OVFReader      *pReader;
Index: /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 37861)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 37862)
@@ -37,4 +37,5 @@
 #include "MediumFormatImpl.h"
 #include "SystemPropertiesImpl.h"
+#include "HostImpl.h"
 
 #include "AutoCaller.h"
@@ -665,5 +666,5 @@
  * @return
  */
-STDMETHODIMP Appliance::ImportMachines(IProgress **aProgress)
+STDMETHODIMP Appliance::ImportMachines(ComSafeArrayIn(ImportOptions_T, options), IProgress **aProgress)
 {
     CheckComArgOutPointerValid(aProgress);
@@ -671,4 +672,9 @@
     AutoCaller autoCaller(this);
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    if (options != NULL)
+        m->optList = com::SafeArray<ImportOptions_T>(ComSafeArrayInArg(options)).toList();
+
+    AssertReturn(!(m->optList.contains(ImportOptions_KeepAllMACs) && m->optList.contains(ImportOptions_KeepNATMACs)), E_INVALIDARG);
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2527,6 +2533,13 @@
     /* First disable all network cards, they will be enabled below again. */
     settings::NetworkAdaptersList::iterator it1;
+    bool fKeepAllMACs = m->optList.contains(ImportOptions_KeepAllMACs);
+    bool fKeepNATMACs = m->optList.contains(ImportOptions_KeepNATMACs);
     for (it1 = llNetworkAdapters.begin(); it1 != llNetworkAdapters.end(); ++it1)
+    {
         it1->fEnabled = false;
+        if (!(   fKeepAllMACs
+              || (fKeepNATMACs && it1->mode == NetworkAttachmentType_NAT)))
+            Host::generateMACAddress(it1->strMACAddress);
+    }
     /* Now iterate over all network entries. */
     std::list<VirtualSystemDescriptionEntry*> avsdeNWs = vsdescThis->findByType(VirtualSystemDescriptionType_NetworkAdapter);
@@ -2534,5 +2547,5 @@
     {
         /* Iterate through all network adapter entries and search for the
-         * corrosponding one in the machine config. If one is found, configure
+         * corresponding one in the machine config. If one is found, configure
          * it based on the user settings. */
         list<VirtualSystemDescriptionEntry*>::const_iterator itNW;
Index: /trunk/src/VBox/Main/testcase/tstOVF.cpp
===================================================================
--- /trunk/src/VBox/Main/testcase/tstOVF.cpp	(revision 37861)
+++ /trunk/src/VBox/Main/testcase/tstOVF.cpp	(revision 37862)
@@ -233,5 +233,6 @@
 
     RTPrintf("%s: importing %d machine(s)...\n", pcszPrefix, aDescriptions.size());
-    rc = pAppl->ImportMachines(pProgress.asOutParam());
+    SafeArray<ImportOptions_T> sfaOptions;
+    rc = pAppl->ImportMachines(ComSafeArrayAsInParam(sfaOptions), pProgress.asOutParam());
     if (FAILED(rc)) throw MyError(rc, "Appliance::ImportMachines() failed\n");
     rc = pProgress->WaitForCompletion(-1);
