Index: /trunk/src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- /trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 86649)
+++ /trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 86650)
@@ -356,5 +356,5 @@
         echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules
         # Make sure the new rule is noticed.
-        udevadm control --reload-rules >/dev/null 2>&1 || true
+        udevadm control --reload >/dev/null 2>&1 || true
         udevcontrol reload_rules >/dev/null 2>&1 || true
     fi
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp	(revision 86649)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp	(revision 86650)
@@ -1113,8 +1113,4 @@
                         case VirtualSystemDescriptionType_CloudPublicSSHKey:
                         case VirtualSystemDescriptionType_BootingFirmware:
-                        case VirtualSystemDescriptionType_CloudInstanceMetadata:
-                        case VirtualSystemDescriptionType_CloudInstanceFreeFormTags:
-                        case VirtualSystemDescriptionType_CloudImageFreeFormTags:
-
                             /** @todo  VirtualSystemDescriptionType_Miscellaneous? */
                             break;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp	(revision 86649)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp	(revision 86650)
@@ -123,4 +123,10 @@
     int vrc = RTGetOptInit(&GetState, a->argc, a->argv, s_aOptions, RT_ELEMENTS(s_aOptions), iFirst, 0);
     AssertRCReturn(vrc, RTEXITCODE_FAILURE);
+    if (a->argc == iFirst)
+    {
+        RTPrintf("Empty command parameter list, show help.\n");
+        printHelp(g_pStdOut);
+        return RTEXITCODE_SUCCESS;
+    }
 
     Utf8Str strCompartmentId;
@@ -289,4 +295,10 @@
     int vrc = RTGetOptInit(&GetState, a->argc, a->argv, s_aOptions, RT_ELEMENTS(s_aOptions), iFirst, 0);
     AssertRCReturn(vrc, RTEXITCODE_FAILURE);
+    if (a->argc == iFirst)
+    {
+        RTPrintf("Empty command parameter list, show help.\n");
+        printHelp(g_pStdOut);
+        return RTEXITCODE_SUCCESS;
+    }
 
     Utf8Str strCompartmentId;
@@ -530,5 +542,4 @@
 
     Utf8Str strDisplayName, strImageId, strBootVolumeId, strPublicSSHKey;
-    bool fKeyPresented = false;
     int c;
     while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0)
@@ -592,5 +603,4 @@
                 pVSD->AddDescription(VirtualSystemDescriptionType_CloudPublicSSHKey,
                                      Bstr(ValueUnion.psz).raw(), NULL);
-                fKeyPresented = true;
                 break;
             case 1001:
@@ -610,10 +620,6 @@
         return RTEXITCODE_FAILURE;
 
-    if ( fKeyPresented )
-        if (strPublicSSHKey.isEmpty())
-            RTPrintf("Warning!!! The value of the passed public SSH key is empty...\n");
-    else
-        return errorArgument("Parameter --public-ssh-key is absent. if there is no need to pass a key just use the form"
-                             " '--public-ssh-key='.");
+    if (strPublicSSHKey.isEmpty())
+        RTPrintf("Warning!!! Public SSH key doesn't present in the passed arguments...\n");
 
     if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty())
@@ -781,5 +787,5 @@
     };
 
-    const size_t vsdHReadableArraySize = 14;//the number of items in the vsdHReadableArray
+    const size_t vsdHReadableArraySize = 12;//the number of items in the vsdHReadableArray
     vsdHReadable vsdHReadableArray[vsdHReadableArraySize] = {
         {VirtualSystemDescriptionType_CloudDomain, "Availability domain = %ls\n", "Availability domain wasn't found\n"},
@@ -796,8 +802,5 @@
         {VirtualSystemDescriptionType_CPU, "CPUs = %ls\n", "Numbers of CPUs weren't found\n"},
         {VirtualSystemDescriptionType_CloudPublicIP, "Instance public IP = %ls\n", "Public IP wasn't found\n"},
-        {VirtualSystemDescriptionType_CloudInstanceMetadata, "%ls\n", "Metadata weren't found\n"},
-        {VirtualSystemDescriptionType_CloudInstanceFreeFormTags, "%ls\n", "Instance free-form tags weren't found\n"},
-        {VirtualSystemDescriptionType_CloudImageFreeFormTags, "%ls\n", "Image free-form tags weren't found\n"}
-
+        {VirtualSystemDescriptionType_Miscellaneous, "%ls\n", "Free-form tags or metadata weren't found\n"}
     };
 
Index: /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 86649)
+++ /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 86650)
@@ -363,19 +363,4 @@
                 }
 #endif
-                break;
-            }
-
-            case VBoxEventType_OnProgressPercentageChanged:
-            {
-                ComPtr<IProgressPercentageChangedEvent> pV = aEvent;
-                Assert(pV);
-                LONG percent = 0;
-                pV->COMGETTER(Percent)(&percent);
-                {
-                    LogRel(("VBoxSDLEventListener: got the percent %d from the event "
-                            "VBoxEventType_OnProgressPercentageChanged.\n", percent));
-                    RTPrintf("VBoxSDLEventListener: got the percent %d from the event "
-                             "VBoxEventType_OnProgressPercentageChanged.\n", percent);
-                }
                 break;
             }
@@ -612,19 +597,4 @@
                 }
 #endif /* !RT_OS_DARWIN */
