I am following the procedure GCP defined here: https://cloud.google.com/compute/docs/instances/windows/creating-windows-persistent-disk-snapshot#re...
THE ISSUE:
After I create a new disk from my snapshot and CLEAR its READONLY flag (per these instructions above), I am stuck with the following ERROR in the GCP SERIAL CONSOLE and the new VM refused to boot.
It looks like the new VM "hardware" changed enough to make windows hate me. I have selected all the identical virtual machine settings.
Has anyone been successful at this?
My overall intent is to provide a way to clone a production Windows Server into our test project or roll back when a patch/upgrade "boogers" up the server.
Solved! Go to Solution.
I am not sure why it took me so long to find it, but I found this article: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/error-code-0xc000000e
It turns out that the Boot Configuration Data (BCD) had been messed up during the shadowcopy process. Why? Dunno...
But using the command :
bcdedit /store D:\boot\bcd /enum /v
I am able to see several of the "device" value were set to unknown.
then using the following command where I replace <identifier> with "Windows Boot Loader". Identifier AND <Boot partition> with "D" (drive letter of drive after it was mounted for repair). After the changes, I was able to attach this drive to a NEW GCP VM and it booted.
bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} device partition=<boot partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} integrityservices enable
bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} device partition=<Windows partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} integrityservices enable
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} recoveryenabled Off
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} osdevice partition=<Windows partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} bootstatuspolicy IgnoreAllFailures
I am not sure why it took me so long to find it, but I found this article: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/error-code-0xc000000e
It turns out that the Boot Configuration Data (BCD) had been messed up during the shadowcopy process. Why? Dunno...
But using the command :
bcdedit /store D:\boot\bcd /enum /v
I am able to see several of the "device" value were set to unknown.
then using the following command where I replace <identifier> with "Windows Boot Loader". Identifier AND <Boot partition> with "D" (drive letter of drive after it was mounted for repair). After the changes, I was able to attach this drive to a NEW GCP VM and it booted.
bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} device partition=<boot partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {bootmgr} integrityservices enable
bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} device partition=<Windows partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {<Identifier>} integrityservices enable
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} recoveryenabled Off
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} osdevice partition=<Windows partition>:
bcdedit /store <Boot partition>:\boot\bcd /set {<identifier>} bootstatuspolicy IgnoreAllFailures