After you change the instance type of a Windows instance across generations in the Alibaba Cloud Elastic Compute Service (ECS) console, the instance may fail to start. This failure is indicated by a blue screen error with the message "INACCESSIBLE_BOOT_DEVICE", which prevents you from accessing the operating system. This topic describes how to resolve this issue.
Problem description
Trigger conditions
This issue occurs when you change the instance type of a Windows ECS instance across instance families (cross-generation). For example, this issue may occur if you change the instance type from ecs.g7 (VirtIO-SCSI) to ecs.g8i (NVMe).
Symptoms
After the instance type is changed, you cannot connect to the instance using remote desktop. When you log on to the instance using a VNC connection, a blue screen appears during the boot process. The screen displays the message Stop Code: (INACCESSIBLE_BOOT_DEVICE).
Error screenshot

Root cause
To optimize boot speed, the Windows operating system loads only the critical drivers required for the current hardware environment during a normal startup.
When you change the instance type of an ECS instance across generations, the interface protocol of the underlying storage hardware may change.
For example, if you upgrade an instance fromecs.g7toecs.g8i, the underlying storage driver switches fromVirtIO-SCSItoNVMe. After the upgrade, the operating system still attempts to load the old storage driver (viostor.sys) during the boot phase. However, the new hardware uses anNVMeinterface. This mismatch makes the system disk undetectable. As a result, the system cannot find a bootable device and triggers theINACCESSIBLE_BOOT_DEVICEblue screen error.
Contingency plan
This plan is designed to restore service access as quickly as possible. It is not a permanent solution.
To quickly restore your services, first change the instance type back to the original one.
After your services are restored, if you still need to upgrade to the new instance type, you must first pre-process the instance by following the steps in the Preventive measures section. Then, you can schedule a new maintenance window to change the instance type again.
Solutions
Solution 1: Enter safe mode for automatic repair (Recommended)
This solution uses the safe mode feature in Windows, which automatically loads generic drivers to fix driver issues.
Before you perform the repair, create a snapshot for the instance to prevent data loss in case of operational errors.
Procedure
Log on to the failed instance using a VNC connection. After the instance fails to start twice, it automatically enters the repair interface shown in the following figure. On this interface, select Troubleshoot to navigate to the Advanced Options interface.

On the Advanced Options interface, select Startup Settings.

On the Startup Settings interface, click Restart.

After the instance restarts, it enters the Advanced Boot Options menu. Select Safe Mode With Networking and press
Enter. Wait for the system to load into safe mode.
Follow the on-screen prompts to log on to the system and enter the safe mode desktop. The new storage driver is automatically loaded and registered.

In the console, restart the instance. Then, log on to the instance using a VNC connection again. If the instance starts normally and you can access the Windows desktop, the issue is resolved.

Solution 2: Edit the registry offline in repair mode
This solution uses the command line interface in the Windows repair environment to modify the registry offline and force the storage driver to load.
Before you perform the repair, create a snapshot for the instance to prevent data loss in case of operational errors.
Procedure
Log on to the failed instance using a VNC connection. After the instance fails to start twice, it automatically enters the repair interface shown in the following figure. Select Troubleshoot to navigate to the Advanced Options interface.

Select Command Prompt.

Select an account with administrator permissions (the default is Administrator) and enter the password to open the command prompt environment.


In the command prompt window, enter
regeditand press Enter to open the Registry Editor.
Select
HKEY_LOCAL_MACHINE. Then, from the menu bar, choose .
In the file selection dialog box that appears, navigate to the registry file path on the system disk. The path is typically
C:\Windows\System32\config\SYSTEM. Click Open.In the Load Hive dialog box, specify a temporary key name for the loaded hive, such as
OfflineSYSTEM. Then, click OK.
Expand
HKEY_LOCAL_MACHINE\OfflineSYSTEM\Select. Check the value of theDefaultkey. For example, if the value is1, the current control set isControlSet001.
Find the following three registry paths. Right-click each path and select Delete. If a path does not exist, ignore it.
HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\AliNVMe\StartOverride HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\stornvme\StartOverride HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\viostor\StartOverride
Select the
OfflineSYSTEMkey that you loaded. From the menu bar, choose and confirm the unload operation.Close the Registry Editor and the command prompt window. Return to the options interface and select Continue. Wait for the system to restart.

