Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp	(revision 90224)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp	(revision 90225)
@@ -37,4 +37,5 @@
 #include "UIWizardDiskEditors.h"
 #include "UIWizardNewVM.h"
+#include "UIWizardNewVMDiskPageBasic.h"
 
 /* Other VBox includes: */
@@ -168,24 +169,6 @@
         m_formatNames << medFormat.GetName();
         m_pFormatButtonGroup->addButton(pFormatButton, m_formatNames.size() - 1);
-        m_formatExtensions << defaultExtension(medFormat);
-    }
-}
-
-/* static */
-QString UIDiskFormatsGroupBox::defaultExtension(const CMediumFormat &mediumFormatRef)
-{
-    if (!mediumFormatRef.isNull())
-    {
-        /* Load extension / device list: */
-        QVector<QString> fileExtensions;
-        QVector<KDeviceType> deviceTypes;
-        CMediumFormat mediumFormat(mediumFormatRef);
-        mediumFormat.DescribeFileExtensions(fileExtensions, deviceTypes);
-        for (int i = 0; i < fileExtensions.size(); ++i)
-            if (deviceTypes[i] == KDeviceType_HardDisk)
-                return fileExtensions[i].toLower();
-    }
-    AssertMsgFailed(("Extension can't be NULL!\n"));
-    return QString();
+        m_formatExtensions << UIWizardNewVMDiskPage::defaultExtension(medFormat);
+    }
 }
 
@@ -327,8 +310,8 @@
 
 /*********************************************************************************************************************************
-*   UIDiskSizeAndLocationGroupBox implementation.                                                                                *
+*   UIMediumSizeAndPathGroupBox implementation.                                                                                  *
 *********************************************************************************************************************************/
 
-UIDiskSizeAndLocationGroupBox::UIDiskSizeAndLocationGroupBox(QWidget *pParent /* = 0 */)
+UIMediumSizeAndPathGroupBox::UIMediumSizeAndPathGroupBox(QWidget *pParent /* = 0 */)
     : QIWithRetranslateUI<QGroupBox>(pParent)
     , m_pLocationLabel(0)
@@ -341,5 +324,5 @@
 }
 
-void UIDiskSizeAndLocationGroupBox::prepare()
+void UIMediumSizeAndPathGroupBox::prepare()
 {
     QGridLayout *pDiskContainerLayout = new QGridLayout(this);
@@ -374,10 +357,10 @@
     retranslateUi();
 }
-void UIDiskSizeAndLocationGroupBox::retranslateUi()
+void UIMediumSizeAndPathGroupBox::retranslateUi()
 {
     setTitle(tr("Hard Disk File Location and Size"));
 }
 
-QString UIDiskSizeAndLocationGroupBox::location() const
+QString UIMediumSizeAndPathGroupBox::mediumPath() const
 {
     if (m_pLocationEditor)
@@ -386,14 +369,14 @@
 }
 
-void UIDiskSizeAndLocationGroupBox::setLocation(const QString &strLocation)
+void UIMediumSizeAndPathGroupBox::setMediumPath(const QString &strMediumPath)
 {
     if (m_pLocationEditor)
-        m_pLocationEditor->setText(strLocation);
-}
-
-void UIDiskSizeAndLocationGroupBox::updateLocationEditorAfterFormatChange(const CMediumFormat &mediumFormat, const QStringList &formatExtensions)
+        m_pLocationEditor->setText(strMediumPath);
+}
+
+void UIMediumSizeAndPathGroupBox::updateMediumPath(const CMediumFormat &mediumFormat, const QStringList &formatExtensions)
 {
     /* Compose virtual-disk extension: */
-    QString strDefaultExtension = UIDiskFormatsGroupBox::defaultExtension(mediumFormat);
+    QString strDefaultExtension = UIWizardNewVMDiskPage::defaultExtension(mediumFormat);
     /* Update m_pLocationEditor's text if necessary: */
     if (!m_pLocationEditor->text().isEmpty() && !strDefaultExtension.isEmpty())
@@ -412,5 +395,5 @@
 
 /* static */
-QString UIDiskSizeAndLocationGroupBox::stripFormatExtension(const QString &strFileName, const QStringList &formatExtensions)
+QString UIMediumSizeAndPathGroupBox::stripFormatExtension(const QString &strFileName, const QStringList &formatExtensions)
 {
     QString result(strFileName);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h	(revision 90224)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h	(revision 90225)
@@ -62,5 +62,4 @@
     void setMediumFormat(const CMediumFormat &mediumFormat);
     const CMediumFormat &VDIMeiumFormat() const;
-    static QString defaultExtension(const CMediumFormat &mediumFormatRef);
     const QStringList formatExtensions() const;
 
@@ -106,5 +105,5 @@
 
 
-class UIDiskSizeAndLocationGroupBox : public QIWithRetranslateUI<QGroupBox>
+class UIMediumSizeAndPathGroupBox : public QIWithRetranslateUI<QGroupBox>
 {
     Q_OBJECT;
@@ -115,9 +114,9 @@
 public:
 
-    UIDiskSizeAndLocationGroupBox(QWidget *pParent = 0);
+    UIMediumSizeAndPathGroupBox(QWidget *pParent = 0);
 
-    QString location() const;
-    void setLocation(const QString &strLocation);
-    void updateLocationEditorAfterFormatChange(const CMediumFormat &mediumFormat, const QStringList &formatExtensions);
+    QString mediumPath() const;
+    void setMediumPath(const QString &strMediumPath);
+    void updateMediumPath(const CMediumFormat &mediumFormat, const QStringList &formatExtensions);
 
 private:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90224)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90225)
@@ -447,11 +447,11 @@
 {
     UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(this->wizard());
+    AssertReturnVoid(pWizard);
     UIWizardNewVMNameOSTypePage::determineOSType(strPath, pWizard);
-    if (pWizard)
-    {
-        if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
+
+    if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
             UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
-        pWizard->setISOFilePath(strPath);
-    }
+    pWizard->setISOFilePath(strPath);
+
     /* Update the global recent ISO path: */
     QFileInfo fileInfo(strPath);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 90224)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 90225)
