Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 27791)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 27792)
@@ -247,5 +247,5 @@
         if (settingsFile.isEmpty())
             CHECK_ERROR_BREAK(a->virtualBox,
-                CreateMachine(name, osTypeId, baseFolder, Guid(id).toUtf16(), machine.asOutParam()));
+                CreateMachine(name, osTypeId, baseFolder, Guid(id).toUtf16(), FALSE, machine.asOutParam()));
         else
             CHECK_ERROR_BREAK(a->virtualBox,
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp	(revision 27791)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp	(revision 27792)
@@ -636,5 +636,5 @@
     if (m_Machine.isNull())
     {
-        m_Machine = vbox.CreateMachine(field("name").toString(), typeId, QString::null, QString::null);
+        m_Machine = vbox.CreateMachine(field("name").toString(), typeId, QString::null, QString::null, false);
         if (!vbox.isOk())
         {
Index: /trunk/src/VBox/Main/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 27791)
+++ /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 27792)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2008-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2008-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -1278,5 +1278,5 @@
             const Utf8Str &strNameVBox = vsdeName.front()->strVbox;
             rc = mVirtualBox->CreateMachine(Bstr(strNameVBox), Bstr(strOsTypeVBox),
-                                                 Bstr(), Bstr(),
+                                                 Bstr(), Bstr(), FALSE,
                                                  pNewMachine.asOutParam());
             if (FAILED(rc)) throw rc;
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 27791)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 27792)
@@ -267,4 +267,6 @@
  *                      (ignored otherwise)
  *  @param aOsType      OS Type of this machine
+ *  @param aOverride    |TRUE| to override VM config file existence checks.
+ *                      |FALSE| refuses to overwrite existing VM configs.
  *  @param aNameSync    |TRUE| to automatically sync settings dir and file
  *                      name with the machine name. |FALSE| is used for legacy
@@ -285,4 +287,5 @@
                       CBSTR aName /* = NULL */,
                       GuestOSType *aOsType /* = NULL */,
+                      BOOL aOverride /* = FALSE */,
                       BOOL aNameSync /* = TRUE */,
                       const Guid *aId /* = NULL */)
@@ -352,7 +355,10 @@
                )
             {
-                rc = setError(VBOX_E_FILE_ERROR,
-                              tr("Machine settings file '%s' already exists"),
-                              mData->m_strConfigFileFull.raw());
+                if (!aOverride)
+                {
+                    rc = setError(VBOX_E_FILE_ERROR,
+                                  tr("Machine settings file '%s' already exists"),
+                                  mData->m_strConfigFileFull.raw());
+                }
                 if (RT_SUCCESS(vrc))
                     RTFileClose(f);
Index: /trunk/src/VBox/Main/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 27791)
+++ /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 27792)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -516,4 +516,5 @@
                                 NULL,
                                 NULL,
+                                FALSE, /* aOverride */
                                 FALSE, /* aNameSync */
                                 &uuid);
@@ -1031,4 +1032,5 @@
                                        IN_BSTR aBaseFolder,
                                        IN_BSTR aId,
+                                       BOOL aOverride,
                                        IMachine **aMachine)
 {
@@ -1084,4 +1086,5 @@
                        aName,
                        osType,
+                       aOverride,
                        TRUE /* aNameSync */,
                        &id);
@@ -1139,4 +1142,5 @@
                        aName,
                        osType,
+                       FALSE /* aOverride */,
                        FALSE /* aNameSync */,
                        &id);
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 27791)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 27792)
@@ -1690,5 +1690,5 @@
   <interface
     name="IVirtualBox" extends="$dispatched"
-    uuid="2158464a-f706-414b-a8c4-fb589dfc6b62"
+    uuid="3f36e024-7fed-4f20-a02c-9158a82b44e6"
     wsmap="managed"
   >
@@ -1919,4 +1919,7 @@
       <param name="id" type="uuid" mod="string" dir="in">
         <desc>Machine UUID (optional).</desc>
+      </param>
+      <param name="override" type="boolean" dir="in">
+        <desc>Create the VM even if there are conflicting files.</desc>
       </param>
       <param name="machine" type="IMachine" dir="return">
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 27791)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 27792)
@@ -355,4 +355,5 @@
                  CBSTR aName = NULL,
                  GuestOSType *aOsType = NULL,
+                 BOOL aOverride = FALSE,
                  BOOL aNameSync = TRUE,
                  const Guid *aId = NULL);
Index: /trunk/src/VBox/Main/include/VirtualBoxImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 27791)
+++ /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 27792)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2006-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -125,5 +125,5 @@
 
     STDMETHOD(CreateMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aBaseFolder,
-                              IN_BSTR aId, IMachine **aMachine);
+                              IN_BSTR aId, BOOL aOverride, IMachine **aMachine);
     STDMETHOD(CreateLegacyMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aSettingsFile,
                                     IN_BSTR aId, IMachine **aMachine);
Index: /trunk/src/VBox/Main/testcase/tstAPI.cpp
===================================================================
--- /trunk/src/VBox/Main/testcase/tstAPI.cpp	(revision 27791)
+++ /trunk/src/VBox/Main/testcase/tstAPI.cpp	(revision 27792)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -742,5 +742,6 @@
         RTPrintf ("Creating a new machine object (base dir '%ls', name '%ls')...\n",
                 baseDir.raw(), name.raw());
-        CHECK_ERROR_BREAK (virtualBox, CreateMachine (baseDir, name,
+        CHECK_ERROR_BREAK (virtualBox, CreateMachine (name, L"", baseDir, L"",
+                                                      false,
                                                       machine.asOutParam()));
 
Index: /trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp
===================================================================
--- /trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp	(revision 27791)
+++ /trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp	(revision 27792)
@@ -8,5 +8,5 @@
 
 /*
- * Copyright (C) 2006-2007 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -195,5 +195,5 @@
     nsCOMPtr <IMachine> machine;
     rc = virtualBox->CreateMachine(NS_LITERAL_STRING("A brand new name").get(),
-                                   nsnull, nsnull, nsnull, getter_AddRefs(machine));
+                                   nsnull, nsnull, nsnull, false, getter_AddRefs(machine));
     if (NS_FAILED(rc))
     {
