Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 38873)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 38874)
@@ -472,4 +472,5 @@
                      "                            [--tempeject on|off]\n"
                      "                            [--nonrotational on|off]\n"
+                     "                            [--discard on|off]\n"
                      "                            [--bandwidthgroup <name>]\n"
                      "                            [--forceunmount]\n"
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 38873)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 38874)
@@ -54,4 +54,5 @@
     { "--tempeject",        'e', RTGETOPT_REQ_STRING },
     { "--nonrotational",    'n', RTGETOPT_REQ_STRING },
+    { "--discard",          'u', RTGETOPT_REQ_STRING },
     { "--bandwidthgroup",   'b', RTGETOPT_REQ_STRING },
     { "--forceunmount",     'f', RTGETOPT_REQ_NOTHING },
@@ -88,4 +89,5 @@
     const char *pszTempEject = NULL;
     const char *pszNonRotational = NULL;
+    const char *pszDiscard = NULL;
     const char *pszBandwidthGroup = NULL;
     Bstr bstrNewUuid;
@@ -184,4 +186,13 @@
                 if (ValueUnion.psz)
                     pszNonRotational = ValueUnion.psz;
+                else
+                    rc = E_FAIL;
+                break;
+            }
+
+            case 'u':   // nonrotational <on|off>
+            {
+                if (ValueUnion.psz)
+                    pszDiscard = ValueUnion.psz;
                 else
                     rc = E_FAIL;
@@ -796,4 +807,31 @@
         }
 
+        if (   pszNonRotational
+            && (SUCCEEDED(rc)))
+        {
+            ComPtr<IMediumAttachment> mattach;
+            CHECK_ERROR(machine, GetMediumAttachment(Bstr(pszCtl).raw(), port,
+                                                     device, mattach.asOutParam()));
+
+            if (SUCCEEDED(rc))
+            {
+                if (!RTStrICmp(pszDiscard, "on"))
+                {
+                    CHECK_ERROR(machine, DiscardDevice(Bstr(pszCtl).raw(),
+                                                       port, device, TRUE));
+                }
+                else if (!RTStrICmp(pszDiscard, "off"))
+                {
+                    CHECK_ERROR(machine, DiscardDevice(Bstr(pszCtl).raw(),
+                                                       port, device, FALSE));
+                }
+                else
+                    throw Utf8StrFmt("Invalid --nonrotational argument '%s'", pszNonRotational);
+            }
+            else
+                throw Utf8StrFmt("Couldn't find the controller attachment for the controller '%s'\n", pszCtl);
+        }
+
+
         if (   pszBandwidthGroup
             && !fRunTime
