Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp	(revision 108567)
@@ -36,4 +36,5 @@
 #include "UIFilePathSelector.h"
 #include "UIHostnameDomainNameEditor.h"
+#include "UIMediumSizeEditor.h"
 #include "UIMediumTools.h"
 #include "UITranslationEventListener.h"
@@ -323,9 +324,11 @@
 *********************************************************************************************************************************/
 
-UINewVMHardwareContainer::UINewVMHardwareContainer(QWidget *pParent /* = 0 */)
+UINewVMHardwareContainer::UINewVMHardwareContainer(QWidget *pParent, bool fWithMediumSizeEditor)
     : QWidget(pParent)
     , m_pBaseMemoryEditor(0)
     , m_pVirtualCPUEditor(0)
     , m_pEFICheckBox(0)
+    , m_pMediumSizeEditor(0)
+    , m_fWithMediumSizeEditor(fWithMediumSizeEditor)
 {
     prepare();
@@ -350,4 +353,10 @@
 }
 
+void UINewVMHardwareContainer::setMediumSize(qulonglong uSize)
+{
+    if (m_pMediumSizeEditor)
+        m_pMediumSizeEditor->setMediumSize(uSize);
+}
+
 void UINewVMHardwareContainer::prepare()
 {
@@ -357,8 +366,16 @@
     m_pBaseMemoryEditor = new UIBaseMemoryEditor;
     m_pVirtualCPUEditor = new UIVirtualCPUEditor;
+    if (m_fWithMediumSizeEditor)
+        m_pMediumSizeEditor = new UIMediumSizeEditor;
     m_pEFICheckBox      = new QCheckBox;
     pHardwareLayout->addWidget(m_pBaseMemoryEditor, 0, 0, 1, 4);
     pHardwareLayout->addWidget(m_pVirtualCPUEditor, 1, 0, 1, 4);
-    pHardwareLayout->addWidget(m_pEFICheckBox, 2, 0, 1, 1);
+    if (m_pMediumSizeEditor)
+    {
+        pHardwareLayout->addWidget(m_pMediumSizeEditor, 2, 0, 1, 4);
+        pHardwareLayout->addWidget(m_pEFICheckBox, 3, 0, 1, 1);
+    }
+    else
+        pHardwareLayout->addWidget(m_pEFICheckBox, 2, 0, 1, 1);
 
 
@@ -372,4 +389,7 @@
         connect(m_pEFICheckBox, &QCheckBox::toggled,
                 this, &UINewVMHardwareContainer::sigEFIEnabledChanged);
+    if (m_pMediumSizeEditor)
+        connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged,
+                this, &UINewVMHardwareContainer::sigSizeChanged);
 
     sltRetranslateUI();
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h	(revision 108567)
@@ -45,4 +45,5 @@
 class UIHostnameDomainNameEditor;
 class UIPasswordLineEdit;
+class UIMediumSizeEditor;
 class UIUserNamePasswordEditor;
 class UIVirtualCPUEditor;
@@ -166,14 +167,16 @@
     void sigCPUCountChanged(int iCount);
     void sigEFIEnabledChanged(bool fEnabled);
-
-public:
-
-    UINewVMHardwareContainer(QWidget *pParent = 0);
-
-    /** @name Wrappers for UIFilePathSelector
+    void sigSizeChanged(qulonglong uSize);
+
+public:
+
+    UINewVMHardwareContainer(QWidget *pParent, bool fWithMediumSizeEditor);
+
+    /** @name Wrappers for members
       * @{ */
         void setMemorySize(int iSize);
         void setCPUCount(int iCount);
         void setEFIEnabled(bool fEnabled);
+        void setMediumSize(qulonglong uSize);
     /** @} */
 
@@ -192,4 +195,6 @@
     UIVirtualCPUEditor *m_pVirtualCPUEditor;
     QCheckBox *m_pEFICheckBox;
