Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 35081)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 35082)
@@ -3396,4 +3396,31 @@
                         medium->getLocationFull().c_str());
 
+    if (!medium.isNull())
+    {
+        MediumType_T mtype = medium->getType();
+        if (    mtype == MediumType_MultiAttach
+             || mtype == MediumType_Readonly
+           )
+        {
+            // These two types are new with VirtualBox 4.0 and therefore require settings
+            // version 1.11 in the settings backend. Unfortunately it is not enough to do
+            // the usual routine in MachineConfigFile::bumpSettingsVersionIfNeeded() for
+            // two reasons: The medium type is a property of the media registry tree, which
+            // can reside in the global config file (for pre-4.0 media); we would therefore
+            // possibly need to bump the global config version. We don't want to do that though
+            // because that might make downgrading to pre-4.0 impossible.
+            // As a result, we can only use these two new types if the medium is NOT in the
+            // global registry:
+            const Guid &uuidGlobalRegistry = mParent->getGlobalRegistryId();
+            if (    medium->isInRegistry(uuidGlobalRegistry)
+                 || !mData->pMachineConfigFile->canHaveOwnMediaRegistry()
+               )
+                return setError(VBOX_E_INVALID_OBJECT_STATE,
+                                tr("Cannot attach medium '%s': the media types 'MultiAttach' and 'Readonly' can only be attached "
+                                   "to machines that were created with VirtualBox 4.0 or later"),
+                                medium->getLocationFull().c_str());
+        }
+    }
+
     bool fIndirect = false;
     if (!medium.isNull())
Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 35081)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 35082)
@@ -1701,4 +1701,25 @@
         default:
             AssertFailedReturn(E_FAIL);
+    }
+
+    if (    aType == MediumType_MultiAttach
+         || aType == MediumType_Readonly
+       )
+    {
+        // These two types are new with VirtualBox 4.0 and therefore require settings
+        // version 1.11 in the settings backend. Unfortunately it is not enough to do
+        // the usual routine in MachineConfigFile::bumpSettingsVersionIfNeeded() for
+        // two reasons: The medium type is a property of the media registry tree, which
+        // can reside in the global config file (for pre-4.0 media); we would therefore
+        // possibly need to bump the global config version. We don't want to do that though
+        // because that might make downgrading to pre-4.0 impossible.
+        // As a result, we can only use these two new types if the medium is NOT in the
+        // global registry:
+        const Guid &uuidGlobalRegistry = m->pVirtualBox->getGlobalRegistryId();
+        if (isInRegistry(uuidGlobalRegistry))
+            return setError(VBOX_E_INVALID_OBJECT_STATE,
+                            tr("Cannot change type for medium '%s': the media types 'MultiAttach' and 'Readonly' can only be used "
+                               "on media registered with a machine that was created with VirtualBox 4.0 or later"),
+                            m->strLocationFull.c_str());
     }
 
