How to fix INACCESSIBLE BOOT DEVICE when loading up a Hyper V virtual machine

Ihekwuaba `Okereke Ngadiuba 0 Reputation points
2026-05-12T09:31:51.7933333+00:00

User's image

We are having the challenge of loading up the virtual machine that contains an application that was not accessible. after increasing the storage, and trying to boot the VM up, the vm is stuck in boot loop. How do we get back to the VM without damaging the files inside the VM.

Windows for business | Windows Server | Storage high availability | Virtualization and Hyper-V
0 comments No comments

2 answers

Sort by: Most helpful
  1. Harry Phan 29,755 Reputation points Independent Advisor
    2026-05-12T10:44:16.5166667+00:00

    Hello Ihekwuaba `Okereke Ngadiuba

    The stop code INACCESSIBLE BOOT DEVICE inside a Hyper‑V VM usually indicates that the guest OS cannot see its system disk after a change in storage configuration. Since you expanded the virtual disk, the boot loop suggests either the controller type changed or the disk path is no longer consistent with what the VM expects. First, confirm in the VM settings that the system disk is still attached to the same IDE or SCSI controller and that the .vhdx file path is correct. If the disk was moved or renamed, Hyper‑V may still point to a stale reference.

    If the configuration looks correct, boot the VM into the Windows Recovery Environment by attaching the installation ISO and selecting “Repair your computer.” From there, run bootrec /fixmbr and bootrec /rebuildbcd to rebuild the boot configuration. Also check that the storage driver required by the guest OS (for example, if the disk was switched from IDE to SCSI) is enabled in the registry under HKLM\SYSTEM\CurrentControlSet\Services. A mismatch here will trigger the inaccessible boot device error.

    The key is not to attempt a reinstall, as that would overwrite files. Instead, ensure the disk attachment and controller type match the original configuration, then repair the boot records from recovery mode. If the VM still fails, mount the .vhdx on another VM or host to verify file integrity and back up the application data before further repair attempts. This way you preserve the contents while restoring bootability.


    If the above response helps answer your question, please hit "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    Harry.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-05-12T09:32:13.7766667+00:00

    To recover the VM and avoid data loss, focus on repairing the boot configuration and verifying the Windows/boot partitions rather than reinstalling the OS.

    1. Stop the affected VM and attach its OS disk to a healthy “recovery” VM as a data disk.
    2. In the recovery VM, open Computer Management → Disk Management and confirm the attached disk is Online and has drive letters.
    3. Identify the Windows partition and Boot partition:
      • Windows partition: contains the Windows folder and is usually the largest partition.
      • Boot partition: contains a hidden Boot folder and is typically 300–500 MB.
    4. Run a file system check on the Windows partition (from an elevated command prompt):
         chkdsk <Windows-partition>: /f
      
      Replace <Windows-partition> with the drive letter that contains the Windows folder.
    5. Repair the Boot Configuration Data (BCD):
      • For Generation 1 VMs, run (as administrator):
             bcdedit /store <Boot-partition>:\boot\bcd /enum /v
        
      • For Generation 2 VMs, run:
             bcdedit /store <EFI-partition-letter>:EFI\Microsoft\boot\bcd /enum /v
        
      • Note the Windows Boot Loader identifier (a GUID). Then follow the documented BCDEdit steps to repair the BCD, using the identified <Windows partition>, <Boot partition>, and <Identifier> values.
    6. (Gen1 only) Ensure the Windows/boot partition is marked Active:
      • Still on the recovery VM, open an elevated command prompt and run:
             diskpart
             list disk
             sel disk <disk-number-of-attached-os-disk>
             list partition
             sel partition <system-partition-number>
             detail partition
        
      • If the partition is not Active, run:
             active
             detail partition
        
      • Run exit to leave DiskPart.
    7. Recreate the boot files if needed (Gen1):
      • From an elevated command prompt:
             bcdboot <Windows-partition>:\Windows /S <Windows-partition>:
        
    8. Detach the repaired OS disk from the recovery VM and reattach it to a new or existing VM as its OS disk, then start the VM.

    These steps repair typical causes of the INACCESSIBLE_BOOT_DEVICE error (corrupted BCD or inactive Windows partition) without modifying user data or application files on the disk.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.