This article provides steps to resolve issues where the disk isn't bootable in an Azure Virtual Machine (VM).
Symptoms
When you use Boot diagnostics to view the screenshot of the VM, you'll see that the screenshot displays a prompt with the message 'This is not a bootable disk. Please insert a bootable floppy and press any key to try again...'.
Figure 1
Cause
This error message means the OS boot process couldn't locate an active system partition. This error could also mean that there's a missing reference in the Boot Configuration Data (BCD) store, preventing it from locating the Windows partition.
Start a Remote Desktop connection to the recovery VM.
Open Computer management > Disk management. Make sure that the disk is flagged as Online in the Disk Management console. Note the drive letter that is assigned to the attached system disk.
Identify the Boot partition and Windows partition. If there's only one partition on the OS disk, this partition is both Boot partition and Windows partition.
If the OS disk contains more than one partition, you can identify the partitions by viewing the folders in them:
The Windows partition contains a folder that is named Windows, and this partition is larger than the others.
The Boot partition contains a folder that is named Boot. This folder is hidden by default. To see the folder, you must display the hidden files and folders and disable the Hide protected operating system files (Recommended) option. The boot partition is typically 300 MB~500 MB.
Run the following command as an administrator to create a boot record:
Use the DISKPART tool to check whether the Windows partition is active:
Open an elevated command prompt and open the DISKPART tool.
diskpart
List the disks on the system and look for added disks and proceed to select the new disk. In this example, the new disk is Disk 1.
ps
list disk
sel disk 1
List all the partitions on that disk and then proceed to select the partition you want to check. Usually System Managed partitions are smaller and around 350 MB in size. In the following image, this partition is Partition 1.
ps
list partition
sel partition 1
Check the status of the partition. In our example, Partition 1 is not active.
detail partition
If the partition isn't active, change the Active flag and then recheck the change was done properly.
ps
active
detail partition
Exit the DISKPART tool.
exit
Fix the Disk Partition
Open an elevated command prompt (cmd.exe).
Use the following command to run CHKDSK on the disk(s) and fix errors:
chkdsk <DRIVE LETTER>: /f
Adding the '/f' command option will fix any errors on the disk. Make sure to replace <DRIVE LETTER> with the letter of the attached OS VHD.
Recommended: Before you rebuild the VM, enable Serial Console and memory dump collection
To enable Serial Console and memory dump collection, follow these steps:
Open an elevated command prompt session as an administrator.
Verify that the free space on the OS disk is larger than the memory size (RAM) on the VM.
If there isn't enough space on the OS disk, change the location where the memory dump file is created, and refer that location to any data disk attached to the VM that has enough free space. To change the location, replace %SystemRoot% with the drive letter of the data disk, such as F:, in the following commands.
To enable the OS dump file, run the following load, add, and unload commands to implement the suggested configuration using the reg tool:
Learn to troubleshoot configuration issues that affect connectivity to your Azure-hosted Windows Server virtual machines (VMs). Explore approaches to resolve issues with VM startup, extensions, performance, storage, and encryption.