+    UIMediumSizeEditor *m_pMediumSizeEditor;
+    bool m_fWithMediumSizeEditor;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 108567)
@@ -114,5 +114,4 @@
             setUnattendedPageVisible(false);
             addPage(new UIWizardNewVMHardwarePage("create-vm-wizard-hardware" /* help keyword*/));
-            addPage(new UIWizardNewVMDiskPage(m_pActionPool, "create-vm-wizard-virtual-hard-disk" /* help keyword*/));
             addPage(new UIWizardNewVMSummaryPage);
             break;
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp	(revision 108567)
@@ -201,9 +201,5 @@
     }
 
-    /* Initialize medium variant parameter of the wizard (only if user has not touched the checkbox yet): */
-    if (!m_userModifiedParameters.contains("MediumVariant"))
-    {
-        pWizard->setMediumVariant((qulonglong)KMediumVariant_Standard);
-    }
+    pWizard->setMediumVariant((qulonglong)KMediumVariant_Standard);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp	(revision 108567)
@@ -81,5 +81,5 @@
         m_pToolBox->insertPage(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(), "");
         m_pToolBox->insertPage(ExpertToolboxItems_Unattended, createUnattendedWidgets(), "");
-        m_pHardwareWidgetContainer = new UINewVMHardwareContainer;
+        m_pHardwareWidgetContainer = new UINewVMHardwareContainer(this, false /* without medium size editor */);
         m_pToolBox->insertPage(ExpertToolboxItems_Hardware, m_pHardwareWidgetContainer, "");
         m_pToolBox->insertPage(ExpertToolboxItems_Disk, createDiskWidgets(), "");
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp	(revision 108567)
@@ -32,4 +32,5 @@
 #include "QIRichTextLabel.h"
 #include "UIBaseMemoryEditor.h"
+#include "UIWizardDiskEditors.h"
 #include "UIGlobalSession.h"
 #include "UIGuestOSType.h"
@@ -39,4 +40,6 @@
 #include "UIWizardNewVMHardwarePage.h"
 
+/* COM includes: */
+#include "CSystemProperties.h"
 
 UIWizardNewVMHardwarePage::UIWizardNewVMHardwarePage(const QString strHelpKeyword /* = QString() */)
@@ -44,4 +47,7 @@
     , m_pLabel(0)
     , m_pHardwareWidgetContainer(0)
+    , m_fVDIFormatFound(false)
+    , m_uMediumSizeMin(_4M)
+    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
 {
     prepare();
@@ -55,5 +61,5 @@
     m_pLabel = new QIRichTextLabel(this);
     pMainLayout->addWidget(m_pLabel);
-    m_pHardwareWidgetContainer = new UINewVMHardwareContainer;
+    m_pHardwareWidgetContainer = new UINewVMHardwareContainer(this, true /* with medium size editor */);
     AssertReturnVoid(m_pHardwareWidgetContainer);
     pMainLayout->addWidget(m_pHardwareWidgetContainer);
@@ -73,4 +79,6 @@
         connect(m_pHardwareWidgetContainer, &UINewVMHardwareContainer::sigEFIEnabledChanged,
                 this, &UIWizardNewVMHardwarePage::sltEFIEnabledChanged);
+        connect(m_pHardwareWidgetContainer, &UINewVMHardwareContainer::sigSizeChanged,
+                this, &UIWizardNewVMHardwarePage::sltHandleSizeEditorChange);
     }
 }
@@ -114,9 +122,76 @@
         m_pHardwareWidgetContainer->blockSignals(false);
     }
