This topic describes the cause of and solution to the following issue: After you install Windows updates or add roles and features on a Windows Elastic Compute Service (ECS) instance and restart the instance, the Windows operating system of the instance remains in the Getting ready state for an extended period of time.
Problem description
After you install Windows updates or add roles and features on a Windows ECS instance and restart the instance, the Windows operating system of the instance remains in the Getting ready or Getting Windows ready state for an extended period of time.


Cause
The ECS instance may have update packages that are pending installation, including system patches and new features. As a result, the operating system cannot start as expected.
Solution
Attach a repair disk to the ECS instance and then uninstall the packages that are pending installation. In the following example, the drive letter of the repair disk is D. Perform the following steps:
Perform a diagnostic on the Windows ECS instance.
Log on to the ECS console.
In the left-side navigation pane, click Troubleshooting.
In the top navigation bar, select the region in which the Windows ECS instance resides.
On the Instance Troubleshooting page, click Instance Connection Errors or Startup Exceptions.
Select Instance Startup Exception on the Instance in the Stopped State. Select a value from the Instance ID drop-down list, specify a time range, and then click Start.
NoteThe Windows ECS instance on which you want to perform a diagnostic must be in the Stopped state. For information about how to stop an ECS instance, see Stop an instance.

When the diagnostic is complete, the Windows ECS instance is in the Running or Repairing state.
Connect to the faulty instance.
On the Diagnostic Result page, click VNC Connection. Then, enter the Administrator username and password provided in the diagnostic report to log on to the ECS instance to which a repair disk is attached. For more information, see Connect to an instance by using VNC.
Run Windows PowerShell as an administrator.

Find the packages that are pending installation.
$pendingPackages = Get-WindowsPackage -Path D:\ | Where-Object {$_.PackageState -match 'InstallPending'}Uninstall the packages that are pending installation.
$pendingPackages | Remove-WindowsPackageOn the Instance page, move the pointer over the Repairing state that corresponds to the instance and click Detach Repair Disk.
Restart the instance to allow the preceding configurations to take effect.
For more information, see Restart an instance.
Connect to the ECS instance. If you can connect to the ECS instance as expected, the preceding issue is resolved.
For more information, see Connect to a Windows instance by using a password or key.