Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90039)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90040)
@@ -62,4 +62,6 @@
     , m_iUSBCount(0)
     , m_fInstallGuestAdditions(false)
+    , m_fStartHeadless(false)
+    , m_fSkipUnattendedInstall(false)
 {
 #ifndef VBOX_WS_MAC
@@ -74,35 +76,4 @@
 
     connect(this, &UIWizardNewVM::rejected, this, &UIWizardNewVM::sltHandleWizardCancel);
-}
-
-void UIWizardNewVM::prepare()
-{
-    // enableHelpButton("gui-createvm");
-    // /* Create corresponding pages: */
-    // switch (mode())
-    // {
-    //     case WizardMode_Basic:
-    //     {
-    //         // setPage(Page1, new UIWizardNewVMPageNameOSType(m_strMachineGroup));
-    //         // setPage(Page2, new UIWizardNewVMPageUnattended);
-    //         // setPage(Page3, new UIWizardNewVMPageHardware);
-    //         // setPage(Page4, new UIWizardNewVMPageDisk);
-
-    //         // setStartId(Page1);
-    //         break;
-    //     }
-    //     case WizardMode_Expert:
-    //     {
-    //         setPage(PageExpert, new UIWizardNewVMPageExpert(m_strMachineGroup));
-    //         break;
-    //     }
-    //     default:
-    //     {
-    //         AssertMsgFailed(("Invalid mode: %d", mode()));
-    //         break;
-    //     }
-    // }
-    // /* Call to base-class: */
-    // UIWizard::prepare();
 }
 
@@ -525,24 +496,7 @@
 }
 
-// void UIWizardNewVM::sltHandleDetectedOSTypeChange()
-// {
-//     // UIWizardNewVMPageNameOSType *pPage = qobject_cast<UIWizardNewVMPageNameOSType*>(page(Page1));
-//     // if (!pPage)
-//     //     return;
-//     // pPage->setTypeByISODetectedOSType(getStringFieldValue("detectedOSTypeId"));
-// }
-
-void UIWizardNewVM::sltCustomButtonClicked(int iId)
-{
-    Q_UNUSED(iId);
-    // UIWizard::sltCustomButtonClicked(iId);
-    // setFieldsFromDefaultUnttendedInstallData();
-}
-
 void UIWizardNewVM::retranslateUi()
 {
-    /* Call to base-class: */
     UINativeWizard::retranslateUi();
-
     setWindowTitle(tr("Create Virtual Machine"));
     // setButtonText(QWizard::FinishButton, tr("Create"));
@@ -722,4 +676,24 @@
 {
     m_fInstallGuestAdditions = fInstallGA;
+}
+
+bool UIWizardNewVM::startHeadless() const
+{
+    return m_fStartHeadless;
+}
+
+void UIWizardNewVM::setStartHeadless(bool fStartHeadless)
+{
+    m_fStartHeadless = fStartHeadless;
+}
+
+bool UIWizardNewVM::skipUnattendedInstall() const
+{
+    return m_fSkipUnattendedInstall;
+}
+
+void UIWizardNewVM::setSkipUnattendedInstall(bool fSkipUnattendedInstall)
+{
+    m_fSkipUnattendedInstall = fSkipUnattendedInstall;
 }
 
@@ -799,6 +773,6 @@
     m_unattendedInstallData.m_strGuestAdditionsISOPath = m_strGuestAdditionsISOPath;
 
-    // m_unattendedInstallData.m_fUnattendedEnabled = getBoolFieldValue("isUnattendedEnabled");
-    // m_unattendedInstallData.m_fStartHeadless = getBoolFieldValue("startHeadless");
+    m_unattendedInstallData.m_fUnattendedEnabled = isUnattendedEnabled();
+    m_unattendedInstallData.m_fStartHeadless = m_fStartHeadless;
     m_unattendedInstallData.m_fInstallGuestAdditions = m_fInstallGuestAdditions;
     // m_unattendedInstallData.m_uMachineUid = createdMachineId();
@@ -809,8 +783,8 @@
 bool UIWizardNewVM::isUnattendedEnabled() const
 {
-    // QVariant fieldValue = field("isUnattendedEnabled");
-    // if (fieldValue.isNull() || !fieldValue.isValid() || !fieldValue.canConvert(QMetaType::Bool))
-    //     return false;
-    // return fieldValue.toBool();
+    if (!m_fSkipUnattendedInstall)
+        return false;
+    if (m_strISOFilePath.isEmpty() || m_strISOFilePath.isNull())
+        return false;
     return true;
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90039)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90040)
@@ -71,16 +71,10 @@
 public:
 
-
-    /** Constructor: */
     UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup = QString(), WizardMode enmMode = WizardMode_Auto);
-
-    /** Prepare routine. */
-    void prepare();
-
     /** Returns the Id of newly created VM. */
     QUuid createdMachineId() const;