@@ -123,5 +123,5 @@
         UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName);
     UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard()));
-    updateVirtualDiskPathFromMachinePathName();
+    updateVirtualMediumPathFromMachinePathName();
     emit completeChanged();
 }
@@ -131,5 +131,5 @@
     Q_UNUSED(strNewPath);
     UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard()));
-    updateVirtualDiskPathFromMachinePathName();
+    updateVirtualMediumPathFromMachinePathName();
 }
 
@@ -147,17 +147,22 @@
 }
 
-void UIWizardNewVMPageExpert::sltISOPathChanged(const QString &strPath)
-{
-    Q_UNUSED(strPath);
-    // determineOSType(strPath);
-    // setTypeByISODetectedOSType(m_strDetectedOSTypeId);
-    // disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
-
-    // /* Update the global recent ISO path: */
-    // QFileInfo fileInfo(strPath);
-    // if (fileInfo.exists() && fileInfo.isReadable())
-    //     uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strPath);
-    // setSkipCheckBoxEnable();
-    // emit completeChanged();
+void UIWizardNewVMPageExpert::sltISOPathChanged(const QString &strISOPath)
+{
+    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
+    AssertReturnVoid(pWizard);
+
+    UIWizardNewVMNameOSTypePage::determineOSType(strISOPath, pWizard);
+
+    if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
+            UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
+    newVMWizardPropertySet(ISOFilePath, strISOPath);
+
+    /* Update the global recent ISO path: */
+    QFileInfo fileInfo(strISOPath);
+    if (fileInfo.exists() && fileInfo.isReadable())
+        uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strISOPath);
+    setSkipCheckBoxEnable();
+    disableEnableUnattendedRelatedWidgets(pWizard->isUnattendedEnabled());
+    emit completeChanged();
 }
 
@@ -168,7 +173,10 @@
 }
 
-void UIWizardNewVMPageExpert::sltOSFamilyTypeChanged()
-{
-    //disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
+void UIWizardNewVMPageExpert::sltOSFamilyTypeChanged(const QString &strGuestOSFamilyType)
+{
+    if (m_pAdditionalOptionsContainer)
+        m_pAdditionalOptionsContainer->disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
+    m_userModifiedParameters << "GuestOSFamilyId";
+    newVMWizardPropertySet(GuestOSFamilyId, strGuestOSFamilyType);
 }
 
@@ -222,10 +230,19 @@
         connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged,
                 this, &UIWizardNewVMPageExpert::sltOsTypeChanged);
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged,
-    //             this, &UIWizardNewVMPageExpert::sltOSFamilyTypeChanged);
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged,
-    //             this, &UIWizardNewVMPageExpert::sltISOPathChanged);
-    }
-
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged,
+                this, &UIWizardNewVMPageExpert::sltOSFamilyTypeChanged);
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged,
+                this, &UIWizardNewVMPageExpert::sltISOPathChanged);
+    }
+
+    if (m_pHardwareWidgetContainer)
+    {
+        connect(m_pHardwareWidgetContainer, &UINewVMHardwareContainer::sigMemorySizeChanged,
+                this, &UIWizardNewVMPageExpert::sltMemorySizeChanged);
+        connect(m_pHardwareWidgetContainer, &UINewVMHardwareContainer::sigCPUCountChanged,
+                this, &UIWizardNewVMPageExpert::sltCPUCountChanged);
+        connect(m_pHardwareWidgetContainer, &UINewVMHardwareContainer::sigEFIEnabledChanged,
+                this, &UIWizardNewVMPageExpert::sltEFIEnabledChanged);
+    }
     // /* Connections for username, password, and hostname: */
     // if (m_pUserNamePasswordGroupBox)
