Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 68047)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 68048)
@@ -810,17 +810,24 @@
             throw ConfigFileError(this, &elmMedium, N_("Required %s/@location attribute is missing"), elmMedium.getName());
 
-    elmMedium.getAttributeValue("Description", med.strDescription);       // optional
-
-    // handle medium properties
-    xml::NodesLoop nl2(elmMedium, "Property");
-    const xml::ElementNode *pelmHDChild;
-    while ((pelmHDChild = nl2.forAllNodes()))
-    {
-        Utf8Str strPropName, strPropValue;
-        if (   pelmHDChild->getAttributeValue("name", strPropName)
-            && pelmHDChild->getAttributeValue("value", strPropValue) )
-            med.properties[strPropName] = strPropValue;
-        else
-            throw ConfigFileError(this, pelmHDChild, N_("Required HardDisk/Property/@name or @value attribute is missing"));
+    // 3.2 builds added Description as an attribute, read it silently
+    // and write it back as an element starting with 5.1.26
+    elmMedium.getAttributeValue("Description", med.strDescription);
+
+    xml::NodesLoop nlMediumChildren(elmMedium);
+    const xml::ElementNode *pelmMediumChild;
+    while ((pelmMediumChild = nlMediumChildren.forAllNodes()))
+    {
+        if (pelmMediumChild->nameEquals("Description"))
+            med.strDescription = pelmMediumChild->getValue();
+        else if (pelmMediumChild->nameEquals("Property"))
+        {
+            // handle medium properties
+            Utf8Str strPropName, strPropValue;
+            if (   pelmMediumChild->getAttributeValue("name", strPropName)
+                && pelmMediumChild->getAttributeValue("value", strPropValue) )
+                med.properties[strPropName] = strPropValue;
+            else
+                throw ConfigFileError(this, pelmMediumChild, N_("Required HardDisk/Property/@name or @value attribute is missing"));
+        }
     }
 }
@@ -1266,5 +1273,5 @@
         pelmMedium->setAttribute("autoReset", mdm.fAutoReset);
     if (mdm.strDescription.length())
-        pelmMedium->setAttribute("Description", mdm.strDescription);
+        pelmMedium->createChild("Description")->addContent(mdm.strDescription);
 
     for (StringsMap::const_iterator it = mdm.properties.begin();
@@ -4957,5 +4964,6 @@
         throw ConfigFileError(this, &elmSnapshot, N_("Required Snapshot/@name attribute is missing"));
 
-    // earlier 3.1 trunk builds had a bug and added Description as an attribute, read it silently and write it back as an element
+    // 3.1 dev builds added Description as an attribute, read it silently
+    // and write it back as an element
     elmSnapshot.getAttributeValue("Description", snap.strDescription);
 