-                break;
-            }
-
-            case VBoxEventType_OnProgressPercentageChanged:
-            {
-                ComPtr<IProgressPercentageChangedEvent> pV = aEvent;
-                Assert(pV);
-                LONG percent = 0;
-                pV->COMGETTER(Percent)(&percent);
-                {
-                    LogRel(("VBoxSDLConsoleEventListener: got the percent %d from the event "
-                            "VBoxEventType_OnProgressPercentageChanged.\n", percent));
-                    RTPrintf("VBoxSDLConsoleEventListener: got the percent %d from the event "
-                             "VBoxEventType_OnProgressPercentageChanged.\n", percent);
-                }
                 break;
             }
@@ -2138,6 +2108,4 @@
         com::SafeArray<VBoxEventType_T> eventTypes;
         eventTypes.push_back(VBoxEventType_OnExtraDataChanged);
-
-        eventTypes.push_back(VBoxEventType_OnProgressPercentageChanged);
         CHECK_ERROR(pES, RegisterListener(pVBoxListener, ComSafeArrayAsInParam(eventTypes), true));
     }
@@ -2157,5 +2125,4 @@
         eventTypes.push_back(VBoxEventType_OnCanShowWindow);
         eventTypes.push_back(VBoxEventType_OnShowWindow);
-        eventTypes.push_back(VBoxEventType_OnProgressPercentageChanged);
         CHECK_ERROR(pES, RegisterListener(pConsoleListener, ComSafeArrayAsInParam(eventTypes), true));
         // until we've tried to to start the VM, ignore power off events
@@ -2405,5 +2372,5 @@
                     case SDL_USER_EVENT_XPCOM_EVENTQUEUE:
                     {
-//                      LogFlow(("SDL_USER_EVENT_XPCOM_EVENTQUEUE: processing XPCOM event queue...\n"));
+                        LogFlow(("SDL_USER_EVENT_XPCOM_EVENTQUEUE: processing XPCOM event queue...\n"));
                         eventQ->processEventQueue(0);
                         signalXPCOMEventQueueThread();
Index: /trunk/src/VBox/Main/UnattendedTemplates/ol_ks.cfg
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/ol_ks.cfg	(revision 86649)
+++ /trunk/src/VBox/Main/UnattendedTemplates/ol_ks.cfg	(revision 86650)
@@ -82,7 +82,7 @@
 glibc-headers
 gcc
-@@VBOX_COND_GUEST_VERSION[>8.0.0]@@
+@@VBOX_GUEST_OS_COND_VERSION@@**8.0.0**
 elfutils-libelf-devel
-@@VBOX_COND_END@@
+@@VBOX_GUEST_OS_COND_END@@
 dkms
 make
Index: /trunk/src/VBox/Main/UnattendedTemplates/ol_postinstall.sh
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/ol_postinstall.sh	(revision 86649)
+++ /trunk/src/VBox/Main/UnattendedTemplates/ol_postinstall.sh	(revision 86650)
@@ -202,7 +202,7 @@
 log_command_in_target yum -y install binutils
 log_command_in_target yum -y install make
-@@VBOX_COND_GUEST_VERSION[>8.0.0]@@
+@@VBOX_GUEST_OS_COND_VERSION@@**8.0.0**
 log_command_in_target yum -y install elfutils-libelf-devel
-@@VBOX_COND_END@@
+@@VBOX_GUEST_OS_COND_END@@
 log_command_in_target yum -y install dkms
 log_command_in_target yum -y install make
Index: /trunk/src/VBox/Main/UnattendedTemplates/redhat67_ks.cfg
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/redhat67_ks.cfg	(revision 86649)
+++ /trunk/src/VBox/Main/UnattendedTemplates/redhat67_ks.cfg	(revision 86650)
@@ -82,7 +82,7 @@
 glibc-headers
 gcc
-@@VBOX_COND_GUEST_VERSION[>8.0.0]@@
+@@VBOX_GUEST_OS_COND_VERSION@@**8.0.0**
 elfutils-libelf-devel
-@@VBOX_COND_END@@
+@@VBOX_GUEST_OS_COND_END@@
 dkms
 make
Index: /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh
===================================================================
--- /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh	(revision 86649)
+++ /trunk/src/VBox/Main/UnattendedTemplates/redhat_postinstall.sh	(revision 86650)
@@ -178,7 +178,7 @@
 log_command_in_target yum -y install binutils
 log_command_in_target yum -y install make
-@@VBOX_COND_GUEST_VERSION[>8.0.0]@@
+@@VBOX_GUEST_OS_COND_VERSION@@**8.0.0**
 log_command_in_target yum -y install elfutils-libelf-devel
-@@VBOX_COND_END@@
+@@VBOX_GUEST_OS_COND_END@@
 log_command_in_target yum -y install dkms
 log_command_in_target yum -y install make
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 86649)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 86650)
@@ -4178,5 +4178,5 @@
   <enum
     name="VirtualSystemDescriptionType"
-    uuid="70c5ca7b-65a8-49cc-9b19-e80192b9db1d"
+    uuid="6e18c6d7-e1b7-4cb0-9706-1f31d18248f8"
     >
     <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
@@ -4246,7 +4246,4 @@
     <const name="CloudPublicSSHKey" value="48" />
     <const name="BootingFirmware" value="49" />
-    <const name="CloudInstanceMetadata" value="50" />
-    <const name="CloudInstanceFreeFormTags" value="51" />
-    <const name="CloudImageFreeFormTags" value="52" />
     <const name="HardDiskControllerVirtioSCSI" value="60" />
   </enum>
