Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 75818)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 75819)
@@ -60,4 +60,7 @@
 typedef DhcpOpts::iterator DhcpOptIterator;
 
+typedef std::vector<DhcpOpt_T> DhcpOptIds;
+typedef DhcpOptIds::iterator DhcpOptIdIterator;
+
 struct VmNameSlotKey
 {
@@ -82,4 +85,7 @@
 typedef VmSlot2OptionsM::iterator VmSlot2OptionsIterator;
 typedef VmSlot2OptionsM::value_type VmSlot2OptionsPair;
+
+typedef std::map<VmNameSlotKey, DhcpOptIds> VmSlot2OptionIdsM;
+typedef VmSlot2OptionIdsM::iterator VmSlot2OptionIdsIterator;
 
 typedef std::vector<VmNameSlotKey> VmConfigs;
@@ -112,5 +118,6 @@
     { "--slot",             's', RTGETOPT_REQ_UINT8}, /* only with -o and -n */
     { "--id",               'i', RTGETOPT_REQ_UINT8}, /* only with -o */
-    { "--value",            'p', RTGETOPT_REQ_STRING} /* only with -i */
+    { "--value",            'p', RTGETOPT_REQ_STRING}, /* only with -i */
+    { "--remove",           'r', RTGETOPT_REQ_NOTHING} /* only with -i */
 };
 
@@ -138,7 +145,9 @@
     int enable = -1;
 
-    DhcpOpts        GlobalDhcpOptions;
-    VmSlot2OptionsM VmSlot2Options;
-    VmConfigs       VmConfigs2Delete;
+    DhcpOpts          GlobalDhcpOptions;
+    DhcpOptIds        GlobalDhcpOptions2Delete;
+    VmSlot2OptionsM   VmSlot2Options;
+    VmSlot2OptionIdsM VmSlot2Options2Delete;
+    VmConfigs         VmConfigs2Delete;
 
     int c;
@@ -299,4 +308,24 @@
                 break; // --end of value
 
+            case 'r': /* --remove */
+                {
+                    if (!fOptionsRead)
+                        return errorSyntax(USAGE_DHCPSERVER,
+                                           "-o wasn't found");
+
+                    if (u8OptId == (uint8_t)~0)
+                        return errorSyntax(USAGE_DHCPSERVER,
+                                           "--id wasn't found");
+                    if (   fVmOptionRead
+                        && u8Slot == (uint8_t)~0)
+                        return errorSyntax(USAGE_DHCPSERVER,
+                                           "--slot wasn't found");
+
+                    DhcpOptIds &optIds = fVmOptionRead ? VmSlot2Options2Delete[VmNameSlotKey(pszVmName, u8Slot)]
+                                                       : GlobalDhcpOptions2Delete;
+                    optIds.push_back((DhcpOpt_T)u8OptId);
+                }
+                break; /* --end of remove */
+
             default:
                 if (c > 0)
@@ -322,5 +351,7 @@
        && enmCode != OP_RESTART
        && GlobalDhcpOptions.empty()
-       && VmSlot2Options.empty())
+       && VmSlot2Options.empty()
+       && GlobalDhcpOptions2Delete.empty()
+       && VmSlot2Options2Delete.empty())
     {
         if(enable < 0 || pIp || pNetmask || pLowerIp || pUpperIp)
@@ -404,4 +435,28 @@
         {
             CHECK_ERROR(svr, COMSETTER(Enabled) ((BOOL)enable));
+        }
+
+        /* remove specified options */
+        DhcpOptIdIterator itOptId;
+        for (itOptId = GlobalDhcpOptions2Delete.begin();
+             itOptId != GlobalDhcpOptions2Delete.end();
+             ++itOptId)
+        {
+            CHECK_ERROR(svr, RemoveGlobalOption(*itOptId));
+        }
+        VmSlot2OptionIdsIterator itIdVector;
+        for (itIdVector = VmSlot2Options2Delete.begin();
+             itIdVector != VmSlot2Options2Delete.end();
+             ++itIdVector)
+        {
+            for(itOptId = itIdVector->second.begin();
+                itOptId != itIdVector->second.end();
+                ++itOptId)
+            {
+                CHECK_ERROR(svr,
+                            RemoveVmSlotOption(Bstr(itIdVector->first.VmName.c_str()).raw(),
+                                               itIdVector->first.u8Slot,
+                                               *itOptId));
+            }
         }
 
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 75818)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 75819)
@@ -1210,5 +1210,8 @@
                      "                            --lowerip <lower_ip>\n"
                      "                            --upperip <upper_ip>]\n"