+    initializeVirtualHardDiskParameters();
+}
+
+void UIWizardNewVMHardwarePage::initializeVirtualHardDiskParameters()
+{
+    UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();
+    AssertReturnVoid(pWizard);
+
+    LONG64 iRecommendedSize = 0;
+
+    if (!m_userModifiedParameters.contains("SelectedDiskSource"))
+    {
+        iRecommendedSize = gpGlobalSession->guestOSTypeManager().getRecommendedHDD(pWizard->guestOSTypeId());
+        if (iRecommendedSize != 0)
+        {
+            pWizard->setDiskSource(SelectedDiskSource_New);
+            pWizard->setEmptyDiskRecommended(false);
+        }
+        else
+        {
+            pWizard->setDiskSource(SelectedDiskSource_Empty);
+            pWizard->setEmptyDiskRecommended(true);
+        }
+    }
+
+    if (!m_fVDIFormatFound)
+    {
+        /* We do not have any UI elements for HDD format selection since we default to VDI in case of guided wizard mode: */
+        CSystemProperties properties = gpGlobalSession->virtualBox().GetSystemProperties();
+        const QVector<CMediumFormat> &formats = properties.GetMediumFormats();
+        foreach (const CMediumFormat &format, formats)
+        {
+            if (format.GetName() == "VDI")
+            {
+                pWizard->setMediumFormat(format);
+                m_fVDIFormatFound = true;
+            }
+        }
+        if (!m_fVDIFormatFound)
+            AssertMsgFailed(("No medium format corresponding to VDI could be found!"));
+    }
+    QString strDefaultExtension =  UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk);
+
+    /* We set the medium name and path according to machine name/path and do not allow user change these in the guided mode: */
+    QString strDefaultName = pWizard->machineFileName().isEmpty() ? QString("NewVirtualDisk1") : pWizard->machineFileName();
+    const QString &strMachineFolder = pWizard->machineFolder();
+    QString strMediumPath =
+        UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDefaultName,
+                                                                                          strDefaultExtension), strMachineFolder);
+    pWizard->setMediumPath(strMediumPath);
+
+    /* Set the recommended disk size if user has already not done so: */
+    if (m_pHardwareWidgetContainer && !m_userModifiedParameters.contains("MediumSize"))
+    {
+        m_pHardwareWidgetContainer->blockSignals(true);
+        m_pHardwareWidgetContainer->setMediumSize(iRecommendedSize);
+        m_pHardwareWidgetContainer->blockSignals(false);
+        pWizard->setMediumSize(iRecommendedSize);
+    }
+
+    pWizard->setMediumVariant((qulonglong)KMediumVariant_Standard);
 }
 
 bool UIWizardNewVMHardwarePage::isComplete() const
 {
-    return true;
+   UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();
+   AssertReturn(pWizard, false);
+
+   const qulonglong uSize = pWizard->mediumSize();
+   if (pWizard->diskSource() == SelectedDiskSource_New)
+       return uSize >= m_uMediumSizeMin && uSize <= m_uMediumSizeMax;
+   return true;
 }
 
@@ -141,2 +216,10 @@
     m_userModifiedParameters << "EFIEnabled";
 }
+
+void UIWizardNewVMHardwarePage::sltHandleSizeEditorChange(qulonglong uSize)
+{
+    AssertReturnVoid(wizardWindow<UIWizardNewVM>());
+    wizardWindow<UIWizardNewVM>()->setMediumSize(uSize);
+    m_userModifiedParameters << "MediumSize";
+    emit completeChanged();
+}
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.h	(revision 108566)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.h	(revision 108567)
@@ -55,4 +55,5 @@
     void sltCPUCountChanged(int iCount);
     void sltEFIEnabledChanged(bool fEnabled);
+    void sltHandleSizeEditorChange(qulonglong uSize);
     virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
 
@@ -64,5 +65,5 @@
     virtual void initializePage() RT_OVERRIDE RT_FINAL;
     virtual bool isComplete() const RT_OVERRIDE RT_FINAL;
-
+    void initializeVirtualHardDiskParameters();
     /** @name Widgets
       * @{ */
@@ -70,4 +71,7 @@
         UINewVMHardwareContainer *m_pHardwareWidgetContainer;
     /** @} */
+    bool m_fVDIFormatFound;
+    qulonglong m_uMediumSizeMin;
+    qulonglong m_uMediumSizeMax;
     /** This set is used to decide if we have to set wizard's parameters
       * some default values or not. When user modifies a value through a widget we