Index: /trunk/src/VBox/Main/include/ApplianceImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 86649)
+++ /trunk/src/VBox/Main/include/ApplianceImpl.h	(revision 86650)
@@ -145,6 +145,4 @@
     static void i_exportOPCThreadTask(TaskOPC *pTask);
     static void i_importOrExportCloudThreadTask(TaskCloud *pTask);
-
-    HRESULT i_findFirstBootableImage(ComPtr<IMedium>& bootMedium, const ComPtr<IMachine> &pMachine);
 
     HRESULT i_initBackendNames();
Index: /trunk/src/VBox/Main/include/ProgressImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ProgressImpl.h	(revision 86649)
+++ /trunk/src/VBox/Main/include/ProgressImpl.h	(revision 86650)
@@ -157,5 +157,4 @@
     static DECLCALLBACK(int) i_vdProgressCallback(void *pvUser, unsigned uPercentage);
 
-    HRESULT i_addOperations(ULONG cOperations, ULONG ulTotalOperationsWeight);
 protected:
     DECLARE_EMPTY_CTOR_DTOR(Progress)
Index: /trunk/src/VBox/Main/include/UnattendedInstaller.h
===================================================================
--- /trunk/src/VBox/Main/include/UnattendedInstaller.h	(revision 86649)
+++ /trunk/src/VBox/Main/include/UnattendedInstaller.h	(revision 86650)
@@ -520,5 +520,4 @@
 /**
  * RHEL 7 installer (same as RHEL 6).
- * The class was added for better handling any possible subtle difference between RHEL6 and RHEL7.
  */
 class UnattendedRhel7Installer : public UnattendedRhel6Installer
@@ -541,5 +540,4 @@
 /**
  * RHEL 8 installer (same as RHEL 7).
- * The class was added for better handling any possible subtle difference between RHEL7 and RHEL8.
  */
 class UnattendedRhel8Installer : public UnattendedRhel7Installer
@@ -607,7 +605,5 @@
 
 /**
- * Oracle Linux 6 installer. 
- * (same as RHEL 6, except for the templates). 
- * The reason of adding new class is to sepatate the RHEL from OL.
+ * Oracle Linux 6 installer.
  */
 class UnattendedOracleLinux6Installer : public UnattendedRhel6Installer
@@ -625,6 +621,5 @@
 
 /**
- * Oracle Linux 7 installer. Same as OL 6.
- * The class was added for better handling any possible subtle difference between OL6 and OL7.
+ * Oracle Linux 7 installer.
  */
 class UnattendedOracleLinux7Installer : public UnattendedOracleLinux6Installer
@@ -646,6 +641,5 @@
 
 /**
- * Oracle Linux 8 installer. Same as OL 7.
- * The class was added for better handling any possible subtle difference between OL7 and OL8.
+ * Oracle Linux 8 installer.
  */
 class UnattendedOracleLinux8Installer : public UnattendedOracleLinux7Installer
Index: /trunk/src/VBox/Main/include/UnattendedScript.h
===================================================================
--- /trunk/src/VBox/Main/include/UnattendedScript.h	(revision 86649)
+++ /trunk/src/VBox/Main/include/UnattendedScript.h	(revision 86650)
@@ -96,4 +96,23 @@
     virtual HRESULT getConditional(const char *pachPlaceholder, size_t cchPlaceholder, bool *pfOutputting);
 
+
+    /**
+     * Get the result of a conditional for special version of guest OS.
+     *
+     * @returns COM status code.
+     * @param   pachPlaceholder     The placholder string.  Not zero terminated.
+     * @param   cchPlaceholder      The length of the placeholder.
+     * @param   cchContent          The length of placeholder content.
+     * @param   pcchCorrect         The length of part which must be excluded from the final content of
+     *                              the placeholder.
+     * @param   pfOutputting        Where to return the result of the conditional.
+     *                              This holds the current outputting state on input
+     *                              in case someone want to sanity check anything.
+     */
+    virtual HRESULT getGuestOSConditional(const char *pachPlaceholder,
+                                          size_t cchPlaceholder,
+                                          size_t cchContent,
+                                          size_t *pcchCorrect,
+                                          bool *pfOutputting);
 };
 
Index: /trunk/src/VBox/Main/src-all/ProgressImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-all/ProgressImpl.cpp	(revision 86649)
+++ /trunk/src/VBox/Main/src-all/ProgressImpl.cpp	(revision 86650)
@@ -321,11 +321,4 @@
 
 // public methods only for internal purposes
- 
-HRESULT Progress::i_addOperations(ULONG cOperations, ULONG ulTotalOperationsWeight)
-{
-    m_cOperations += cOperations;
-    m_ulTotalOperationsWeight += ulTotalOperationsWeight;
-    return S_OK;
-}
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -1066,5 +1059,5 @@
     m_ulOperationPercent = 0;
 
-    LogRel(("%s: aNextOperationsWeight = %d; m_ulCurrentOperation is now %d, m_ulOperationsCompletedWeight is now %d\n",
+    LogThisFunc(("%s: aNextOperationsWeight = %d; m_ulCurrentOperation is now %d, m_ulOperationsCompletedWeight is now %d\n",
                  m_operationDescription.c_str(), aNextOperationsWeight, m_ulCurrentOperation, m_ulOperationsCompletedWeight));
 
Index: /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 86649)
+++ /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 86650)
@@ -26,5 +26,4 @@
 #include <VBox/com/array.h>
 #include <map>
-#include <stack>
 
 #include "ApplianceImpl.h"
@@ -1410,111 +1409,4 @@
 }
 