-                     "                            [--enable | --disable]\n\n"
+                     "                            [--enable | --disable]\n"
+                     "                            [--options [--vm <name> --slot <number>]\n"
+                     "                             --id <number> [--value <string> | --remove]]\n"
+                     "                             (multiple options allowed after --options)\n\n"
                            "%s dhcpserver %s      remove --netname <network_name> |\n"
 #if defined(VBOX_WITH_NETFLT)
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 75818)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 75819)
@@ -778,4 +778,86 @@
 
 /**
+ * Helper function for querying and displaying DHCP option for an adapter.
+ *
+ * @returns See produceList.
+ * @param   pSrv                Smart pointer to IDHCPServer.
+ * @param   vmSlot              String identifying the adapter, like '[vmname]:slot'
+ */
+static HRESULT listVmSlotDhcpOptions(const ComPtr<IDHCPServer> pSrv, const Utf8Str& vmSlot)
+{
+    RTCList<RTCString> lstParts = vmSlot.split(":");
+    if (lstParts.size() < 2)
+        return E_INVALIDARG;
+    if (lstParts[0].length() < 2 || !lstParts[0].startsWith("[") || !lstParts[0].endsWith("]"))
+        return E_INVALIDARG;
+    Bstr vmName(lstParts[0].substr(1, lstParts[0].length()-2));
+    ULONG uSlot = lstParts[1].toUInt32();
+    com::SafeArray<BSTR> options;
+    CHECK_ERROR2I_RET(pSrv, GetVmSlotOptions(vmName.raw(), uSlot, ComSafeArrayAsOutParam(options)), hrcCheck);
+    if (options.size())
+        RTPrintf("Options for slot #%d of '%ls':\n", uSlot, vmName.raw());
+    for (size_t i = 0; i < options.size(); ++i)
+    {
+        RTPrintf("   %ls\n", options[i]);
+    }
+    return S_OK;
+}
+
+
+/**
+ * List DHCP servers.
+ *
+ * @returns See produceList.
+ * @param   pVirtualBox         Reference to the IVirtualBox smart pointer.
+ */
+static HRESULT listDhcpServers(const ComPtr<IVirtualBox> &pVirtualBox)
+{
+    HRESULT rc = S_OK;
+    com::SafeIfaceArray<IDHCPServer> svrs;
+    CHECK_ERROR_RET(pVirtualBox, COMGETTER(DHCPServers)(ComSafeArrayAsOutParam(svrs)), rc);
+    for (size_t i = 0; i < svrs.size(); ++i)
+    {
+        ComPtr<IDHCPServer> svr = svrs[i];
+        Bstr netName;
+        svr->COMGETTER(NetworkName)(netName.asOutParam());
+        RTPrintf("NetworkName:    %ls\n", netName.raw());
+        Bstr ip;
+        svr->COMGETTER(IPAddress)(ip.asOutParam());
+        RTPrintf("IP:             %ls\n", ip.raw());
+        Bstr netmask;
+        svr->COMGETTER(NetworkMask)(netmask.asOutParam());
+        RTPrintf("NetworkMask:    %ls\n", netmask.raw());
+        Bstr lowerIp;
+        svr->COMGETTER(LowerIP)(lowerIp.asOutParam());
+        RTPrintf("lowerIPAddress: %ls\n", lowerIp.raw());
+        Bstr upperIp;
+        svr->COMGETTER(UpperIP)(upperIp.asOutParam());
+        RTPrintf("upperIPAddress: %ls\n", upperIp.raw());
+        BOOL fEnabled;
+        svr->COMGETTER(Enabled)(&fEnabled);
+        RTPrintf("Enabled:        %s\n", fEnabled ? "Yes" : "No");
+        com::SafeArray<BSTR> globalOptions;
+        CHECK_ERROR_BREAK(svr, COMGETTER(GlobalOptions)(ComSafeArrayAsOutParam(globalOptions)));
+        if (globalOptions.size())
+        {
+            RTPrintf("Global options:\n");
+            for (size_t j = 0; j < globalOptions.size(); ++j)
+                RTPrintf("   %ls\n", globalOptions[j]);
+        }
+        com::SafeArray<BSTR> vmConfigs;
+        CHECK_ERROR_BREAK(svr, COMGETTER(VmConfigs)(ComSafeArrayAsOutParam(vmConfigs)));
+        for (size_t j = 0; j < vmConfigs.size(); ++j)
+        {
+            rc = listVmSlotDhcpOptions(svr, vmConfigs[j]);
+            if (FAILED(rc))
+                break;
+        }
+        RTPrintf("\n");
+    }
+
+    return rc;
+}
+
+/**
  * List extension packs.
  *
@@ -1302,32 +1384,6 @@
 
         case kListDhcpServers:
-        {
-            com::SafeIfaceArray<IDHCPServer> svrs;
-            CHECK_ERROR(pVirtualBox, COMGETTER(DHCPServers)(ComSafeArrayAsOutParam(svrs)));
-            for (size_t i = 0; i < svrs.size(); ++i)
-            {
-                ComPtr<IDHCPServer> svr = svrs[i];
-                Bstr netName;
-                svr->COMGETTER(NetworkName)(netName.asOutParam());
-                RTPrintf("NetworkName:    %ls\n", netName.raw());
-                Bstr ip;
-                svr->COMGETTER(IPAddress)(ip.asOutParam());
-                RTPrintf("IP:             %ls\n", ip.raw());
-                Bstr netmask;
-                svr->COMGETTER(NetworkMask)(netmask.asOutParam());
-                RTPrintf("NetworkMask:    %ls\n", netmask.raw());
-                Bstr lowerIp;
-                svr->COMGETTER(LowerIP)(lowerIp.asOutParam());
-                RTPrintf("lowerIPAddress: %ls\n", lowerIp.raw());
-                Bstr upperIp;
-                svr->COMGETTER(UpperIP)(upperIp.asOutParam());
-                RTPrintf("upperIPAddress: %ls\n", upperIp.raw());
-                BOOL fEnabled;
-                svr->COMGETTER(Enabled)(&fEnabled);
-                RTPrintf("Enabled:        %s\n", fEnabled ? "Yes" : "No");
-                RTPrintf("\n");
-            }
-            break;
-        }
+            rc = listDhcpServers(pVirtualBox);
+            break;
 
         case kListExtPacks:
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 75818)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 75819)
@@ -1791,5 +1791,5 @@
   <interface
     name="IDHCPServer" extends="$unknown"
-    uuid="197717d2-a742-4966-a529-d1467e903feb"
+    uuid="ea2d467f-b6c2-4b9a-8eb5-6e2f275dd72e"
     wsmap="managed"
     reservedMethods="2" reservedAttributes="6"
@@ -1842,4 +1842,23 @@
       <param name="option" type="DhcpOpt" dir="in"/>
       <param name="value" type="wstring" dir="in" />
+    </method>
+
+    <method name="removeGlobalOption">
+      <desc>
+        removes the specified option
+        <result name="E_INVALIDARG">
+          invalid option id supplied
+        </result>
+      </desc>
+      <param name="option" type="DhcpOpt" dir="in"/>
+    </method>
+
+    <method name="removeGlobalOptions">
+      <desc>
+        removes all global options
+        <result name="E_FAIL">
+          failed to remove global options
+        </result>
+      </desc>
     </method>
 
@@ -1877,5 +1896,23 @@
     </method>
 
+    <method name="removeVmSlotOption">
+      <desc>
+        removes the specified option
+        <result name="E_INVALIDARG">
+          invalid VM, slot, or option id supplied
+        </result>
+      </desc>
+      <param name="vmname" type="wstring" dir="in"/>
+      <param name="slot" type="long" dir="in"/>
+      <param name="option" type="DhcpOpt" dir="in"/>
+    </method>
+
     <method name="removeVmSlotOptions">
+      <desc>
+        removes all option for the specified adapter
+        <result name="E_INVALIDARG">
+          invalid VM or slot supplied
+        </result>
+      </desc>
       <param name="vmname" type="wstring" dir="in"/>
       <param name="slot" type="long" dir="in"/>
Index: /trunk/src/VBox/Main/include/DHCPServerImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/DHCPServerImpl.h	(revision 75818)
+++ /trunk/src/VBox/Main/include/DHCPServerImpl.h	(revision 75819)
@@ -116,8 +116,13 @@
     HRESULT addGlobalOption(DhcpOpt_T aOption,
                             const com::Utf8Str &aValue);
+    HRESULT removeGlobalOption(DhcpOpt_T aOption);
+    HRESULT removeGlobalOptions();
     HRESULT addVmSlotOption(const com::Utf8Str &aVmName,
                             LONG aSlot,
                             DhcpOpt_T aOption,
                             const com::Utf8Str &aValue);
+    HRESULT removeVmSlotOption(const com::Utf8Str &aVmName,
+                               LONG aSlot,
+                               DhcpOpt_T aOption);
     HRESULT removeVmSlotOptions(const com::Utf8Str &aVmName,
                                 LONG aSlot);
Index: /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 75818)
+++ /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 75819)
@@ -478,4 +478,31 @@
 
 
+HRESULT DHCPServer::removeGlobalOption(DhcpOpt_T aOption)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    settings::DhcpOptionMap::size_type cErased = m->GlobalDhcpOptions.erase(aOption);
+    if (!cErased)
+        return E_INVALIDARG;
+
+    alock.release();
+
+    AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
+    return mVirtualBox->i_saveSettings();
+}
+
+
+HRESULT DHCPServer::removeGlobalOptions()
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    m->GlobalDhcpOptions.clear();
+
+    alock.release();
+
+    AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
+    return mVirtualBox->i_saveSettings();
+}
+
+
 HRESULT DHCPServer::getGlobalOptions(std::vector<com::Utf8Str> &aValues)
 {
@@ -520,4 +547,19 @@
     int rc = addOption(map, aOption, aValue);
     if (!RT_SUCCESS(rc))
+        return E_INVALIDARG;
+
+    alock.release();
+
+    AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
+    return mVirtualBox->i_saveSettings();
+}
+
+
+HRESULT DHCPServer::removeVmSlotOption(const com::Utf8Str &aVmName, LONG aSlot, DhcpOpt_T aOption)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    settings::DhcpOptionMap &map = i_findOptMapByVmNameSlot(aVmName, aSlot);
+    settings::DhcpOptionMap::size_type cErased = map.erase(aOption);
+    if (!cErased)
         return E_INVALIDARG;
 
