This topic explains how to resolve the issue where a Windows Elastic Compute Service (ECS) instance is unable to update its operating system, resulting in the 0x80070422 error code.
Problem description
A Windows ECS instance may fail to retrieve or install updates, displaying the error code 0x80070422 as illustrated below:
Causes
The issue may arise from the following causes:
The Windows Firewall service (mpssvc) is not running. To resolve the issue, modify the registry and start the firewall service. For more information, see What do I do if Windows Update is stuck at 0% on an ECS instance when the Windows operating system of the instance is updated?
The dependencies of the Windows Update service may not start for the following reasons:
The service is disabled. To resolve the issue, enable the dependencies. For more information, see Solution 1: Enable the service using PowerShell or by modifying the registry.
The binary files of the service are missing or cannot be loaded. To resolve the issue, restore the binary files with the System File Checker (SFC) tool. For more information, see Solution 2: Use the SFC tool to restore the binary files.
Solutions
Solution 1: Enable the service by using PowerShell or modifying the registry
Connect to the Windows instance that you want to activate.
For more information, see Use Workbench to connect to a Windows instance over RDP.
To enable the disabled dependencies of the Windows Update service, use one of the following methods:
Run PowerShell scripts
Start Command Prompt.
Right-click the icon, and then click Windows PowerShell (Admin).
Run the following commands to set the service to automatically start at system boot and initiate the service.
Set-Service -Name <ServiceName> -StartType Automatic Start-Service -Name <ServiceName>
Take the
BITS
service as an example. If the system returns information with the text below, this indicates that theBITS
service has failed to start.(Optional) If the service you want to start still fails, you may need to restart the instance for the changes to take effect. For more information, see Restart an instance.
NoteThe services that require a restart to begin operation vary based on the operating system environment.
Modify the registry
Right-click the icon, and then click Run.
In the Run dialog box, enter
regedit
, and then click OK to open the Registry Editor window.In the Registry Editor, navigate to the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BITS
path, double-click the Start registry entry, set the Value data to the Hexadecimal value2
, and then click OK.(Optional) If the service you want to start still fails, you may need to restart the instance for the changes to take effect.
For more information, see Restart an instance.
NoteThe services that require a restart to begin operation vary based on the operating system environment.
Try updating the Windows operating system again. If the system successfully retrieves or installs updates, the issue has been resolved.
Solution 2: Use the SFC tool to restore the binary files
Connect to the Windows instance that you want to activate.
For more information, see Use Workbench to connect to a Windows instance over RDP.
Start Command Prompt.
Right-click the icon, and then click Windows PowerShell (Admin).
Run the following command to verify the integrity of all system files and repair any corrupted files.
sfc /scannow
Try updating the Windows operating system again. If the system successfully retrieves or installs updates, the issue has been resolved.