Windows fails to boot
This is one way to recover a Windows VM that is not starting anymore.
Basic idea is to attach the disk with broken Windows to another Windows machine and fix it with Windows tools.
Step by step
Stop VM, create a snapshot
Before doing anything, take a snapshot of the broken Windows VM. This will give you more peace of mind when making changes to the disk. Make sure to stop the VM first, taking a snapshot will fail if VM is running and the Windows Boot Manager is showing.
Create a temporary fixing machine
Create a Windows VM that will be used for fixing. No special requirements here.
Update disk signature
Since all the Windows VMs are all copies of one installed Windows, their disk ID is the same and it will cause conflicts if two disks with the same ID are attached. So, log in to the temporary fixing Windows and change its disk ID. Here’s one way to do it: https://www.thewindowsclub.com/disk-signature-collision-problem
Detach broken disk
Check the broken VM details, make note of VM UUID and disk UUID. Admin API can be used for detaching and attaching: https://documenter.getpostman.com/view/2599901/RznLEagg?version=latest#7da63e66-e50c-4e0c-8e55-733a78194dd0
Detach the disk with broken Windows from the VM.
Attach broken disk to temporary Windows
Find out UUID of temporary Windows VM, use https://documenter.getpostman.com/view/2599901/RznLEagg?version=latest#60e48563-c63b-4799-803a-3ad8ae36cd11 admin API to attach broken disk to the temporary Windows.
Access the disk in temporary Windows
Open Disk Management, right click on Disk 1, bring it Online.
Fix it!
Now you can run chkdsk e:
or any other fixing techniques you can think of. Maybe fix boot configuration with bcdboot
. Once you’re happy, take the disk offline again.
Detach, attach
Do the reverse with admin API, detach from temporary fixing Windows and attach to the original broken VM.
Boot and check
Now that the hopefully fixed disk is back at its origin, Start it and check Terminal. Windows will work on some updates for some time, whatever that means and will hopefully start normally.
Cleanup
Delete the temporary fixing VM. If you’re happy with the result, you can also delete the snapshot that you created in the first step.