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.
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 Instance Console Connections.
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.
- Create a VNC console connection for the instance.
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
Recovering the Boot Volume
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.
- Attach the boot volume to the second instance as a data volume. For more
information, see Attaching a Volume.To attach the boot volume as a data volume
- Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
- Click the instance that you want to attach a volume to.
- Under Resources, click Attached Block Volumes.
- Click Attach Block Volume.
- Select iSCSI for the volume attachment type.
- In the Block Volume Compartment drop-down list, select the compartment.
- Choose the Select Volume option and then select the volume from the Boot Volume section of the Block Volume drop-down list.
- Select Read/Write as the access type.
When the volume's icon no longer lists it as Attaching, proceed with the next steps.
- Connect to the second instance, see Connecting to a Windows Instance for more information.
- 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
IsMultiEnabledto true. For example:
Set-Service -Name msiscsi -StartupType Automatic Start-Service msiscsi New-IscsiTargetPortal –TargetPortalAddress 169.254.2.4 Connect-IscsiTarget -NodeAddress iqn.2015-02.oracle.boot:uefi -TargetPortalAddress 169.254.2.4 -IsPersistent $True -IsMultipathEnabled $True
- Open Computer Management and navigate to Storage, and then Disk Management.
- Select the new disk and mark it Online.
- Click This PC and then right-click on the new disk and select Properties.
- Navigate to Tools, Error Checking, and then Check.
- Select Scan Drive and fix issues as they come up.
- Mark the new disk Offline.
- Open iscsi initiator with administrator privileges.
- In Favorite Targets, remove the iscsi target of the attached volume.