Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 66646)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 66647)
@@ -188,7 +188,7 @@
 
     /* Set redefined machine-window icon if any: */
-    QIcon *pMachineWidnowIcon = uisession()->machineWindowIcon();
-    if (pMachineWidnowIcon)
-        setWindowIcon(*pMachineWidnowIcon);
+    const QIcon *pMachineWindowIcon = uisession()->machineWindowIcon();
+    if (pMachineWindowIcon)
+        setWindowIcon(*pMachineWindowIcon);
     /* Or set default machine-window icon: */
     else
@@ -346,4 +346,8 @@
                                                                   console().GetGuestEnteredACPIMode(),
                                                                   restrictedCloseActions);
+        /* Configure close-dialog: */
+        const QIcon *pMachineWindowIcon = uisession()->machineWindowIcon();
+        if (pMachineWindowIcon)
+            pCloseDlg->setPixmap(pMachineWindowIcon->pixmap(QSize(32, 32)));
 
         /* Make sure close-dialog is valid: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66646)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66647)
@@ -1290,11 +1290,34 @@
 
 #ifndef VBOX_WS_MAC
-        /* Load/prepare user's machine-window icon: */
-        QIcon icon;
-        foreach (const QString &strIconName, gEDataManager->machineWindowIconNames(strMachineID))
-            if (!strIconName.isEmpty() && QFile::exists(strIconName))
-                icon.addFile(strIconName);
-        if (!icon.isNull())
-            m_pMachineWindowIcon = new QIcon(icon);
+        /* Check whether we have overriding machine-window icon: */
+        {
+            /* Prepare null icon: */
+            QIcon icon;
+
+            /* 1. 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. Load icon from IMachine interface: */
+            if (icon.isNull())
+            {
+                const QVector<BYTE> byteVector = machine().GetIcon();
+                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());
+                    pixmap = pixmap.scaled(QSize(iMinimumLength, iMinimumLength), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+                    icon.addPixmap(pixmap);
+                }
+            }
+
+            /* Finally, store the icon dynamically if overriden: */
+            if (!icon.isNull())
+                m_pMachineWindowIcon = new QIcon(icon);
+        }
 
         /* Load user's machine-window name postfix: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 66646)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 66647)
@@ -70,4 +70,14 @@
 }
 
+void UIVMCloseDialog::setPixmap(const QPixmap &pixmap)
+{
+    /* Make sure pixmap is valid: */
+    if (pixmap.isNull())
+        return;
+
+    /* Assign new pixmap: */
+    m_pIcon->setPixmap(pixmap);
+}
+
 void UIVMCloseDialog::sltUpdateWidgetAvailability()
 {
@@ -103,14 +113,4 @@
     /* Hide the dialog: */
     hide();
-}
-
-void UIVMCloseDialog::setPixmap(const QPixmap &pixmap)
-{
-    /* Make sure pixmap is valid: */
-    if (pixmap.isNull())
-        return;
-
-    /* Assign new pixmap: */
-    m_pIcon->setPixmap(pixmap);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 66646)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 66647)
@@ -44,4 +44,7 @@
     bool isValid() const { return m_fValid; }
 
+    /* API: Pixmap stuff: */
+    void setPixmap(const QPixmap &pixmap);
+
 private slots:
 
@@ -53,7 +56,4 @@
 
 private:
-
-    /* API: Pixmap stuff: */
-    void setPixmap(const QPixmap &pixmap);
 
     /* API: Detach-button stuff: */
