Resolve Windows instance issues after a system update

更新时间:
复制 MD 格式

This topic explains how to resolve boot failures and functional issues on a Windows instance after a system update.

Symptoms

After you install a system update on a Windows instance, the operating system fails to start or Windows features, such as driver installations or Key Management Service (KMS), do not function correctly.

Cause

This issue occurs when a faulty system patch prevents the operating system from starting or causes Windows features to function abnormally.

Solutions

You can uninstall the system patch by using one of the following methods based on whether the instance can start.

The instance can start

Method 1: Uninstall the system patch from Windows Update

  1. Connect to the ECS instance.

    For more information, see Connect to a Windows instance by using Workbench.

  2. Click the Start menu, and then click Settings.

    image.png

  3. On the Windows Settings page, click Update & security.

    image.png

  4. On the Windows Update page, click View Update History.

    image.png

  5. On the Update History page, click Uninstall updates.

    image.png

  6. Right-click the update that you want to uninstall, such as KB5029250, click Uninstall, and then follow the on-screen instructions to uninstall the update.

    image.png

Method 2: Use PowerShell to uninstall a system patch

  1. Connect to the ECS instance.

    For more information, see Connect to a Windows instance by using Workbench.

  2. Run Windows PowerShell as an administrator.

    image.png

  3. Find the package that corresponds to the patch.

    $package = Get-WindowsPackage -Online | Where-Object {$_.PackageName -match 'KB5029250'}
  4. Uninstall the package.

    $package | Remove-WindowsPackage -Online

The instance cannot start

If the instance cannot start, you can resolve the issue by attaching a repair disk to the affected instance and then uninstalling the faulty patch. Assume that the drive letter for the mounted disk is D and the patch to be uninstalled is KB5029250. Perform the following steps to uninstall the faulty patch:

  1. Run a diagnostic test for an operating system startup failure.

    1. Go to the ECS console - Troubleshooting page. In the top navigation bar, select a region and a resource group.

    2. On the Instance Troubleshooting tab, click the Instance Connection Errors or Startup Exceptions problem type.

    3. Select the Operating System Startup Failure on the Instance in the Stopped State problem, the Instance ID of the instance to diagnose and a time range, and then click Start.

      Note

      The target ECS instance must be in the Stopped state. For more information, see Stop an instance.

      image

      After the diagnosis is complete, the instance is in the Running or Repairing state.

      运行中、修复中

  2. Connect to the faulty instance.

    On the Diagnostic Result page, click VNC Connection. Enter the Administrator username and password from the diagnostic report to log on to the ECS instance with the repair disk attached. See Connect to an instance by using VNC.

  3. Run Windows PowerShell as an administrator.

    image.png

  4. Find the package that corresponds to the patch.

    $package = Get-WindowsPackage -Path D:\ | Where-Object {$_.PackageName -match 'KB5029250'}
  5. Uninstall the package.

    $package | Remove-WindowsPackage -Path D:\
  6. On the Instance page, move the pointer over the Fixing state that corresponds to the instance and click Detach Repair Disk.

  7. Restart the instance for the changes to take effect.

    See Restart an instance.

  8. Connect to the ECS instance. If the connection succeeds, the issue is resolved.

    See Log on to a Windows instance using Workbench.