Index: /trunk/src/VBox/Main/include/DHCPServerImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/DHCPServerImpl.h	(revision 79620)
+++ /trunk/src/VBox/Main/include/DHCPServerImpl.h	(revision 79621)
@@ -139,5 +139,5 @@
     /** @name Helpers
      * @{  */
-    HRESULT i_calcLeaseFilename(const com::Utf8Str &aNetwork) RT_NOEXCEPT;
+    HRESULT i_calcLeasesFilename(const com::Utf8Str &aNetwork) RT_NOEXCEPT;
     /** @} */
 
Index: /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 79620)
+++ /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 79621)
@@ -66,5 +66,5 @@
 
     char tempConfigFileName[RTPATH_MAX];
-    com::Utf8Str strLeaseFilename;
+    com::Utf8Str strLeasesFilename;
     com::Utf8Str networkName;
     com::Utf8Str trunkName;
@@ -696,5 +696,5 @@
     m->trunkName   = aTrunkName;
     m->trunkType   = aTrunkType;
-    HRESULT hrc = i_calcLeaseFilename(aNetworkName);
+    HRESULT hrc = i_calcLeasesFilename(aNetworkName);
     if (FAILED(hrc))
         return hrc;
@@ -732,5 +732,5 @@
     pElmRoot->setAttribute("lowerIP", m->lowerIP);
     pElmRoot->setAttribute("upperIP", m->upperIP);
-    pElmRoot->setAttribute("leaseFilename", m->strLeaseFilename);
+    pElmRoot->setAttribute("leasesFilename", m->strLeasesFilename);
 
     /* Process global options */
@@ -866,7 +866,7 @@
      */
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    if (m->strLeaseFilename.isEmpty())
-    {
-        HRESULT hrc = i_calcLeaseFilename(m->networkName.isEmpty() ? mName : m->networkName);
+    if (m->strLeasesFilename.isEmpty())
+    {
+        HRESULT hrc = i_calcLeasesFilename(m->networkName.isEmpty() ? mName : m->networkName);
         if (FAILED(hrc))
             return hrc;
@@ -886,5 +886,5 @@
         {
             xml::XmlFileParser parser;
-            parser.read(m->strLeaseFilename.c_str(), doc);
+            parser.read(m->strLeasesFilename.c_str(), doc);
         }
         catch (const xml::EIPRTFailure &e)
@@ -912,11 +912,11 @@
             }
             return setErrorBoth(VBOX_E_FILE_ERROR, vrc, "Reading '%s' failed: %Rrc - %s",
-                                m->strLeaseFilename.c_str(), vrc, e.what());
+                                m->strLeasesFilename.c_str(), vrc, e.what());
         }
         catch (const RTCError &e)
         {
             if (e.what())
-                return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: %s", m->strLeaseFilename.c_str(), e.what());
-            return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: RTCError", m->strLeaseFilename.c_str());
+                return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: %s", m->strLeasesFilename.c_str(), e.what());
+            return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: RTCError", m->strLeasesFilename.c_str());
         }
         catch (std::bad_alloc &)
@@ -927,5 +927,5 @@
         {
             AssertFailed();
-            return setError(VBOX_E_FILE_ERROR, tr("Reading '%s' failed: Unexpected exception"), m->strLeaseFilename.c_str());
+            return setError(VBOX_E_FILE_ERROR, tr("Reading '%s' failed: Unexpected exception"), m->strLeasesFilename.c_str());
         }
 
@@ -988,20 +988,20 @@
 
 /**
- * Calculates and updates the value of strLeaseFilename given @a aNetwork.
+ * Calculates and updates the value of strLeasesFilename given @a aNetwork.
  */
-HRESULT DHCPServer::i_calcLeaseFilename(const com::Utf8Str &aNetwork)
+HRESULT DHCPServer::i_calcLeasesFilename(const com::Utf8Str &aNetwork)
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* The lease file must be the same as we used the last time, so careful when changing this code. */
-    int vrc = m->strLeaseFilename.assignNoThrow(mVirtualBox->i_homeDir());
+    int vrc = m->strLeasesFilename.assignNoThrow(mVirtualBox->i_homeDir());
     if (RT_SUCCESS(vrc))
-        vrc = RTPathAppendCxx(m->strLeaseFilename, aNetwork);
+        vrc = RTPathAppendCxx(m->strLeasesFilename, aNetwork);
     if (RT_SUCCESS(vrc))
-        vrc = m->strLeaseFilename.appendNoThrow("-Dhcpd.leases");
+        vrc = m->strLeasesFilename.appendNoThrow("-Dhcpd.leases");
     if (RT_SUCCESS(vrc))
     {
-        RTPathPurgeFilename(RTPathFilename(m->strLeaseFilename.mutableRaw()), RTPATH_STR_F_STYLE_HOST);
-        m->strLeaseFilename.jolt();
+        RTPathPurgeFilename(RTPathFilename(m->strLeasesFilename.mutableRaw()), RTPATH_STR_F_STYLE_HOST);
+        m->strLeasesFilename.jolt();
         return S_OK;
     }
Index: /trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp	(revision 79620)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp	(revision 79621)
@@ -29,4 +29,5 @@
 #include <iprt/string.h>
 #include <iprt/uuid.h>
+#include <iprt/cpp/path.h>
 
 #include <VBox/com/com.h>       /* For log initialization. */
@@ -735,5 +736,15 @@
         m_strTrunk = "";
 