-HRESULT Appliance::i_findFirstBootableImage(ComPtr<IMedium>& bootMedium, const ComPtr<IMachine> &pMachine)
-{
-    HRESULT hrc = S_OK;
-    LogFlowFuncEnter();
-
-    const ComPtr<IMachine> &baseMachine = pMachine;
-    try
-    {
-        /* Fetch all available storage controllers */
-        com::SafeIfaceArray<IStorageController> aStorageControllers;
-//      AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = baseMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers));
-//      alock.release();
-        bool fBootMediumFound = false;
-        ComPtr<IMedium> ptrBootMedium;
-        std::stack <StorageBus_T> aBuses;
-        //insert buses in priority StorageBus_IDE - highest, StorageBus_SAS - lowest
-        aBuses.push(StorageBus_SAS);
-        aBuses.push(StorageBus_SCSI);
-        aBuses.push(StorageBus_SATA);
-        aBuses.push(StorageBus_IDE);
-
-        while (!aBuses.empty())
-        {
-            Bstr    bstrControllerName;
-            Utf8Str strControllerName;
-            ComPtr<IStorageController> sc;
-            StorageBus_T eTargetStorageBusType = aBuses.top();
-            StorageBus_T eSourceStorageBusType;
-            bool f = false;
-
-            for (size_t i=0; i<aStorageControllers.size(); ++i)
-            {
-                sc = aStorageControllers[i];
-                sc->COMGETTER(Name)(bstrControllerName.asOutParam());
-                sc->COMGETTER(Bus)(&eSourceStorageBusType);
-                if (eSourceStorageBusType == eTargetStorageBusType)
-                {
-                    f = true;
-                    break;
-                }
-            }
-
-            if (!f)
-            {
-                aBuses.pop();
-                continue;
-            }
-
-            com::SafeIfaceArray<IMediumAttachment> aMediumAttachments;
-            hrc = baseMachine->GetMediumAttachmentsOfController(bstrControllerName.raw(),
-                                                                ComSafeArrayAsOutParam(aMediumAttachments));
-
-            strControllerName = bstrControllerName;
-            AssertLogRelReturn(strControllerName.isNotEmpty(), setErrorBoth(E_UNEXPECTED, VERR_INTERNAL_ERROR_2));
-
-            for (size_t j = 0; j < aMediumAttachments.size(); j++)
-            {
-                //some checks just in case
-                LONG iPort = -1;
-                hrc = aMediumAttachments[j]->COMGETTER(Port)(&iPort);
-                AssertComRCReturn(hrc, hrc);
-
-                LONG iDevice = -1;
-                hrc = aMediumAttachments[j]->COMGETTER(Device)(&iDevice);
-                AssertComRCReturn(hrc, hrc);
-
-                DeviceType_T enmType;
-                hrc = aMediumAttachments[j]->COMGETTER(Type)(&enmType);
-                AssertComRCReturn(hrc, hrc);
-
-                if (enmType == DeviceType_HardDisk)
-                {
-                    ComPtr<IMedium> ptrMedium;
-                    hrc = aMediumAttachments[j]->COMGETTER(Medium)(ptrMedium.asOutParam());
-                    AssertComRCReturn(hrc, hrc);
-
-                    if (ptrMedium.isNotNull())
-                    {
-                        ptrBootMedium = ptrMedium;
-                        fBootMediumFound = true;
-                        break;
-                    }
-                }
-            }
-
-            if (fBootMediumFound)
-            {
-                hrc = S_OK;
-                break;
-            }
-            else
-                aBuses.pop();
-        }
-
-        if (ptrBootMedium != NULL && !ptrBootMedium.isNull())
-            ptrBootMedium.queryInterfaceTo(bootMedium.asOutParam());
-    }
-    catch (HRESULT erc)
-    {
-        hrc = setError(erc, tr("Exception during finding a bootable disk "));
-    }
-
-    LogFlowFuncLeave();
-    return hrc;
-}
-
 void i_parseURI(Utf8Str strUri, LocationInfo &locInfo)
 {
Index: /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 86649)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 86650)
@@ -712,7 +712,5 @@
         try
         {
-            alock.release();
             rc = i_writeCloudImpl(m->locInfo, progress);
-            alock.acquire();
         }
         catch (HRESULT aRC)
@@ -885,6 +883,4 @@
 HRESULT Appliance::i_writeCloudImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress)
 {
-    HRESULT hrc = S_OK;
-
     for (list<ComObjPtr<VirtualSystemDescription> >::const_iterator
          it = m->virtualSystemDescriptions.begin();
@@ -901,42 +897,15 @@
         }
 
-        //Detect bootable disk and remove others from the VirtualSystemDescription
-        ComPtr<IMedium> pBootableMedium;
-        hrc = i_findFirstBootableImage(pBootableMedium, vsdescThis->m->pMachine);
-
-        if (FAILED(hrc)) 
-            throw hrc;
-        if (pBootableMedium.isNull())
-            throw hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("Could not find any bootable disk"));
-
-        ComPtr<IMedium> pBootableBaseMedium;
-        // returns pBootableMedium if there are no diff images
-        hrc = pBootableMedium->COMGETTER(Base)(pBootableBaseMedium.asOutParam());
-        if (FAILED(hrc)) 
-            throw hrc;
-
-        //Get base bootable disk location
-        Bstr bstrBootLocation;
-        hrc = pBootableBaseMedium->COMGETTER(Location)(bstrBootLocation.asOutParam());
-        if (FAILED(hrc)) throw hrc;
-        Utf8Str strBootLocation = bstrBootLocation;
-
+        //remove all disks from the VirtualSystemDescription exept one
         skipped = vsdescThis->i_findByType(VirtualSystemDescriptionType_HardDiskImage);
         itSkipped = skipped.begin();
