When you replace computer or server hardware (motherboard, drive controller, etc.), restore a system image from a backup or migrate a physical host into the virtualization environment (P2V), the BSOD with error 0x0000007B can appear at the first time you boot Windows Server 2008 R2 or Windows 7.
This stop code corresponds to the INACCESSABLE_BOOT_DEVICE error and is related to the difference of the hard disk controller of a new server (a computer or a virtual machine) from the original equipment. When booting, the driver necessary to boot from the new controller is not loaded. Windows cannot be started due to it.
An administrator may encounter the error 0x0000007B in the following cases:
- When restoring an OS from a backup to another physical computer or a Hyper-Vย / VMware / VirtualBox virtual machine (the recovery from Bare Metal Recovery to another hardware, as an individual case);
- When migrating a physical system using a computer image (created for example using disk2vhd) and deploying a new virtual machine from this image;
- After switching the SATA controller mode in BIOS from AHCI to IDE or vice versa;
- When replacing a motherboard and/or a hard drive controller.
In my case, the problem appeared when migrating a physical server running Windows Server 2008 R2 into VMWare environment. The blue screen appeared at the first startup of the VM.
In the debug mode you can see that Windows boot stops at the stage of loading the CLASSPNP.SYS driver.
To fix the error 0x0000007B, you need to boot from any Windows installation media (with Windows 7 / 2008 R2 or higher) or a boot disk (for example, DART). If you use the Windows installation disk, press Shift+F10 on the first installation screen (then you selecting a language and keyboard layout). The command prompt window appears, where you must execute the command:
Regedit.exe
In the Registry Editor window, go to the registry hive HKEY_LOCAL_MACHINE and select File -> Load Hive. On the local server drive (donโt confuse it with the WinPE disk), select the file \Windows\System32\config\SYSTEM. This file stores the system part of the registry your local Windows copy.
Thus, you will mount (for example, under the name local_hkey) the registry hive of your system from the hard drive to the registry editor.
In the loaded hive, go to registry key HKEY_LOCAL_MACHINE\local_hkey\ControlSet001\services\.
Find these registry keys:
- Atapi;
- Intelide;
- LSI_SAS.
Find REG_DWORD parameters with the name Start in each of these keys and change their values to 0 (0x00000000).
If you had switched your SATA controller mode to AHCI before this error appeared, you should also set Start = 0 in the msahci section.
To save the changes in the local registry file on the disk, go to the registry key HKEY_LOCAL_MACHINE\local_hkey and select Unload Hive in the menu.
Now you can restart your server. Windows should boot normally. It will search and install drivers for your new drive controller.
In case of VMWare, you will just have to install VMWare Tools.
If after these changes your Windows still returns the same error INACCESSABLE_BOOT_DEVICE when booting, it means you are using some other type of the disk controller. Try to change the value of the Start parameter in HKEY_LOCAL_MACHINE\local_hkey\ControlSet001\services according to the table below.
Windows Service Name | VMWare Virtual Machine | Physical PC Running Windows x64 with Native SATA Adapter | Physical PC with RAID Controller |
aliide | 3 | 3 | 3 |
amdide | 3 | 3 | 3 |
atapi | 0 | 0 | 0 |
cmdide | 3 | 3 | 3 |
iastorv | 3 | 3 | 3 |
intelide | 0 | 3 | 3 |
msahci | 3 | 0 | 0 |
pciide | 3 | 0 | 3 |
viaide | 3 | 3 | 3 |
LSI_SAS | 0 | 3 | 3 |
36 comments
Thanks for the guide, it’s very helpful.
In some cases, 0x0000007b is caused by a Group Policy setting. A fix can be found here:
https://superuser.com/questions/1023131/virtualbox-windows-raw-disk-guest-blue-screen-error-0x0000007b-at-boot/1432826#1432826
The best solution I found… Thank you.
God bless you…really.
It worked like a charm for me.
Thanks again
Andrea
Thanks man, Very cool solution.
It was worked for me too. You are a lifesaver.
Migrating a VM from Xenserver to Vmware, significant hardware change.
Worked like a charm after many hours researching.
Thanks!!!
Thank you so much for this worked perfectly for a P2V disaster recovery emergency.
Also confirmed it fixes P2V in Hyper-V environment.
You are awesome, I can’t thank you enough, 7 sleepless nights ended by your awesome post.
Thank you
Many Thanks. Really solve my problem.
Rarely do I comment on these posts, this one saved me on a server that has been taken P2V (Xenserver), V2V (Xen to HyperV), and now V2V (crashing HyperV to VMware)…I think the LSI_SAS setting was there from XENSERVER. Thanks!
Hi. I get this exact error, but these steps don’t work for me. Using a WSB and restoring from an HP DL380 to a Hyper V environment. Your table at the bottom doesn’t list Hyper V, only VMWare – would the setting sbe the same? I have tried them and still the BSOD. Any thoughts? Many thanks.
Wow can’t believe this worked! Thanks so much!!
Wow…Thank you so much. I am very grateful. Thank you once again! Excellent article, superb website.
Thank you so much, that table saved my life! I attached a Xenserver VM disk to VMware, putting LSI_SAS to 0 fixed my BSOD.
Wow! Wonderful! Works like a charm for Hyper-V as well.
Congrats!!!
YES – it worked for HYPER-V (@DOUG: for some reasons, I had to do it twice.. first found all start for atapi, intelide and lsi_sas as 0, then tried VMWARE settings, then checked again and set atapi, intelide and lsi_sas to 0).
THANK YOU.
Hi Guido. I still couldn’t get it to work, so I gave up and restored it to physical, then backed up with Veeam, then restored to virtual ….long-winded, but it got me where I needed!
I really thought that this would be a hard one, but the solution was rather easy ๐
Thank you very much!
Didn’t boot with a CD, just mounted vhdx file and they followed the regedit instructions. Outstanding! Worked like a charm!
Thanks !! It really saved me ๐
Thank you so much! Really good article, helped me a lot.
Thx you, works for Windows 2008 R2 physical server restore on Hyper-V 2016.
Dude….DUUUUUUDE! You just saved my skin…was trying to P2V two aging Windows Server 2008 installations and one of the two failed to boot.
You regedit-fix did the trick, THANK YOU!
Thank you so much.
I would like to kiss your belly button!
Thanks a lot!
Are you married? No? Wanna be?!
Thank you very much! Rsrsrs
I come here whenever I am stuck with taking servers as vm specially for server 2008 r2
I have BSOD after using VMWARE CONVERTER 6 from Windows 2008R2 running on Oracle Virtual Box moving toESXi 6.5 HP Customized Image. Applying VMWARE Column settings for Services hive works.
After boot i’ve removed VMGuest Additions for Virtual Box and installed VMWARE tools
Thanks
TLB
Thank you! After several tries (hours of tries), thinking that there was a issue with the boot configuration, that solution worked!!
Thanks a lot ๐
You simply _ROCK_! No doubt ๐
Thank you for above writing: they solved my issue ๐
Thanks.
Thank you!
This is the secret sauce for a CloneZilla image to Windows 7 Pro VM on VMWare Workstation.
Hello thanks a Million … (Migrating Windows 2008 64bits from XCP-ng 8.01 to VMWare ESXi 6.5 U3)
I’m almost give up of migrating xenserver windows server 2008 (AD) to vmware esxi 6.5 … I’ve done a script to change registry in order to remove xen keys and worked for all other windows server … but not for windows 2008 server …
I’ve done some extra procedure during boot in order to get a normal boot … I’ve done F8 during windows starting and choose “boot from last known good configuration”
Here you are the script to change registry to eliminate xen keys and I’ve included your tips to change driver keys too …
Before backup and recover a Bare Metal of windows 2008 into VMware ESXi … I’ve copied this script to Desktop of
Windows server 2008 as remove.xen.keys.bat:
After booting media to recover windows, go to cmd prompt and execute remove.xen.keys.bat:
reg load HKLM\temphive d:\windows\system32\config\SYSTEM
# reg query HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\XEN /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenagent /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenbus /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenbus_monitor /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xendisk /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenfilt /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xeniface /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\XenInstall /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xennet /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\XenSvc /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenvbd /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Services\xenvif /f
# reg query HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\XEN /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenagent /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenbus /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenbus_monitor /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xendisk /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenfilt /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xeniface /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\XenInstall /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xennet /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\XenSvc /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenvbd /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenvif /f
# reg query HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\XEN /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xenagent /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\XENBUS /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xenbus_monitor /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xendisk /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xenfilt /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xeniface /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\XenInstall /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xennet /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\XenSvc /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xenvbd /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\xenvif /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\XenSvc /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenvbd /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\xenvif /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Control\Class\{4d36e97d-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Control\Class\{4d36e97d-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Control\Class\{4d36e97d-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg delete HKEY_LOCAL_MACHINE\temphive\CurrentControlSet\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet001\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg delete HKEY_LOCAL_MACHINE\temphive\ControlSet002\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318} /v UpperFilters /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\ATAPI /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\intelide /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\LSI_SAS /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet001\Services\msahci /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\ATAPI /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\intelide /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\LSI_SAS /v Start /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\temphive\ControlSet002\Services\msahci /v Start /t REG_DWORD /d 0 /f
reg unload HKLM\temphive
Am I the only one that this didn’t work for? ๐ญ๐ญ
You are a angel sent from heaven. Thank you so much for creating this article. Saved me so much time.
Thank you very much. I solved P2V boot problem with these steps.
Thank you very much!
Solved a Windows 7 P2V VMWare Standalone Converter boot problem with these steps.