After a restore a virtual machine failed to start, the screen remained black and the following error was displayed: “Error loading operating system”
All standard solutions like “chkdsk /r”, “chkdsk /p”, fixmbr, fixboot,… did not work.
After some deeper research I noticed that there may be a problem with the disk geometry of the virtual disk. I guess that this occured when we aligned a lot of virtual machines some times ago or something happend during the restore.
Fortunately I found a tool that helped to clean up the mess and made the virtual machine bootable.
Solution:
- Attach the broken boot disk (vmdk) to another virtual machine
- download the tool “Testdisk“
- unzip the tool and start testdisk_win.exe on the virtual machine you use for repair
Select the disk you want to repair:
Now select “MBR Code – Write TestDisk MBR code to first sector”:
- confirm “Write a new copy of MBR code to first sector” with y (yes)
- confirm “Write a new copy of MBR code, confirm” with y (yes)
Select OK after the new copy of MBR code has been written successfully.
Now select “Advanced – Filesystem Utils”:
In the next window select “Boot”:
If there are mismatches or problems you will get a view like this:
to solve this, select “Rebuild BS”
- when the rebuild was successfull, leave the tool using “quit” till all windows are closed
- unattach the virtual disk from the virtual machine
- power on your broken Virtual machine – it should now boot without any problems!