+
+        Utf8Str strBootLocation;
         while (itSkipped != skipped.end())
         {
-            Utf8Str path = (*itSkipped)->strVBoxCurrent;
-            // Locate the Medium object for this entry (by location/path).
-            Log(("Finding disk \"%s\"\n", path.c_str()));
-            ComObjPtr<Medium> ptrSourceDisk;
-            hrc = mVirtualBox->i_findHardDiskByLocation(path, true , &ptrSourceDisk);
-            if (FAILED(hrc)) 
-                throw hrc;
-
-            if (!path.equalsIgnoreCase(strBootLocation))
+            if (strBootLocation.isEmpty())
+                strBootLocation = (*itSkipped)->strVBoxCurrent;
+            else
                 (*itSkipped)->skipIt = true;
-            else
-                LogRel(("Possible bootable disk \"%s\"\n", path.c_str()));
-
             ++itSkipped;
         }
@@ -963,5 +932,5 @@
 
     // Create a progress object here otherwise Task won't be created successfully
-    hrc = aProgress.createObject();
+    HRESULT hrc = aProgress.createObject();
     if (SUCCEEDED(hrc))
     {
Index: /trunk/src/VBox/Main/src-server/UnattendedScript.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/UnattendedScript.cpp	(revision 86649)
+++ /trunk/src/VBox/Main/src-server/UnattendedScript.cpp	(revision 86650)
@@ -59,4 +59,6 @@
     static const char s_szPrefixCond[]     = "@@VBOX_COND_";
     static const char s_szPrefixCondEnd[]  = "@@VBOX_COND_END@@";
+    static const char s_szPrefixCondGuestOs[]     = "@@VBOX_GUEST_OS_COND_";
+    static const char s_szPrefixCondGuestOsEnd[]  = "@@VBOX_GUEST_OS_COND_END@@";
 
     struct
@@ -69,4 +71,5 @@
     size_t      offTemplate = 0;
     size_t      cchTemplate = mStrScriptFullContent.length();
+    size_t      cchInternalCorrect = 0;//used in logic handling the placeholder @@VBOX_GUEST_OS_COND_XXX@@
     rStrDst.setNull();
     for (;;)
@@ -83,5 +86,5 @@
                 try
                 {
-                    rStrDst.append(mStrScriptFullContent, offTemplate, cchToCopy);
+                    rStrDst.append(mStrScriptFullContent, offTemplate + cchInternalCorrect, cchToCopy - + cchInternalCorrect);
                 }
                 catch (std::bad_alloc &)
@@ -92,4 +95,5 @@
             }
             offTemplate += cchToCopy;
+            cchInternalCorrect = 0;//don't forget to reset
         }
 
