Last update: Wed, 2020-03-25 13:20
Symptoms
You have a Gen2 Hyper-V VM with Secure Boot enabled.
You install Agent for Windows inside this VM and run an Entire machine backup
You attempt to recover this VM from the backup. Recovery fails with one of the following messages:
The activity has failed because the machine has been shut down unexpectedly.
Activity 'Recovering volumes' failed. The activity has failed due to a planned restart of the operating system.
Example of full error log: click to expand
2019-11-13T14:23:34:075+03:00 2524 E0135003D: Error 0x135003d: Command has failed. Command=Recovering volumes;
| trace level: error
| line: 0x4a8728dc8a1c9583
| file: e:\381\enterprise\common\tol\gating_activity.cpp:221
| function: Tol::`anonymous-namespace'::BusinessActivityTracker::OnCompleted
| $module: mms_vsa64_12960
|
| error 0x135004e: The activity has failed due to a restart of the service.
| line: 0x7564da35b0f1eaf5
| file: e:\381\enterprise\common\tol\activity_workshop.cpp:91
| function: Tol::BaseRepairConditions::Result
| $module: mms_vsa64_12960
|
| error 0x13500cb: The system was shutdown by a user or planned system event
| line: 0xfad14a153f747586
| file: e:\381\enterprise\common\tol\utils\event_log.cpp:91
| function: Tol::Util::IsPreviousShutdownWasExpectedByKernel
| $module: mms_vsa64_12960
|
| error 0x142711: The kernel power manager has initiated a shutdown transition.
|
| Shutdown Reason: Kernel API
| line: 0xfad14a153f747562
| file: e:\381\enterprise\common\tol\utils\event_log.cpp:55
| function: Tol::Util::IsEventPresentInSystemLog
| $module: mms_vsa64_12960
|
| error 0x142711: The kernel power manager has initiated a shutdown transition.
|
| Shutdown Reason: Kernel API
| line: 0xfad14a153f747562
| file: e:\381\enterprise\common\tol\utils\event_log.cpp:55
| function: Tol::Util::IsEventPresentInSystemLog
| providerName: Microsoft-Windows-Kernel-Power
| providerGUID: 331C3B3A-2005-44C2-AC5E-77220C37D6B4
| EventID: 0x6d
| Channel: System
| Computer: SecBoot-TEST
| $module: mms_vsa64_12960
-------------------------------------------------------------------
019-11-13T16:18:29:071+03:00 3808 E0135003D: Error 0x135003d: Command has failed. Command=Recovering volumes
| trace level: error
| line: 0x4a8728dc8a1c9584
| file: e:\578\enterprise\common\tol\gating_activity.cpp:222
| function: Tol::`anonymous-namespace'::BusinessActivityTracker::OnCompleted
| $module: mms_vsa64_14800
|
| error 0x135004e: The activity has failed due to a restart of the service.
| line: 0x7564da35b0f1eaf6
| file: e:\578\enterprise\common\tol\activity_workshop.cpp:92
| function: Tol::BaseRepairConditions::Result
| $module: mms_vsa64_14800
|
| error 0x13500ce: Recovery with reboot has failed.
| line: 0xfad14a153f74758c
| file: e:\578\enterprise\common\tol\utils\event_log.cpp:97
| function: Tol::Util::IsRestoreWithRebootInEventLog
| $module: mms_vsa64_14800
|
| error 0x142711: The process C:\Program Files\BackupClient\BackupAndRecovery\mms.exe (SECBOOT-2016) has initiated the restart of computer SECBOOT-2016 on behalf of user NT AUTHORITY\SYSTEM for the following reason: Legacy API shutdown
| Reason Code: 0x80070000
| Shutdown Type: restart
| Comment: Acronis Backup
| line: 0xfad14a153f74758a
| file: e:\578\enterprise\common\tol\utils\event_log.cpp:95
| function: Tol::Util::IsRestoreWithRebootInEventLog
| $module: mms_vsa64_14800
|
| error 0x142711: The process C:\Program Files\BackupClient\BackupAndRecovery\mms.exe (SECBOOT-2016) has initiated the restart of computer SECBOOT-2016 on behalf of user NT AUTHORITY\SYSTEM for the following reason: Legacy API shutdown
| Reason Code: 0x80070000
| Shutdown Type: restart
| Comment: Acronis Backup
| line: 0xfad14a153f74758a
| file: e:\578\enterprise\common\tol\utils\event_log.cpp:95
| function: Tol::Util::IsRestoreWithRebootInEventLog
| providerName: User32
| providerGUID: B0AA8734-56F7-41CC-B2F4-DE228E98B946
| EventID: 0x432
| Channel: System
| Computer: SecBoot-2016
| $module: mms_vsa64_14800
Cause
Recovery with reboot of a Hyper-V Gen2 VM may fail if recovery is done with Agent for Windows installed inside that VM, as Secure Boot option doesn't allow Agent for Windows to boot the device in recovery mode.
Solution
You can use one of the following workarounds:
Disable Secure Boot on the VM before recovery
Temporarily switch Secure Boot to Microsoft UEFI Certificate Authority for the recovery:
Start the recovery task
The VM reboots, shut it down
Switch the Secure Boot option to Microsoft UEFI Certificate Authority and reboot. The recovery operation will proceed.
Shut down the VM off and change Secure Boot back to Microsoft Windows
Reboot the VM again, recovery will be completed