Expected result: The instance restarts normally and you can access the Windows logon interface.
Solution 3: Edit the registry offline by attaching the system disk
This solution involves attaching the system disk of the failed instance to a healthy helper instance to repair the registry.
Before you perform the repair, create a snapshot for the instance to prevent data loss in case of operational errors.
Procedure
Prepare a healthy Windows instance (helper instance) that meets the following requirements:
Different image: The image of the helper instance cannot be the same as the image of the failed instance.
Same zone: The helper instance must be in the same zone as the failed instance.
In the console, stop the failed instance. Then, detach the system disk from the failed instance and attach it as a data disk to the helper instance.
Log on to the helper instance using Workbench. Press
Win+R, enterdiskmgmt.msc, and then pressEnterto open Disk Management. Right-click the newly attached disk and click Online.
Press
Win+R, enterregedit, and pressEnterto open the Registry Editor.Select
HKEY_LOCAL_MACHINE. Then, from the menu bar, choose .
In the dialog box that appears, navigate to the registry file path on the newly attached system disk and click Open.
For example, if the drive letter of the newly attached system disk is D, the registry file path is
D:\Windows\System32\config\SYSTEM.In the Load Hive dialog box, specify a temporary key name for the loaded hive, such as
OfflineSYSTEM. Then, click OK.
Expand
HKEY_LOCAL_MACHINE\OfflineSYSTEM\Select. Check the value of theDefaultkey. For example, if the value is1, the current control set isControlSet001.
Find the following three registry paths. Right-click each path and select Delete. If a path does not exist, ignore it.
HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\AliNVMe\StartOverride HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\stornvme\StartOverride HKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Services\viostor\StartOverride
Select the
OfflineSYSTEMkey that you loaded. From the menu bar, choose . Confirm the unload operation and exit the Registry Editor.Press
Win+R, enterdiskmgmt.msc, and pressEnterto open Disk Management. Right-click the newly attached disk and select Offline.In the console, detach the repaired disk from the helper instance. Then, attach it back to the original instance as a system disk.
Restart the failed instance and log on to the instance using a VNC connection.
Expected result: The instance restarts normally and you can access the Windows logon interface.
Preventive measures
To prevent this issue, perform the following pre-processing operations before you change the instance type of a Windows instance across generations. This forces the system to load all available storage drivers on the next startup.
Before you perform the repair, create a snapshot for the instance to prevent data loss in case of operational errors.
Console (run commands in batches using Cloud Assistant)
In the ECS console - Cloud Assistant, create a PowerShell command.
Paste the following three commands into the Command content box.
reg delete HKLM\SYSTEM\CurrentControlSet\Services\stornvme\StartOverride /f reg delete HKLM\SYSTEM\CurrentControlSet\Services\AliNVMe\StartOverride /f reg delete HKLM\SYSTEM\CurrentControlSet\Services\viostor\StartOverride /fSelect the instances for which you plan to change the instance type and click Run. Ignore any "not found" error messages.
After the command is successfully executed, you can change the instance type in the ECS console.
In-instance (run commands manually)
Log on to the Windows instance for which you plan to change the instance type.
Press
Win+R, enterpowershell, and pressEnterto openPowerShell.Run the following commands to delete the related registry information. Ignore any "not found" error messages.
reg delete HKLM\SYSTEM\CurrentControlSet\Services\stornvme\StartOverride /f reg delete HKLM\SYSTEM\CurrentControlSet\Services\AliNVMe\StartOverride /f reg delete HKLM\SYSTEM\CurrentControlSet\Services\viostor\StartOverride /fAfter the commands are successfully executed, you can change the instance type in the ECS console.
In-instance (use the Cloud Assistant plugin)
Log on to the Windows instance for which you plan to change the instance type.
Press
Win+R, enterpowershell, and pressEnterto openPowerShell.Run the following commands to switch to the Cloud Assistant path and delete the related registry information. Ignore any "not found" error messages.
cd (Get-ChildItem "C:\ProgramData\aliyun\assist\" -Directory | Where-Object { $_.Name -match '^\d+(\.\d+){2,3}$' } | Sort-Object { [version]$_.Name } -Descending | Select-Object -First 1).FullName ./acs-plugin-manager.exe -e -P ACS-ECS-ScsiNvmeBootfixAfter the command is successfully executed, you can change the instance type in the ECS console.