@@ -107,5 +111,5 @@
             while (   offPlaceholder + cchPlaceholder < cchTemplate
                    && (ch = pszPlaceholder[cchPlaceholder]) != '\0'
-                   && (   ch == '_' || ch == '[' || ch == ']' || ch == '.' || ch == '>' || ch == '<'
+                   && (   ch == '_'
                        || RT_C_IS_UPPER(ch)
                        || RT_C_IS_DIGIT(ch)) )
@@ -124,5 +128,6 @@
                 || pszPlaceholder[cchPlaceholder - 2] != '@'
                 || (   strncmp(pszPlaceholder, s_szPrefixInsert, sizeof(s_szPrefixInsert) - 1) != 0
-                    && strncmp(pszPlaceholder, s_szPrefixCond,   sizeof(s_szPrefixCond)   - 1) != 0 ) )
+                    && strncmp(pszPlaceholder, s_szPrefixCond,   sizeof(s_szPrefixCond)   - 1) != 0
+                    && strncmp(pszPlaceholder, s_szPrefixCondGuestOs,   sizeof(s_szPrefixCondGuestOs) - 1) != 0) )
             {
                 hrc = mpSetError->setError(E_FAIL, mpSetError->tr("Malformed template placeholder '%.*s'"),
@@ -183,7 +188,6 @@
              *                    one from the condition.
              */
-            else
-            {
-                Assert(strncmp(pszPlaceholder, s_szPrefixCond, sizeof(s_szPrefixCond) - 1) == 0);
+            else if ( strncmp(pszPlaceholder, s_szPrefixCond, sizeof(s_szPrefixCond) - 1U) == 0 )
+            {
                 if (cConds + 1 < RT_ELEMENTS(aConds))
                 {
@@ -191,4 +195,56 @@
                     bool fNewOutputting = fOutputting;
                     hrc = getConditional(pszPlaceholder, cchPlaceholder, &fNewOutputting);
+                    if (SUCCEEDED(hrc))
+                        fOutputting = fOutputting && fNewOutputting;
+                    else
+                        break;
+                    cConds++;
+                }
+                else
+                {
+                    hrc = mpSetError->setErrorBoth(E_FAIL, VERR_PARSE_ERROR,
+                                                   mpSetError->tr("Too deep conditional nesting at offset %zu (%#zx)"),
+                                                   offPlaceholder, offPlaceholder);
+                    break;
+                }
+            }
+            /*
+             * @@VBOX_GUEST_OS_COND_END@@: Pop one item of the conditional stack.
+             */
+            else if ( strncmp(pszPlaceholder, s_szPrefixCondGuestOsEnd, sizeof(s_szPrefixCondGuestOsEnd) - 1U) == 0 )
+            {
+                if (cConds > 0)
+                {
+                    cConds--;
+                    fOutputting = aConds[cConds].fSavedOutputting;
+                }
+                else
+                {
+                    hrc = mpSetError->setErrorBoth(E_FAIL, VERR_PARSE_ERROR,
+                                                   mpSetError->tr("%s without @@VBOX_GUEST_OS_COND_XXX@@ at offset %zu (%#zx)"),
+                                                   s_szPrefixCondGuestOsEnd, offPlaceholder, offPlaceholder);
+                    break;
+                }
+            }
+            /*
+             * @@VBOX_GUEST_OS_COND_XXX@@: Push the previous outputting state and combine it with the
+             *                             one from the condition.
+             */
+            else
+            {
+                Assert(strncmp(pszPlaceholder, s_szPrefixCondGuestOs, sizeof(s_szPrefixCondGuestOs) - 1) == 0);
+                if (cConds + 1 < RT_ELEMENTS(aConds))
+                {
+                    aConds[cConds].fSavedOutputting = fOutputting;
+                    bool fNewOutputting = fOutputting;
+
+                    //offTemplate is the beginning of content, offEndContent is the end of content
+                    //@@PLACEHOLDER_BEGIN@@Content@@PLACEHOLDER_END@@
+                    //                    ^       ^
+                    //                    |       |
+                    //             offTemplate  offEndContent
+                    size_t offEndContent = mStrScriptFullContent.find(s_szPrefix, offTemplate);
+                    size_t cchContent = offEndContent - offTemplate - 1;
+                    hrc = getGuestOSConditional(pszPlaceholder, cchPlaceholder, cchContent, &cchInternalCorrect, &fNewOutputting);
                     if (SUCCEEDED(hrc))
                         fOutputting = fOutputting && fNewOutputting;
@@ -443,4 +499,85 @@
 }
 
+HRESULT UnattendedScriptTemplate::getGuestOSConditional(const char *pachPlaceholder,
+                                                        size_t cchPlaceholder,
+                                                        size_t cchContent,
+                                                        size_t *cchCorrect,
+                                                        bool *pfOutputting)
+{
+#define IS_PLACEHOLDER_MATCH(a_szMatch) \
+        (   cchPlaceholder == sizeof("@@VBOX_GUEST_OS_COND_" a_szMatch "@@") - 1U \
+         && memcmp(pachPlaceholder, "@@VBOX_GUEST_OS_COND_" a_szMatch "@@", sizeof("@@VBOX_GUEST_OS_COND_" a_szMatch "@@") - 1U) == 0)
+
+    if ( IS_PLACEHOLDER_MATCH("VERSION") )
+    {
+        Utf8Str strT(pachPlaceholder + cchPlaceholder, cchContent);
+        RTCList<RTCString> partList = strT.split("**");
+        Utf8Str strRequiredOSVersion;
+        if (partList.size() == 2)//when the version is placed together with the placeholder in one line in the file
+        {
+            //The case when the string has been splitted on the 2 parts:
+            //1. OS version
+            //2. Actual content
+            strRequiredOSVersion.assign(partList.at(0));
+            //cchCorrect = "**" + length of OS version string + "**"
+            *cchCorrect = 2 + partList.at(0).length() + 2;// must be subtracted from the cchContent
+        }
+        else if (partList.size() == 3)//when the version is placed on a standalone line in the file
+        {
+            //The case when the string has been splitted on the 3 parts:
+            //1. Empty string or string with only "\n"
+            //2. OS version
+            //3. Actual content
+            strRequiredOSVersion.assign(partList.at(1));
+            *cchCorrect = 2 + partList.at(0).length() + partList.at(1).length() + 2;// must be subtracted from the cchContent
+        }
+        else//case with wrong string syntax
+        {
+            *cchCorrect = 0;
+            *pfOutputting = false;
+            LogRel(("Malformed content of the template @@VBOX_GUEST_OS_COND_VERSION@@\n"));
+            return S_OK;
+        }
+
+        if (strRequiredOSVersion.isEmpty())
+            *pfOutputting = false;
+        else
+        {
+            Utf8Str strDetectedOSVersion = mpUnattended->i_getDetectedOSVersion();
+            RTCList<RTCString> partListRequired = strRequiredOSVersion.split(".");
+            RTCList<RTCString> partListDetected = strDetectedOSVersion.split(".");
+            *pfOutputting = false;//initially is set to "false"
+
+            /** @todo r=vvp: Should we check the string with a requested OS version for digits?
+             *        (with RTLocCIsDigit()) */
+            //Major version must be presented
+            if ( partListDetected.at(0).toUInt32() >= partListRequired.at(0).toUInt32() )//comparison major versions
+            {
+                //OS major versions are equal or detected guest OS major version is greater. Go further.
+                if (partListDetected.size() > 1 && partListRequired.size() > 1)//comparison minor versions
+                {
+                    if (partListDetected.at(1).toUInt32() >= partListRequired.at(1).toUInt32())
+                        //OS minor versions are equal or detected guest OS minor version is greater. Go further.
+                        *pfOutputting = true;
+                    else
+                        //The detected guest OS minor version is less than the requested one.
+                        *pfOutputting = false;
+                }
+                else
+                    //OS minor versions are absent.
+                    *pfOutputting = true;
+            }
+            else
+                //The detected guest OS major version is less than the requested one.
+                *pfOutputting = false;
+        }
+    }
+    else
+        return mpSetError->setErrorBoth(E_FAIL, VERR_NOT_FOUND, mpSetError->tr("Unknown conditional placeholder '%.*s'"),
+                                        cchPlaceholder, pachPlaceholder);
+    return S_OK;
+#undef IS_PLACEHOLDER_MATCH
+}
+
 HRESULT UnattendedScriptTemplate::getConditional(const char *pachPlaceholder, size_t cchPlaceholder, bool *pfOutputting)
 {
@@ -448,7 +585,4 @@
         (   cchPlaceholder == sizeof("@@VBOX_COND_" a_szMatch "@@") - 1U \
          && memcmp(pachPlaceholder, "@@VBOX_COND_" a_szMatch "@@", sizeof("@@VBOX_COND_" a_szMatch "@@") - 1U) == 0)
-
-#define IS_PLACEHOLDER_PARTIALLY_MATCH(a_szMatch) \
-        (memcmp(pachPlaceholder, "@@VBOX_COND_" a_szMatch, sizeof("@@VBOX_COND_" a_szMatch) - 1U) == 0)
 
     /* Install Guest Additions: */
@@ -489,36 +623,4 @@
     else if (IS_PLACEHOLDER_MATCH("HAS_PROXY"))
         *pfOutputting = mpUnattended->i_getProxy().isNotEmpty();
-    else if (IS_PLACEHOLDER_PARTIALLY_MATCH("GUEST_VERSION"))
-    {
-        //parse the placeholder and extract the OS version from there
-        RTCString strPlaceHolder(pachPlaceholder);
-        size_t startPos = sizeof("@@VBOX_COND_GUEST_VERSION") - 1;//-1 is for '\n'
-        size_t endPos = strPlaceHolder.find("@@", startPos + 2);
-        //next part should look like [>8.0.0] for example where:
-        // - "[,]" is just the brackets to wrap up the condition;
-        // - ">" is "greater". Also possible comparison is "<";
-        // - 8.0.0 is required guest OS version.
-        //The end of placeholder is "@@" like for others.
-
-        if ( strPlaceHolder[endPos] == '@'
-             && strPlaceHolder[endPos+1] == '@' )
-        {
-            if ( strPlaceHolder[startPos++] == '[' && strPlaceHolder[--endPos] == ']' )
-            {
-                char chComp = strPlaceHolder[startPos++];
-                RTCString strRequiredOSVersion = strPlaceHolder.substr(startPos, endPos - startPos);
-                RTCString strDetectedOSVersion = mpUnattended->i_getDetectedOSVersion();
-                int res = RTStrVersionCompare(strDetectedOSVersion.c_str(), strRequiredOSVersion.c_str());
-                if ( res >= 0 && chComp == '>' )
-                        *pfOutputting = true;
-                else if ( res < 0 && chComp == '<' )
-                        *pfOutputting = true;
-                else
-                    *pfOutputting = false;
-            }
-        }
-        else
-            *pfOutputting = false;//initially is set to "false"
-    }
     else
         return mpSetError->setErrorBoth(E_FAIL, VERR_NOT_FOUND, mpSetError->tr("Unknown conditional placeholder '%.*s'"),
Index: /trunk/src/VBox/Runtime/common/crypto/key-file.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/crypto/key-file.cpp	(revision 86649)
+++ /trunk/src/VBox/Runtime/common/crypto/key-file.cpp	(revision 86650)
@@ -106,5 +106,4 @@
     { g_aWords_PublicKey,     RT_ELEMENTS(g_aWords_PublicKey) },
     { g_aWords_RsaPrivateKey, RT_ELEMENTS(g_aWords_RsaPrivateKey) },
-    { g_aWords_EncryptedPrivateKey, RT_ELEMENTS(g_aWords_EncryptedPrivateKey) },
     { g_aWords_PrivateKey,    RT_ELEMENTS(g_aWords_PrivateKey) },
 };
Index: /trunk/src/VBox/Runtime/generic/http-curl.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/http-curl.cpp	(revision 86649)
+++ /trunk/src/VBox/Runtime/generic/http-curl.cpp	(revision 86650)
@@ -404,11 +404,5 @@
 
                 *phHttp = (RTHTTP)pThis;
-#if 0 // XXX: uwe
-		{
-		const char *verbose = getenv("CURL_VERBOSE");
-		if (verbose != NULL && *verbose != '0')
-		  curl_easy_setopt(pThis->pCurl, CURLOPT_VERBOSE, 1L);
-		}
-#endif
+
                 return VINF_SUCCESS;
             }
@@ -446,11 +440,7 @@
     pThis->rcOutput                 = VINF_SUCCESS;
 
-#if 0 // XXX: uwe
-    {
-    const char *verbose = getenv("CURL_VERBOSE");
-    if (verbose != NULL && *verbose != '0')
-      curl_easy_setopt(pThis->pCurl, CURLOPT_VERBOSE, 1L);
-    }
-#endif
+    /* Tell the proxy configuration code to reapply settings even if they
+       didn't change as cURL has forgotten them: */
+    pThis->fReapplyProxyInfo        = true;
 
     return VINF_SUCCESS;
@@ -2646,7 +2636,4 @@
                 pThis->fDeleteCaFile = true;
                 pThis->pszCaFile = pszCaFile;
-
-//              RTPrintf("pszCaFile=\"%s\"\n", pszCaFile); // XXX: uwe
-
                 return VINF_SUCCESS;
             }
Index: /trunk/src/VBox/ValidationKit/tests/api/tdAppliance1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/api/tdAppliance1.py	(revision 86649)
+++ /trunk/src/VBox/ValidationKit/tests/api/tdAppliance1.py	(revision 86650)
@@ -61,7 +61,4 @@
         """
         fRc = True;
-
-        if not self.oTstDrv.importVBoxApi():
-            return False
 
         # Import a set of simple OVAs.
Index: /trunk/src/VBox/ValidationKit/tests/api/tdMoveVm1.py
===================================================================
--- /trunk/src/VBox/ValidationKit/tests/api/tdMoveVm1.py	(revision 86649)
+++ /trunk/src/VBox/ValidationKit/tests/api/tdMoveVm1.py	(revision 86650)
@@ -145,4 +145,8 @@
         fRc = True
         try:
+
+            ## @todo r=bird: Too much unncessary crap inside try clause.  Only oVM.moveTo needs to be here.
+            ##               Though, you could make an argument for oVM.name too, perhaps.
+
             # move machine
             reporter.log('Moving machine "%s" to the "%s"' % (oVM.name, sLocation))
@@ -232,5 +236,5 @@
 
                 reporter.log('####### Reference locations: #######')
-                for eachItem in aReferences:
+                for eachItem in aActuals:
                     reporter.log(' "%s"' % (eachItem))
 
Index: /trunk/src/libs/curl-7.64.0/lib/sendf.c
===================================================================
--- /trunk/src/libs/curl-7.64.0/lib/sendf.c	(revision 86649)
+++ /trunk/src/libs/curl-7.64.0/lib/sendf.c	(revision 86650)
@@ -828,6 +828,4 @@
     case CURLINFO_HEADER_OUT:
     case CURLINFO_HEADER_IN:
-    case CURLINFO_DATA_IN:      /* XXX: uwe */
-    case CURLINFO_DATA_OUT:     /* XXX: uwe */
       fwrite(s_infotype[type], 2, 1, data->set.err);
       fwrite(ptr, size, 1, data->set.err);
Index: /trunk/src/libs/xpcom18a4/python/Makefile.kmk
===================================================================
--- /trunk/src/libs/xpcom18a4/python/Makefile.kmk	(revision 86649)
+++ /trunk/src/libs/xpcom18a4/python/Makefile.kmk	(revision 86650)
@@ -206,9 +206,5 @@
 # Unversioned Python 2.x.
 #
-# Note! No python LIBS here as we don't want to depend on any specific python
-#       version in a generic extension module.
-#
- if (defined(VBOX_PYTHON27_INC) || defined(VBOX_PYTHON26_INC)) && "$(KBUILD_TARGET)" != "darwin"
-
+ if defined(VBOX_PYTHON27_INC) || defined(VBOX_PYTHON26_INC)
 DLLS += VBoxPython2
 VBoxPython2_EXTENDS    = VBoxPythonBase
@@ -222,26 +218,37 @@
   if defined(VBOX_PYTHON26_INC)
 VBoxPython2_INCS       = $(VBOX_PYTHON26_INC)
+   ifn1of ($(KBUILD_TARGET), linux)
+VBoxPython2_LIBS       = $(VBOX_PYTHON26_LIB)
+   endif
   else
 VBoxPython2_INCS       = $(VBOX_PYTHON27_INC)
-  endif
-
-  if defined(VBOX_WITH_32_ON_64_MAIN_API) && (defined(VBOX_PYTHON26LIB_X86) || defined(VBOX_PYTHON27LIB_X86))
+   ifn1of ($(KBUILD_TARGET), linux)
+VBoxPython2_LIBS       = $(VBOX_PYTHON27_LIB)
+   endif
+  endif
+ endif
+
+ if defined(VBOX_WITH_32_ON_64_MAIN_API) && (defined(VBOX_PYTHON27_LIB_X86) || defined(VBOX_PYTHON26_INC_X86))
 DLLS += VBoxPython2_x86
 VBoxPython2_x86_EXTENDS    = VBoxPythonBase_x86
 VBoxPython2_x86_EXTENDS_BY = appending
-VBoxPython2_x86_DEFS       = VBOX_PYXPCOM_MAJOR_VERSIONED
-   ifdef KMK_WITH_VERSION_COMPARE
+VBoxPython2_x86_DEFS       = VBOX_PYXPCOM_MAJOR_VERSIONED $(VBoxPythonBase_x86_DEFS)
+  ifdef KMK_WITH_VERSION_COMPARE
 VBoxPython2_x86_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.7",OSX107,-x86)
-   else
+  else
 VBoxPython2_x86_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7" && "$(length-var VBOX_DEF_MACOSX_VERSION_MIN)" == "4",OSX107,-x86)
+  endif
+  if defined(VBOX_PYTHON26LIB_X86)
+VBoxPython2_x86_INCS       = $(VBOX_PYTHON26_INC)
+   ifn1of ($(KBUILD_TARGET), linux)
+VBoxPython2_x86_LIBS       = $(VBOX_PYTHON26_LIB_X86)
    endif
-   if defined(VBOX_PYTHON26LIB_X86)
-VBoxPython2_x86_INCS       = $(VBOX_PYTHON26_INC)
-   else
+  else
 VBoxPython2_x86_INCS       = $(VBOX_PYTHON27_INC)
+   ifn1of ($(KBUILD_TARGET), linux)
+VBoxPython2_x86_LIBS       = $(VBOX_PYTHON27_LIB_X86)
    endif
   endif
-
- endif # (defined(VBOX_PYTHON27_INC) || defined(VBOX_PYTHON26_INC)) && "$(KBUILD_TARGET)" != "darwin"
+ endif
 
 
