Troubleshooting Windows Server VM Reboot Loop & INACCESSIBLE_BOOT_DEVICE on XCP-ng
Document Purpose:
This guide documents the process for diagnosing and recovering a Windows Server 2019/2022 VM running on XCP-ng / Xen Orchestra that becomes stuck in a reboot loop or shows the blue screen:
STOP CODE: INACCESSIBLE_BOOT_DEVICE
1. Symptoms
1.1 Silent Reboot Loop
- VM resets immediately after attempting to boot.
- No Windows logo appears, or it appears only briefly.
- No BSOD is displayed; the VM simply restarts.
1.2 Visible BSOD
The VM may show a blue screen with:
INACCESSIBLE_BOOT_DEVICE
1.3 WinPE is Accessible
- Server can boot from the Windows ISO.
- Command Prompt from recovery environment works.
- OS drive and files are visible and readable.
- Filesystem checks (chkdsk, sfc) may already pass.
2. Likely Root Causes
| Area | Description |
|---|---|
| Corrupted Xen PV Drivers | Network/interface drivers crash early in boot, causing instant resets. |
| Crash-Suppressing Drivers | xencrsh.sys and related drivers can reboot the VM before a BSOD is displayed. |
| Bootloader / EFI Misalignment | EFI partition or BCD is pointing to the wrong Windows installation or wrong disk. |
| VM Boot Mode Conflict | VM is running in PVHVM while OS expects HVM (or vice-versa), causing storage initialization failure. |
| Driver Mismatch After Updates | Windows Update or guest tools update changes the boot driver stack; Xen PV drivers no longer match. |
3. Boot into Windows Recovery (WinPE)
- Attach the Windows Server ISO to the VM.
- Boot the VM from the ISO.
- Select Repair your computer > Troubleshoot > Command Prompt.
4. Identify the Windows Volume
In Command Prompt (WinPE):
diskpart
list vol
Locate the main NTFS partition (often around 199 GB). This is usually the OS drive.
If it has no letter, assign one:
select vol <OS_VOLUME_NUMBER>
assign letter=C
exit
(Replace <OS_VOLUME_NUMBER> with the correct volume number.)
5. Navigate to the Drivers Folder
From Command Prompt:
C:
cd \Windows\System32\drivers
If C: does not work, try D: or E: until cd \Windows\System32\drivers succeeds.
6. List All Xen Drivers
dir xen*.*
Typical output will include some of the following:
xenvbd.sys
xenbus.sys
xendisk.sys
xeniface.sys.disabled
xennet.sys.disabled
xenvif.sys.disabled
xenfilt.sys.disabled
xencons.sys.disabled
xencrsh.sys
xen.sys
Exact names may vary slightly depending on guest tools version.
7. Ensure Boot-Critical Xen Drivers Are Enabled
These three drivers are required for disk access during boot:
xenvbd.sys– virtual block device (disk I/O)xenbus.sys– Xen device bus driverxendisk.sys– disk boot interface
If any of them are present with a .disabled suffix, re-enable them:
ren xenvbd.sys.disabled xenvbd.sys
ren xenbus.sys.disabled xenbus.sys
ren xendisk.sys.disabled xendisk.sys
Verify each:
dir xenvbd.sys
dir xenbus.sys
dir xendisk.sys
They must appear without .disabled or .bad.
8. Disable Non-Essential Xen Drivers (Common Crash Sources)
The following drivers frequently cause early boot crashes or silent reboots and can safely be disabled during recovery:
| Driver | Purpose | Action During Recovery |
|---|---|---|
xencrsh.sys |
Crash handler (can suppress BSOD and reboot instead) | Disable |
xeniface.sys |
Interface driver | Disable |
xennet.sys |
Xen network driver | Disable |
xenvif.sys |
Virtual interface driver | Disable |
xenfilt.sys |
Filter driver | Disable |
xencons.sys |
Console / communication driver | Disable |
xensvc.sys (if present) |
Xen service | Disable |
xen.sys |
Legacy Xen stub driver | Disable |
Disable the above by renaming them. Example:
ren xencrsh.sys xencrsh.sys.disabled
ren xeniface.sys xeniface.sys.disabled
ren xennet.sys xennet.sys.disabled
ren xenvif.sys xenvif.sys.disabled
ren xenfilt.sys xenfilt.sys.disabled
ren xencons.sys xencons.sys.disabled
ren xen.sys xen.sys.disabled
(If a file does not exist, Windows will report that the file cannot be found. This is safe; move on to the next line.)
Verify which drivers are disabled:
dir *.disabled
dir *.bad
9. Repair the Bootloader (EFI & BCD)
After cleaning up drivers, rebuild the EFI boot configuration.
9.1 Mount the EFI System Partition
diskpart
list vol
Locate the small FAT32 volume (~100 MB). This is usually the EFI System Partition.
select vol <EFI_VOLUME_NUMBER>
assign letter=S
exit
9.2 Rebuild EFI Boot Files with BCDBOOT
bcdboot C:\Windows /s S: /f UEFI
Expected output:
Boot files successfully created.
10. Force VM to Show BSOD (Optional but Useful)
If the VM was previously rebooting without any BSOD, it can be useful to disable automatic recovery so the stop code is visible.
bcdedit /store C:\boot\bcd /set {default} recoveryenabled No
bcdedit /store C:\boot\bcd /set {default} bootstatuspolicy ignoreallfailures
After this, a failing boot should display an actual Blue Screen with a STOP code instead of silently rebooting.
11. Adjusting VM Virtualization Mode (HVM vs PVHVM)
Windows can also fail with INACCESSIBLE_BOOT_DEVICE if the VM’s virtualization mode conflicts with the installed drivers.
11.1 Using XCP-ng CLI to Force HVM Mode
- SSH into the XCP-ng host.
- List the VM:
xe vm-list name-label=MSLS-DC01_COPY
Copy the VM’s UUID.
- Force BIOS/HVM boot and clear PV bootloader:
xe vm-param-set uuid=<VM-UUID> HVM-boot-policy="BIOS order"
xe vm-param-set uuid=<VM-UUID> PV-bootloader=""
This makes the VM boot like a standard hardware virtual machine using generic Microsoft disk drivers, bypassing some PV boot dependencies.
12. Reboot and Test
- Detach the Windows ISO from the VM.
- Reboot the VM normally.
- Observe behavior:
- If Windows boots successfully, proceed to reinstall XCP-ng Guest Tools.
- If a BSOD still appears, note the exact STOP code and driver name (if shown).
13. Reinstall XCP-ng Guest Tools (After Successful Boot)
- Open Xen Orchestra or XCP-ng Center.
- Select the VM and choose Install Guest Tools.
- Inside the guest OS, open the mounted tools ISO and run
setup.exe. - Follow the wizard to install or repair guest tools.
- Reboot the VM and confirm it boots cleanly with PV drivers loaded.
14. If INACCESSIBLE_BOOT_DEVICE Persists
If the VM still stops with INACCESSIBLE_BOOT_DEVICE after driver cleanup, EFI rebuild, and HVM mode testing, additional steps may be required:
- Restore registry hives from
C:\Windows\System32\config\RegBack. - Perform an in-place OS repair/upgrade using the Windows setup (keep files and settings).
- Restore the VM from a known-good snapshot or backup.
These steps are scenario-specific and should be documented once a final working solution for this particular VM is determined.
15. Document Status
- Status: In progress — VM still presenting
INACCESSIBLE_BOOT_DEVICEduring some tests. - Completed: Filesystem checks, DISM/SFC, Xen driver isolation, crash handler disablement, EFI/BCD rebuild.
- Next actions: Finalize working combination of:
- Driver set (which Xen drivers remain enabled), and
- VM virtualization mode (HVM vs PVHVM)
Once stable, append the final resolution steps, root cause summary, and preventive recommendations for future Windows Server deployments on XCP-ng.
No Comments