Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp	(revision 66662)
@@ -22,4 +22,5 @@
 /* Qt includes: */
 # include <QApplication>
+# include <QFile>
 # include <QStyle>
 # include <QWidget>
@@ -27,4 +28,9 @@
 /* GUI includes: */
 # include "UIIconPool.h"
+# include "UIExtraDataManager.h"
+
+/* COM includes: */
+# include "COMEnums.h"
+# include "CMachine.h"
 
 /* Other VBox includes: */
@@ -355,4 +361,89 @@
 }
 
+QIcon UIIconPoolGeneral::userMachineIcon(const CMachine &comMachine) const
+{
+    /* Get machine ID: */
+    const QString strMachineId = comMachine.GetId();
+    AssertReturn(comMachine.isOk(), QPixmap());
+
+    /* Prepare icon: */
+    QIcon icon;
+
+    /* 1. First, load icon from IMachine extra-data: */
+    if (icon.isNull())
+        foreach (const QString &strIconName, gEDataManager->machineWindowIconNames(strMachineId))
+            if (!strIconName.isEmpty() && QFile::exists(strIconName))
+                icon.addFile(strIconName);
+
+    /* 2. Otherwise, load icon from IMachine interface itself: */
+    if (icon.isNull())
+    {
+        const QVector<BYTE> byteVector = comMachine.GetIcon();
+        AssertReturn(comMachine.isOk(), QPixmap());
+        const QByteArray byteArray = QByteArray::fromRawData(reinterpret_cast<const char*>(byteVector.constData()), byteVector.size());
+        const QImage image = QImage::fromData(byteArray);
+        if (!image.isNull())
+        {
+            QPixmap pixmap = QPixmap::fromImage(image);
+            const int iMinimumLength = qMin(pixmap.width(), pixmap.height());
+            if (pixmap.width() != iMinimumLength || pixmap.height() != iMinimumLength)
+                pixmap = pixmap.scaled(QSize(iMinimumLength, iMinimumLength), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+            icon.addPixmap(pixmap);
+        }
+    }
+
+    /* Return icon: */
+    return icon;
+}
+
+QPixmap UIIconPoolGeneral::userMachinePixmap(const CMachine &comMachine, const QSize &size) const
+{
+    /* Acquire icon: */
+    const QIcon icon = userMachineIcon(comMachine);
+
+    /* Prepare pixmap: */
+    QPixmap pixmap;
+
+    /* Check whether we have valid icon: */
+    if (!icon.isNull())
+    {
+        /* Get pixmap of requested size: */
+        pixmap = icon.pixmap(size);
+        /* And even scale it if size is not valid: */
+        if (pixmap.size() != size)
+            pixmap = pixmap.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+    }
+
+    /* Return pixmap: */
+    return pixmap;
+}
+
+QPixmap UIIconPoolGeneral::userMachinePixmapDefault(const CMachine &comMachine, QSize *pLogicalSize /* = 0 */) const
+{
+    /* Acquire icon: */
+    const QIcon icon = userMachineIcon(comMachine);
+
+    /* Prepare pixmap: */
+    QPixmap pixmap;
+
+    /* Check whether we have valid icon: */
+    if (!icon.isNull())
+    {
+        /* Determine desired icon size: */
+        const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
+        const QSize iconSize = QSize(iIconMetric, iIconMetric);
+
+        /* Pass up logical size if necessary: */
+        if (pLogicalSize)
+            *pLogicalSize = iconSize;
+
+        /* Get pixmap of requested size: */
+        pixmap = icon.pixmap(iconSize);
+    }
+
+    /* Return pixmap: */
+    return pixmap;
+}
+
 QIcon UIIconPoolGeneral::guestOSTypeIcon(const QString &strOSTypeID) const
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h	(revision 66662)
@@ -23,4 +23,7 @@
 #include <QPixmap>
 #include <QHash>
+
+/* Forward declarations: */
+class CMachine;
 
 
@@ -104,4 +107,12 @@
     UIIconPoolGeneral();
 
+    /** Returns icon defined for a passed @a comMachine. */
+    QIcon userMachineIcon(const CMachine &comMachine) const;
+    /** Returns pixmap of a passed @a size defined for a passed @a comMachine. */
+    QPixmap userMachinePixmap(const CMachine &comMachine, const QSize &size) const;
+    /** Returns pixmap defined for a passed @a comMachine.
+      * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */
+    QPixmap userMachinePixmapDefault(const CMachine &comMachine, QSize *pLogicalSize = 0) const;
+
     /** Returns icon corresponding to passed @a strOSTypeID. */
     QIcon guestOSTypeIcon(const QString &strOSTypeID) const;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 66662)
@@ -558,4 +558,40 @@
 }
 