@@ -240,11 +257,4 @@
     //             this, &UIWizardNewVMPageExpert::sltInstallGACheckBoxToggle);
 
-    // if (m_pBaseMemoryEditor)
-    //     connect(m_pBaseMemoryEditor, &UIBaseMemoryEditor::sigValueChanged,
-    //             this, &UIWizardNewVMPageExpert::sltValueModified);
-    // if (m_pEFICheckBox)
-    //     connect(m_pEFICheckBox, &QCheckBox::toggled,
-    //             this, &UIWizardNewVMPageExpert::sltValueModified);
-
     // if (m_pFormatButtonGroup)
     //     connect(m_pFormatButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked),
@@ -291,11 +301,11 @@
 
 
-    // KFirmwareType fwType = type.GetRecommendedFirmware();
-    // if (m_pEFICheckBox && !m_userSetWidgets.contains(m_pEFICheckBox))
-    // {
-    //     m_pEFICheckBox->blockSignals(true);
-    //     m_pEFICheckBox->setChecked(fwType != KFirmwareType_BIOS);
-    //     m_pEFICheckBox->blockSignals(false);
-    // }
+    KFirmwareType fwType = type.GetRecommendedFirmware();
+    if (m_pHardwareWidgetContainer && !m_userModifiedParameters.contains("EFIEnabled"))
+    {
+        m_pHardwareWidgetContainer->blockSignals(true);
+        m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS);
+        m_pHardwareWidgetContainer->blockSignals(false);
+    }
     // LONG64 recommendedDiskSize = type.GetRecommendedHDD();
     // /* Prepare initial disk choice: */
@@ -350,13 +360,13 @@
     }
 
-
+    /* Medium related properties: */
     if (m_pFormatButtonGroup)
         newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat());
-
+    updateVirtualMediumPathFromMachinePathName();
 
     // disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     setOSTypeDependedValues();
     // disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
-    updateVirtualDiskPathFromMachinePathName();
+
 
     // updateWidgetAterMediumFormatChange();
@@ -405,5 +415,5 @@
     QGridLayout *pDiskContainerLayout = new QGridLayout(pNewDiskContainerWidget);
 
-    m_pSizeAndLocationGroup = new UIDiskSizeAndLocationGroupBox;
+    m_pSizeAndLocationGroup = new UIMediumSizeAndPathGroupBox;
     pDiskContainerLayout->addWidget(m_pSizeAndLocationGroup, 0, 0, 2, 2);
     m_pFormatButtonGroup = new UIDiskFormatsGroupBox;
@@ -574,8 +584,7 @@
 bool UIWizardNewVMPageExpert::isProductKeyWidgetEnabled() const
 {
-    // UIWizardNewVM *pWizard = wizardImp();
-    // AssertReturn(pWizard, false);
-    // if (!pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows())
-    //     return false;
+    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
+    if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows())
+        return false;
     return true;
 }
@@ -595,12 +604,4 @@
 }
 
-void UIWizardNewVMPageExpert::sltValueModified()
-{
-    QWidget *pSenderWidget = qobject_cast<QWidget*>(sender());
-    if (!pSenderWidget)
-        return;
-
-}
-
 void UIWizardNewVMPageExpert::sltSkipUnattendedCheckBoxChecked()
 {
@@ -652,16 +653,33 @@
 }
 
