Index: /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 37827)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 37828)
@@ -2921,7 +2921,7 @@
                 if (!pDrive)
                     InsertConfigNode(pCfg, g_apszIDEDrives[uLUN], &pDrive);
-                PCFGMNODE pNonRot = CFGMR3GetChild(pCtlInst, "NonRotationalMedium");
-                if (pNonRot)
-                    CFGMR3RemoveNode(pNonRot);
+                /* Don't use the RemoveConfigValue wrapper above, as we don't
+                 * know if the leaf is present or not. */
+                CFGMR3RemoveValue(pDrive,  "NonRotationalMedium");
                 InsertConfigInteger(pDrive, "NonRotationalMedium", !!fNonRotational);
             }
@@ -2932,7 +2932,7 @@
                 if (!pDrive)
                     InsertConfigNode(pCfg, strPort.c_str(), &pDrive);
-                PCFGMNODE pNonRot = CFGMR3GetChild(pCtlInst, "NonRotationalMedium");
-                if (pNonRot)
-                    CFGMR3RemoveNode(pNonRot);
+                /* Don't use the RemoveConfigValue wrapper above, as we don't
+                 * know if the leaf is present or not. */
+                CFGMR3RemoveValue(pDrive,  "NonRotationalMedium");
                 InsertConfigInteger(pDrive, "NonRotationalMedium", !!fNonRotational);
             }
