Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 33708)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 33709)
@@ -396,4 +396,16 @@
                 mData->pMachineConfigFile = new settings::MachineConfigFile(&mData->m_strConfigFileFull);
 
+                // reject VM UUID duplicates, they can happen if someone
+                // tries to register an already known VM config again
+                if (aParent->findMachine(mData->pMachineConfigFile->uuid,
+                                         true /* fPermitInaccessible */,
+                                         false /* aDoSetError */,
+                                         NULL) != VBOX_E_OBJECT_NOT_FOUND)
+                {
+                    throw setError(E_FAIL,
+                                   tr("Trying to open a VM config '%s' which has the same UUID as an existing virtual machine"),
+                                   mData->m_strConfigFile.c_str());
+                }
+
                 // use UUID from machine config
                 unconst(mData->mUuid) = mData->pMachineConfigFile->uuid;
