Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 85907)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 85908)
@@ -3516,5 +3516,6 @@
 
     if (    (pAttachTemp = i_findAttachment(*mMediumAttachments.data(), medium))
-         && !medium.isNull()
+         && !medium.isNull() && medium->i_getType() != MediumType_Readonly
+         &&  medium->i_getDeviceType() != DeviceType_DVD
        )
         return setError(VBOX_E_OBJECT_IN_USE,
Index: /trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 85907)
+++ /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 85908)
@@ -4296,4 +4296,9 @@
     }
 
+    // if the caller has not supplied a snapshot ID, then we're attaching
+    // to a machine a medium which represents the machine's current state,
+    // so set the flag
+
+    if (aSnapshotId.isZero())
     {
         // Allow MediumType_Readonly mediums and DVD in particular to be attached twice.
@@ -4305,12 +4310,5 @@
             return S_OK;
         }
-    }
-
-    // if the caller has not supplied a snapshot ID, then we're attaching
-    // to a machine a medium which represents the machine's current state,
-    // so set the flag
-
-    if (aSnapshotId.isZero())
-    {
+
         /* sanity: no duplicate attachments */
         if (it->fInCurState)
@@ -4327,5 +4325,5 @@
     // otherwise: a snapshot medium is being attached
 
-    /* sanity: no duplicate attachments */
+    /* sanity: no duplicate attachments except MediumType_Readonly (DVD) */
     for (GuidList::const_iterator jt = it->llSnapshotIds.begin();
          jt != it->llSnapshotIds.end();
@@ -4334,5 +4332,8 @@
         const Guid &idOldSnapshot = *jt;
 
-        if (idOldSnapshot == aSnapshotId)
+        if (   idOldSnapshot == aSnapshotId
+            && m->type != MediumType_Readonly
+            && m->devType != DeviceType_DVD
+           )
         {
 #ifdef DEBUG