-void UIWizardNewVMPageExpert::updateVirtualDiskPathFromMachinePathName()
+void UIWizardNewVMPageExpert::sltMemorySizeChanged(int iValue)
+{
+    newVMWizardPropertySet(MemorySize, iValue);
+    m_userModifiedParameters << "MemorySize";
+}
+
+void UIWizardNewVMPageExpert::sltCPUCountChanged(int iCount)
+{
+    newVMWizardPropertySet(CPUCount, iCount);
+}
+
+void UIWizardNewVMPageExpert::sltEFIEnabledChanged(bool fEnabled)
+{
+    newVMWizardPropertySet(EFIEnabled, fEnabled);
+    m_userModifiedParameters << "EFIEnabled";
+}
+
+void UIWizardNewVMPageExpert::updateVirtualMediumPathFromMachinePathName()
 {
     UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
     AssertReturnVoid(pWizard);
     QString strDiskFileName = pWizard->machineBaseName().isEmpty() ? QString("NewVirtualDisk1") : pWizard->machineBaseName();
-    QString strDiskPath = pWizard->machineFolder();
-    if (strDiskPath.isEmpty())
+    QString strMediumPath = pWizard->machineFolder();
+    if (strMediumPath.isEmpty())
     {
         if (m_pNameAndSystemEditor)
-            strDiskPath = m_pNameAndSystemEditor->path();
+            strMediumPath = m_pNameAndSystemEditor->path();
         else
-            strDiskPath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
+            strMediumPath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     }
     QString strExtension = UIWizardNewVMDiskPage::defaultExtension(pWizard->mediumFormat());
@@ -672,6 +690,6 @@
         QString strMediumPath =
             UIWizardNewVMDiskPage::absoluteFilePath(UIWizardNewVMDiskPage::toFileName(strDiskFileName,
-                                                                                      strExtension), strDiskPath);
-        m_pSizeAndLocationGroup->setLocation(strMediumPath);
+                                                                                      strExtension), strMediumPath);
+        m_pSizeAndLocationGroup->setMediumPath(strMediumPath);
     }
 }
@@ -684,5 +702,5 @@
     AssertReturnVoid(!comMediumFormat.isNull());
     m_pDiskVariantGroupBox->updateMediumVariantWidgetsAfterFormatChange(comMediumFormat);
-    m_pSizeAndLocationGroup->updateLocationEditorAfterFormatChange(comMediumFormat, m_pFormatButtonGroup->formatExtensions());
+    m_pSizeAndLocationGroup->updateMediumPath(comMediumFormat, m_pFormatButtonGroup->formatExtensions());
 }
 
@@ -725,2 +743,13 @@
     return pContainerWidget;
 }
+
+void UIWizardNewVMPageExpert::setSkipCheckBoxEnable()
+{
+    if (!m_pSkipUnattendedCheckBox)
+        return;
+    if (m_pNameAndSystemEditor)
+    {
+        const QString &strPath = m_pNameAndSystemEditor->image();
+        m_pSkipUnattendedCheckBox->setEnabled(!strPath.isNull() && !strPath.isEmpty());
+    }
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h	(revision 90224)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h	(revision 90225)
@@ -42,5 +42,5 @@
 class UIAdditionalUnattendedOptions;
 class UIDiskFormatsGroupBox;
-class UIDiskSizeAndLocationGroupBox;
+class UIMediumSizeAndPathGroupBox;
 class UIDiskVariantGroupBox;
 class UIFilePathSelector;
@@ -77,7 +77,6 @@
     void sltISOPathChanged(const QString &strPath);
     void sltGAISOPathChanged(const QString &strPath);
-    void sltOSFamilyTypeChanged();
+    void sltOSFamilyTypeChanged(const QString &strGuestOSFamilyType);
     void sltInstallGACheckBoxToggle(bool fEnabled);
-    void sltValueModified();
     void sltSkipUnattendedCheckBoxChecked();
     void sltMediumFormatChanged();
@@ -85,4 +84,9 @@
     void sltSelectedDiskSourceChanged();
     void sltSelectLocationButtonClicked();
+
+    void sltMemorySizeChanged(int iValue);
+    void sltCPUCountChanged(int iCount);
+    void sltEFIEnabledChanged(bool fEnabled);
+
 
 private:
@@ -122,8 +126,9 @@
     QWidget *createNameOSTypeWidgets();
 
-    void updateVirtualDiskPathFromMachinePathName();
+    void updateVirtualMediumPathFromMachinePathName();
     void updateWidgetAterMediumFormatChange();
     void setEnableNewDiskWidgets(bool fEnable);
     void setVirtualDiskFromDiskCombo();
+    void setSkipCheckBoxEnable();
 
     /** @name Variables
@@ -132,5 +137,5 @@
         UIDiskVariantGroupBox *m_pDiskVariantGroupBox;
         UIDiskFormatsGroupBox *m_pFormatButtonGroup;
-        UIDiskSizeAndLocationGroupBox *m_pSizeAndLocationGroup;
+        UIMediumSizeAndPathGroupBox *m_pSizeAndLocationGroup;
         UINameAndSystemEditor *m_pNameAndSystemEditor;
         QCheckBox *m_pSkipUnattendedCheckBox;