+QIcon VBoxGlobal::vmUserIcon(const CMachine &comMachine) const
+{
+    /* Prepare fallback icon: */
+    static QIcon nullIcon;
+
+    /* Make sure general icon-pool initialized: */
+    AssertReturn(m_pIconPool, nullIcon);
+
+    /* Redirect to general icon-pool: */
+    return m_pIconPool->userMachineIcon(comMachine);
+}
+
+QPixmap VBoxGlobal::vmUserPixmap(const CMachine &comMachine, const QSize &size) const
+{
+    /* Prepare fallback pixmap: */
+    static QPixmap nullPixmap;
+
+    /* Make sure general icon-pool initialized: */
+    AssertReturn(m_pIconPool, nullPixmap);
+
+    /* Redirect to general icon-pool: */
+    return m_pIconPool->userMachinePixmap(comMachine, size);
+}
+
+QPixmap VBoxGlobal::vmUserPixmapDefault(const CMachine &comMachine, QSize *pLogicalSize /* = 0 */) const
+{
+    /* Prepare fallback pixmap: */
+    static QPixmap nullPixmap;
+
+    /* Make sure general icon-pool initialized: */
+    AssertReturn(m_pIconPool, nullPixmap);
+
+    /* Redirect to general icon-pool: */
+    return m_pIconPool->userMachinePixmapDefault(comMachine, pLogicalSize);
+}
+
 QIcon VBoxGlobal::vmGuestOSTypeIcon(const QString &strOSTypeID) const
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 66662)
@@ -221,4 +221,12 @@
     QList <CGuestOSType> vmGuestOSFamilyList() const;
     QList <CGuestOSType> vmGuestOSTypeList (const QString &aFamilyId) const;
+
+    /** Returns icon defined for a passed @a comMachine. */
+    QIcon vmUserIcon(const CMachine &comMachine) const;
+    /** Returns pixmap of a passed @a size defined for a passed @a comMachine. */
+    QPixmap vmUserPixmap(const CMachine &comMachine, const QSize &size) const;
+    /** Returns pixmap defined for a passed @a comMachine.
+      * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */
+    QPixmap vmUserPixmapDefault(const CMachine &comMachine, QSize *pLogicalSize = 0) const;
 
     /** Returns pixmap corresponding to passed @a strOSTypeID. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 66662)
@@ -1277,5 +1277,7 @@
 
     /* Now the dock icon preview: */
-    const QPixmap pixmap = vboxGlobal().vmGuestOSTypePixmap(guest().GetOSTypeId(), QSize(42, 42));
+    QPixmap pixmap = vboxGlobal().vmUserPixmap(machine(), QSize(42, 42));
+    if (pixmap.isNull())
+        pixmap = vboxGlobal().vmGuestOSTypePixmap(guest().GetOSTypeId(), QSize(42, 42));
     m_pDockIconPreview = new UIDockIconPreview(uisession(), pixmap);
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66662)
@@ -1289,9 +1289,6 @@
         /* Prepare machine-window icon: */
         {
-            QIcon icon;
-            /* Load user machine-window icon: */
-            foreach (const QString &strIconName, gEDataManager->machineWindowIconNames(strMachineID))
-                if (!strIconName.isEmpty() && QFile::exists(strIconName))
-                    icon.addFile(strIconName);
+            /* Acquire user machine-window icon: */
+            QIcon icon = vboxGlobal().vmUserIcon(machine());
             /* Use the OS type icon if user one was not set: */
             if (icon.isNull())
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp	(revision 66662)
@@ -903,5 +903,7 @@
 
             // TODO: Assign corresponding icon through sub-dialog API: */
-            const QPixmap pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_comMachine.GetOSTypeId());
+            QPixmap pixmap = vboxGlobal().vmUserPixmapDefault(m_comMachine);
+            if (pixmap.isNull())
+                pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_comMachine.GetOSTypeId());
             pDlg->mLbIcon->setPixmap(pixmap);
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp	(revision 66662)
@@ -237,5 +237,7 @@
         m_cSnaphot = m_machine.GetSnapshotCount();
 
-        m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);
+        m_pixmap = vboxGlobal().vmUserPixmapDefault(m_machine, &m_logicalPixmapSize);
+        if (m_pixmap.isNull())
+            m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);
 
         if (   m_machineState == KMachineState_PoweredOff
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp	(revision 66661)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp	(revision 66662)
@@ -56,5 +56,7 @@
         if (machine.GetAccessible())
         {
-            pixIcon = vboxGlobal().vmGuestOSTypePixmapDefault(machine.GetOSTypeId());
+            pixIcon = vboxGlobal().vmUserPixmapDefault(machine);
+            if (pixIcon.isNull())
+                pixIcon = vboxGlobal().vmGuestOSTypePixmapDefault(machine.GetOSTypeId());
             strName = machine.GetName();
             strUuid = machine.GetId();
