Fix Windows image issues

Updated at:
Copy as MD

Fix issues detected in Windows images, such as residual drivers on the system disk, residual Xen drivers, or driver installation restrictions.

Delete residual drivers from the registry

The Class subkey under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control registry tree contains registered filter drivers. If deleted drivers remain in the registry, instances created from the image may fail to start. Remove these residual entries to prevent startup failures.

  1. Log on to the source server where you create image files.

  2. Open Registry Editor.

    In the Windows taskbar search box, enter regedit and press ENTER.

  3. Open the disk registry key.

    Registry path: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}.

  4. Check for and delete any residual drivers.

    1. Check the UpperFilter attribute for residual drivers.

      If a driver listed in UpperFilters does not exist in C:\Windows\System32\drivers, it is a residual driver.

    2. Delete residual driver names from UpperFilters.

      Warning

      Do not delete built-in drivers. Removing built-in drivers causes system exceptions.

      For example, partmgr is a built-in system driver and must not be removed from the UpperFilters value.

Disable the Xen driver

The Xen driver is deprecated in VPCs but may remain in older images. Instances created from these images may fail to start. Disable the Xen driver in the registry to prevent this.

  1. Log on to the source server where you create image files.

  2. Open Registry Editor.

    In the Windows taskbar search box, enter regedit and press Enter.

  3. Open the registry key.

    Registry path: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XenPCI\Parameters.

  4. Clear the value of the hide_devices attribute.

    Edit the registry

Enable driver installation

The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry tree controls driver installation permissions. If driver installation is disabled in an image, instances cannot update drivers. Modify the registry to re-enable driver installation.

  1. Log on to the source server where you create image files.

  2. Open Registry Editor.

    In the Windows taskbar search box, enter regedit and press Enter.

  3. Open the registry key.

    • Later than Windows Server 2008 R2: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DeviceInstall\Parameters.

    • Windows Server 2008 R2 and earlier: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DeviceInstall\Parameters.

  4. If the DeviceInstallDisabled attribute exists and its value is not 0, set it to 0 or delete it.

    Example of Windows Server 2008 R2

    Windows Server 2008 R2 registry

    Example of Windows Server 2016

    A DeviceInstallDisabled (REG_DWORD) value of 1 disables device installation. Set the value to 0 or delete the attribute to enable installation.