+    bool isUnattendedEnabled() const;
     void setDefaultUnattendedInstallData(const UIUnattendedInstallData &unattendedInstallData);
     const UIUnattendedInstallData &unattendedInstallData() const;
-    bool isUnattendedEnabled() const;
     bool isGuestOSTypeWindows() const;
     CMedium &virtualDisk();
@@ -111,4 +105,10 @@
     void setInstallGuestAdditions(bool fInstallGA);
 
+    bool startHeadless() const;
+    void setStartHeadless(bool fStartHeadless);
+
+    bool skipUnattendedInstall() const;
+    void setSkipUnattendedInstall(bool fSkipUnattendedInstall);
+
     const QString &ISOFilePath() const;
     void setISOFilePath(const QString &strISOFilePath);
@@ -132,5 +132,5 @@
 
     /** Populates pages. */
-    virtual void populatePages() /* final */;
+    virtual void populatePages() /* final override */;
 
     bool createVM();
@@ -149,9 +149,5 @@
 private:
 
-    /* Translation stuff: */
     void retranslateUi();
-
-
-    /* Helping stuff: */
     QString getNextControllerName(KStorageBus type);
     void setFieldsFromDefaultUnttendedInstallData();
@@ -193,4 +189,6 @@
     /** True if guest additions are to be installed during unattended install. */
     bool m_fInstallGuestAdditions;
+    bool m_fStartHeadless;
+    bool m_fSkipUnattendedInstall;
 
     QString m_strUserName;
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp	(revision 90039)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp	(revision 90040)
@@ -40,12 +40,4 @@
 #include "CUnattended.h"
 
-// QString UIWizardNewVMUnattendedPage::productKey() const
-// {
-//     if (!m_pProductKeyLineEdit || !m_pProductKeyLineEdit->hasAcceptableInput())
-//         return QString();
-//     return m_pProductKeyLineEdit->text();
-// }
-
-
 bool UIWizardNewVMUnattendedPage::checkGAISOFile(UIFilePathSelector *pGAISOFilePathSelector)
 {
@@ -61,14 +53,4 @@
     return true;
 }
-
-
-
-// bool UIWizardNewVMUnattendedPage::startHeadless() const
-// {
-//     if (!m_pStartHeadlessCheckBox)
-//         return false;
-//     return m_pStartHeadlessCheckBox->isChecked();
-// }
-
 
 UIWizardNewVMUnattendedPageBasic::UIWizardNewVMUnattendedPageBasic()
@@ -114,5 +96,4 @@
                 this, &UIWizardNewVMUnattendedPageBasic::sltUserNameChanged);
     }
-
     if (m_pGAISOFilePathSelector)
         connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
@@ -127,5 +108,7 @@
         connect(m_pProductKeyLineEdit, &QLineEdit::textChanged,
                 this, &UIWizardNewVMUnattendedPageBasic::sltProductKeyChanged);
-
+    if (m_pStartHeadlessCheckBox)
+        connect(m_pStartHeadlessCheckBox, &QCheckBox::toggled,
+                this, &UIWizardNewVMUnattendedPageBasic::sltStartHeadlessChanged);
 }
 
@@ -149,5 +132,5 @@
         m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("Gu&est Additions"));
         m_pGAInstallationISOContainer->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed "
-                                                           "after the OS install.</p>"));
+                                                                    "after the OS install.</p>"));
     }
     if (m_pProductKeyLabel)
@@ -239,4 +222,10 @@
     if (m_pWizard)
         m_pWizard->setProductKey(strProductKey);
+}
+
+void UIWizardNewVMUnattendedPageBasic::sltStartHeadlessChanged(bool fStartHeadless)
+{
+    if (m_pWizard)
+        m_pWizard->setStartHeadless(fStartHeadless);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h	(revision 90039)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h	(revision 90040)
@@ -41,30 +41,6 @@
 namespace UIWizardNewVMUnattendedPage
 {
+    /** Returns false if ISO path selector is non empty but has invalid file path. */
     bool checkGAISOFile(UIFilePathSelector *pGAISOFilePathSelector);
-//     UIWizardNewVMUnattendedPage();
-
-//     /** @name Property getters/setters
-//       * @{ */
-//         QString userName() const;
-//         void setUserName(const QString &strName);
-//         QString password() const;
-//         void setPassword(const QString &strPassword);
-//         QString hostname() const;
-//         void setHostname(const QString &strHostName);
-//         QString guestAdditionsISOPath() const;
-//         void setGuestAdditionsISOPath(const QString &strISOPath);
-//         QString productKey() const;
-//     /** @} */
-
-
-//     /** Returns false if ISO path selector is non empty but has invalid file path. */
-//     bool checkGAISOFile() const;
-
-//     void retranslateWidgets();
-
-
-//     bool startHeadless() const;
-
-
 }
 
@@ -91,4 +67,5 @@
     void sltHostnameChanged(const QString &strHostname);
     void sltProductKeyChanged(const QString &strProductKey);
+    void sltStartHeadlessChanged(bool fStartHeadless);
 
 private:
