Boot error code 0xC000000F in an Azure VM
Applies to: ✔️ Windows VMs
Original KB number: 4010130
This article provides solutions to an issue where Windows VM doesn't start and generates errors.
Symptom
Windows doesn't start and generates the one of the following errors:
Error 1:
File: \Windows\system32\winload.exe
Status: 0xc000000f
Info: The application or operating system couldn't be loaded because a required file is missing or contains errors.
Error 2:
File: \Boot\BCD
Status: 0xc000000f
Info: The Boot Configuration Data for your PC is missing or contains errros
Error 3:
File: \Windows\System32\drivers\<Binary>
Status: 0xc000000f
Info: The operating system couldn't be loaded because a critical system driver is missing or contains errors.
In this message, <BINARY> represents the actual binary file that's found.
Cause
This issue occurs when one of following conditions is true:
- The Boot Configuration Data (BCD) is corrupted.
- The reference to DEVICE and OSDEVICE on the boot configuration data is missing or unknown.
- The binary displayed on the screenshot (other than winload.exe or \boot\BCD) is missing from the operating system disk.
Resolution
Try restoring the VM from a backup
If you have a recent backup of the VM, you may try restoring the VM from the backup to fix the boot problem. If restoring the VM from backup isn't possible, follow the steps in Resolution for error 1 and error 2.
Resolution for error 1 and error 2
Step 1: Attach the OS disk of the VM to another VM (troubleshooting VM) as a data disk
Delete the virtual machine (VM). Make sure that you select the Keep the disks option when you do this.
Attach the OS disk as a data disk to another VM (a troubleshooting VM). For more information, see How to attach a data disk to a Windows VM in the Azure portal.
Connect to the troubleshooting VM. Open Computer management > Disk management. Make sure that the OS disk is online and that its partitions have drive letters assigned.
Identify the Boot partition and the Windows partition. If there's only one partition on the OS disk, this partition is the Boot partitionandthe Windows partition.
If the OS disk contains more than one partition, you can identify them by viewing the folders in the partitions:
- The Windows partition contains a folder named "Windows," and this partition is larger than the others.
- The Boot partition contains a folder 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.
Step 2: Repair the Boot Configuration data
Run the following command line as an administrator, and then record the identifier of Windows Boot Loader (not Windows Boot Manager). The identifier is either the tag {default} or a 32-character code and it looks like this: xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. You will use this identifier in the next step.
bcdedit /store <Boot partition>:\boot\bcd /enum /v
Repair the Boot Configuration data by running the following command lines. You must replace these placeholders by the actual values:
Note
This step is applied to most Boot configuration data corruption issues. You need perform this step even if you see the Device and OSDevice are pointing to the correct partition.
<Windows partition> is the partition that contains a folder named "Windows."
<Boot partition> is the partition that contains a hidden system folder named "Boot."
<Identifier> is the identifier of Windows Boot Loader you found in the previous step.bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} device partition=<boot partition>: bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} integrityservices enable bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} device partition=<Windows partition>: bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} integrityservices enable bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} recoveryenabled Off bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} osdevice partition=<Windows partition>: bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} bootstatuspolicy IgnoreAllFailures
Detach the repaired OS disk from the troubleshooting VM. Then, create a new VM from the OS disk.
Resolution for error 3
First, follow the instructions in the Attach the OS disk of the VM to another VM (troubleshooting VM) as a data disk section. (This section is from the first part of the Resolution for errors 1 and 2.) Then, repair or replace the system binary (.sys) file by following these steps:
Repair the corrupt binary file
Open an elevated CMD prompt and run chkdsk on the disk:
chkdsk <drive-letter>: /F
Replace the corrupt binary file
On the attached disk, browse to the location of the binary file that's displayed in the error message.
Rename the file from <binary-name>.sys to <binary-name>.sys.old.
On the attached disk, browse to the \Windows\WinSxS folder. Then, search for the binary file that's displayed in the error message. To do this, run the following command at a command prompt:
dir <binary-name> /s
The command lists all the different versions of the binary file together with the created date. Copy the latest version of the binary file to the \Windows\System32\Drivers folder by running the following command:
copy <drive>:\Windows\WinSxS\<directory-where-file-is>\<binary-name>.sys <drive>:\Windows\System32\Drivers\
For example, see the following console output:
E:\Windows\WinSxS>dir ACPI.sys /s Volume in drive E has no label. Volume Serial Number is A0B1-C2D3 Directory of E:\Windows\WinSxS\amd64_acpi.inf_0123456789abcdef_6.3.9600.16384_none_cdef0123456789ab 11/21/2014 07:48 PM 94,989 acpi.sys 1 File(s) 94,989 bytes Directory of E:\Windows\WinSxS\amd64_acpi.inf_0123456789abcdef_6.3.9600.16384_none_89abcdef01234567 11/21/2014 07:48 PM 119,547 acpi.sys 1 File(s) 119,547 bytes Directory of E:\Windows\WinSxS\amd64_acpi.inf_0123456789abcdef_6.3.9600.16384_none_456789abcdef0123 11/21/2014 04:06 PM 533,824 acpi.sys 1 File(s) 533,824 bytes Total Files Listed: 3 File(s) 748,360 bytes 0 Dir(s) 123,967,512,576 bytes free E:\Windows\WinSxS>copy E:\Windows\WinSxS\amd64_acpi.inf_0123456789abcdef_6.3.9600.16384_none_cdef0123456789ab\acpi.sys E:\Windows\System32\Drivers\ 1 file(s) copied. E:\Windows\WinSxS>
Note
If the system binary file can't be renamed, take ownership of the file. This action gives you full access to this file.
The example console output shows volume E as an example. The actual letter should reflect the faulty drive (the OS disk attached as a data disk on the troubleshooting VM).
If the latest binary doesn't work, you can try the previous file version to obtain an earlier system update level on that component.
If the only binary that's returned in this step matches the file that you're trying to replace on the affected VM, and if both files have the same size and time stamp, you can replace the corrupted file by copying it from another working VM that has the same OS and, if possible, the same system update level.
Detach the repaired disk from the troubleshooting VM. Then, create a VM from the OS disk.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for