Recovering a Corrupted Boot Volume for Windows Instances
If your instance fails to boot successfully or boots with the boot volume set to read-only access, the instance's boot volume may be corrupted. While it is rare, boot volume corruption can occur in the following scenarios:
When an instance experiences a forced shutdown using the API.
When an instance experiences a system hang due to an operating system or software error and a graceful reboot or shutdown of the instance times out, and then a forced shutdown occurs.
When an error or outage occurs in the underlying infrastructure and there were critical disk writes pending in the system.
Important
In most cases a simple reboot will resolve boot volume corruption issues, so this is the first action you should take when troubleshooting this.
When a boot volume is detached from a Windows instance, Windows alters that volume's boot configuration data (BCD). As a result, you might need to restore the BCD to be able to reattach the boot volume and boot the original instance. For more information, see the Comprehensive Guide to Recovering and Restoring Windows Boot Volumes in OCI.
In most cases a simple reboot will resolve boot volume corruption issues, so this is the first action you should take when troubleshooting this.
This topic describes how to determine if your Windows instance's boot volume is corrupted and what steps to take to troubleshoot and recover the corrupted boot volume. For Linux-based instances, see Recovering a Corrupted Boot Volume for Linux-Based Instances.
Detecting Boot Volume Corruption
When Windows operating systems detect boot volume corruption, the instance is usually able to recover from it by automatically repairing the file system. You can use a VNC console connection to verify that the instance isn't experiencing a system hang while repairing the file system, or to detect if there are other issues. VNC console connections enable you to see what's displayed through the VGA port, for more information about the VNC console, see Troubleshooting Instances Using Instance Console Connections.
Important
VNC console connections only work for virtual machine (VM) instances launched on October 13, 2017 or later, and bare metal instances launched on February 21, 2019 or later. If your instance does not support VNC console connections, proceed to Recovering the Boot Volume.
Check what is displayed in the VNC console to see if the instance is stuck in the boot process or if it is in the recovery partition.
Tip
For Windows Server 2012 and later versions, if the instance has booted into the recovery partition it may be possible to directly perform the steps to recover the boot volume in the recovery partition.
Detaching the Boot Volume 🔗
If you have detected that your instance's boot volume is corrupted, you need to detach the boot volume from the instance before you can begin troubleshooting and recovery steps.
To troubleshoot and recover the corrupted boot volume, you need to attach the boot volume to a second instance as a data volume. For the second instance we recommend that you use an instance running an operating system that most closely matches the operating system for the boot volume's instance, and you should only attach boot volumes for Windows instances to other Windows instances. The second instance must be in the same availability domain and region as the boot volume's instance. If no existing instance is available create a new Windows instance using the steps described in Creating an Instance.
Once you have the second instance, make sure you can log in to the instance and that it is functional before proceeding with the recovery steps. After you have confirmed that the instance is functional perform the following steps.
Connect to the volume, see Connecting to a Volume on a Windows Instance for more information. Since you are attaching a boot volume as a data volume you
must also run the Connect-IscsiTarget and set
IsMultiEnabled to true. For
example: