Gargh! Why is nothing perfect?!
Right, now that that’s done, I’ve just had an issue with a Windows Server 2012 R2 server which was stuck in constant reboot cycling. An update was installing and then immediately failing with a happy-go-lucky-message that read “We couldn’t complete the updates. Undoing changes. Don’t turn off the server”. It may as well have read “Go boil your head!” for all the good that it did me.
Now’s a good time to bemoan the lack of decent offline patch handling in Windows. Within a running live Windows instance the update handling is pretty good and, clearly, you have access to a tonne of tools to help you. However when Windows is offline there’s nothing, bugger all. As my Nan would have said “You’ll be up the creek and told to f*** off!”. What Windows needs is an F8 option to show pending updates, and allow you to easily disable them, remove them, whatever.
Anyway, after desperately trying to tell VMware to slow down enough for me to F8 and get Windows in to recovery mode, I finally got rid of the updates and after a few reboots all was good.
- Desperately hit F8 when Windows boots and click Recover Windows. Alternatively you can also boot from the Windows Server 2012 R2 ISO/DVD and choose repair.
- Go in to the Advanced Repair options then choose Command Prompt.
- Enter your recovery password if asked to do so.
- At the command prompt type diskpart to enter the diskpart tool
- Then type list volume to show the current volumes. Note down the drive letter that relates to your servers primary drive. In my case it was D.
- Type exit to exit the diskpart tool.
- Now type the following being sure to change D to the drive letter from the previous step.
1move d:\Windows\WinSXS\Pending.xml d:\Windows\WinSXS\Pending.old
- This will remove the xml that details any pending updates.
- Exit the command prompt and reboot your server.
You will find that your server might reboot several times as it tries to recover from this. But bear with it and you should be good to go.