-    m_strLeaseFilename = pElmServer->findAttributeValue("leaseFilename"); /* optional */
+    m_strLeasesFilename = pElmServer->findAttributeValue("leasesFilename"); /* optional */
+    if (m_strLeasesFilename.isEmpty())
+    {
+        int rc = m_strLeasesFilename.assignNoThrow(getHome());
+        if (RT_SUCCESS(rc))
+            rc = RTPathAppendCxx(m_strLeasesFilename, getBaseName());
+        if (RT_SUCCESS(rc))
+            rc = m_strLeasesFilename.appendNoThrow("-Dhcpd.leases");
+        if (RT_FAILURE(rc))
+            throw ConfigFileError("Unexpected error constructing default m_strLeasesFilename value: %Rrc", rc);
+    }
 
     i_getIPv4AddrAttribute(pElmServer, "IPAddress", &m_IPv4Address);
Index: /trunk/src/VBox/NetworkServices/Dhcpd/Config.h
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/Config.h	(revision 79620)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/Config.h	(revision 79621)
@@ -46,5 +46,5 @@
     RTCString       m_strNetwork;       /**< The name of the internal network the DHCP server is connected to. */
     RTCString       m_strBaseName;      /**< m_strNetwork sanitized to be usable in a path component. */
-    RTCString       m_strLeaseFilename; /**< The lease filename if one given.  Dhcpd will pick a default if empty. */
+    RTCString       m_strLeasesFilename;/**< The lease DB filename. */
 
     RTCString       m_strTrunk;         /**< The trunk name of the internal network. */
@@ -93,5 +93,5 @@
     const RTCString    &getNetwork() const RT_NOEXCEPT          { return m_strNetwork; }
     const RTCString    &getBaseName() const RT_NOEXCEPT         { return m_strBaseName; }
-    const RTCString    &getLeaseFilename() const RT_NOEXCEPT    { return m_strLeaseFilename; }
+    const RTCString    &getLeasesFilename() const RT_NOEXCEPT   { return m_strLeasesFilename; }
 
     const RTCString    &getTrunk() const RT_NOEXCEPT            { return m_strTrunk; }
Index: /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.cpp
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.cpp	(revision 79620)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.cpp	(revision 79621)
@@ -25,5 +25,4 @@
 
 #include <iprt/message.h>
-#include <iprt/cpp/path.h>
 
 
@@ -44,37 +43,19 @@
     Assert(pConfig);
     AssertReturn(!m_pConfig, VERR_INVALID_STATE);
-
-    /* leases filename */
-    int rc;
-    if (pConfig->getLeaseFilename().isEmpty())
-        rc = m_strLeasesFilename.assignNoThrow(pConfig->getLeaseFilename());
-    else
-    {
-        rc = m_strLeasesFilename.assignNoThrow(pConfig->getHome());
-        if (RT_SUCCESS(rc))
-            rc = RTPathAppendCxx(m_strLeasesFilename, pConfig->getBaseName());
-        if (RT_SUCCESS(rc))
-            rc = m_strLeasesFilename.appendNoThrow("-Dhcpd.leases");
-    }
+    m_pConfig = pConfig;
+
+    /* Load the lease database, ignoring most issues except being out of memory: */
+    int rc = m_db.init(pConfig);
     if (RT_SUCCESS(rc))
     {
-        /* Load the lease database, ignoring most issues except being out of memory: */
-        rc = m_db.init(pConfig);
-        if (RT_SUCCESS(rc))
-        {
-            rc = i_loadLeases();
-            if (rc != VERR_NO_MEMORY)
-            {
-                m_pConfig = pConfig;
-                rc = VINF_SUCCESS;
-            }
-            else
-            {
-                LogRel(("Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
-                        m_strLeasesFilename.c_str()));
-                RTMsgError("Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
-                           m_strLeasesFilename.c_str());
-            }
-        }
+        rc = i_loadLeases();
+        if (rc != VERR_NO_MEMORY)
+            return VINF_SUCCESS;
+
+        /** @todo macro for this: */
+        LogRel((   "Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
+                   pConfig->getLeasesFilename().c_str()));
+        RTMsgError("Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
+                   pConfig->getLeasesFilename().c_str());
     }
     return rc;
@@ -83,14 +64,14 @@
 
 /**
- * Load leases from m_strLeasesFilename.
+ * Load leases from pConfig->getLeasesFilename().
  */
 int DHCPD::i_loadLeases() RT_NOEXCEPT
 {
-    return m_db.loadLeases(m_strLeasesFilename);
-}
-
-
-/**
- * Save the current leases to m_strLeasesFilename, doing expiry first.
+    return m_db.loadLeases(m_pConfig->getLeasesFilename());
+}
+
+
+/**
+ * Save the current leases to pConfig->getLeasesFilename(), doing expiry first.
  *
  * This is called after m_db is updated during a client request, so the on disk
@@ -104,5 +85,5 @@
 {
     m_db.expire();
-    m_db.writeLeases(m_strLeasesFilename);
+    m_db.writeLeases(m_pConfig->getLeasesFilename());
 }
 
Index: /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.h
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.h	(revision 79620)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.h	(revision 79621)
@@ -40,6 +40,4 @@
     /** The DHCP configuration. */
     const Config   *m_pConfig;
-    /** The lease database filename. */
-    RTCString       m_strLeasesFilename;
     /** The lease database. */
     Db              m_db;
