diff --git a/host_state_manager.hpp b/host_state_manager.hpp
index 3e0763e..6388308 100644
--- a/host_state_manager.hpp
+++ b/host_state_manager.hpp
@@ -80,7 +80,9 @@
         // Will throw exception on fail
         determineInitialState();
 
-        attemptsLeft(BOOT_COUNT_MAX_ALLOWED);
+        // Sets auto-reboot attempts to max-allowed
+        attemptsLeft(sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                         RebootAttempts::retryAttempts());
 
         // We deferred this until we could get our property correct
         this->emit_object_added();
@@ -99,27 +101,56 @@
     HostState currentHostState(HostState value) override;
 
     /**
+     * @brief Set value for allowable auto-reboot count
+     *
+     * This override is responsible for ensuring that when external users
+     * set the number of automatic retry attempts that the number of
+     * automatic reboot attempts left will update accordingly.
+     *
+     * @param[in] value - desired Reboot count value
+     *
+     * @return number of reboot attempts allowed.
+     */
+    uint32_t retryAttempts(uint32_t value) override
+    {
+        if (sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                RebootAttempts::attemptsLeft() != value)
+        {
+            info("Automatic reboot retry attempts set to: {VALUE} ", "VALUE",
+                 value);
+            sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                RebootAttempts::attemptsLeft(value);
+        }
+
+        return (sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                    RebootAttempts::retryAttempts(value));
+    }
+
+    /**
      * @brief Set host reboot count to default
      *
      * OpenBMC software controls the number of allowed reboot attempts so
      * any external set request of this property will be overridden by
-     * this function and set to the default.
+     * this function and set to the number of the allowed auto-reboot
+     * retry attempts found on the system.
      *
      * The only code responsible for decrementing the boot count resides
      * within this process and that will use the sub class interface
      * directly
      *
-     * @param[in] value      - Reboot count value, will be ignored
+     * @param[in] value  - Reboot count value
      *
-     * @return Default number of reboot attempts left
+     * @return number of reboot attempts left(allowed by retry attempts
+     * property)
      */
     uint32_t attemptsLeft(uint32_t value) override
     {
-        // value is ignored in this implementation
-        (void)(value);
         debug("External request to reset reboot count");
-        return (sdbusplus::xyz::openbmc_project::Control::Boot::server::
-                    RebootAttempts::attemptsLeft(BOOT_COUNT_MAX_ALLOWED));
+        auto retryAttempts = sdbusplus::xyz::openbmc_project::Control::Boot::
+            server::RebootAttempts::retryAttempts();
+        return (
+            sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                RebootAttempts::attemptsLeft(std::min(value, retryAttempts)));
     }
 
   private:
@@ -221,7 +252,9 @@
     {
         // version is not used currently
         (void)(version);
-        archive(convertForMessage(sdbusplus::xyz::openbmc_project::State::
+        archive(sdbusplus::xyz::openbmc_project::Control::Boot::server::
+                    RebootAttempts::retryAttempts(),
+                convertForMessage(sdbusplus::xyz::openbmc_project::State::
                                       server::Host::requestedHostTransition()),
                 convertForMessage(sdbusplus::xyz::openbmc_project::State::Boot::
                                       server::Progress::bootProgress()),
@@ -240,12 +273,21 @@
     template <class Archive>
     void load(Archive& archive, const std::uint32_t version)
     {
-        // version is not used currently
-        (void)(version);
         std::string reqTranState;
         std::string bootProgress;
         std::string osState;
-        archive(reqTranState, bootProgress, osState);
+        // Older cereal archive without RetryAttempt may be implemented
+        // just set to (BOOT_COUNT_MAX_ALLOWED)
+        uint32_t retryAttempts = BOOT_COUNT_MAX_ALLOWED;
+        switch (version)
+        {
+            case 2:
+                archive(retryAttempts);
+                [[fallthrough]];
+            case 1:
+                archive(reqTranState, bootProgress, osState);
+                break;
+        }
         auto reqTran = Host::convertTransitionFromString(reqTranState);
         // When restoring, set the requested state with persistent value
         // but don't call the override which would execute it
@@ -256,6 +298,8 @@
         sdbusplus::xyz::openbmc_project::State::OperatingSystem::server::
             Status::operatingSystemState(
                 Host::convertOSStatusFromString(osState));
+        sdbusplus::xyz::openbmc_project::Control::Boot::server::RebootAttempts::
+            retryAttempts(retryAttempts);
     }
 
     /** @brief Serialize and persist requested host state
