Issue: Updates were stuck installing at 5% or Cannot instal updates:

1. Amended the 'Automatic Start action' on virtual machine settings to change the delay to 2 seconds, this way you can hold f8 to get to options everytime.

2. Go to troubleshoot / CMD and make sure you find the correct drive to run the commands on from this thread. Drive X: showed on cmd but it was I guess the boot drive and not the one to edit, C; was in my instance. 

3. Run the following on x: 'dism /image:C:\ /cleanup-image /revertpending actions' and reastart Server. If you received error 3017 go to next step.

4. Rename pending.xml file in c:\windows\winsxs to pending.old. 

5. Perhaps try the 'dism /image:C:\ /cleanup-image /revertpending actions' again. Restart. If no luck go to next step.

6. Rename the softwaredistribution folder to oldsoftwaredistribution. This folder is under c:\windows and should be re-inserting automatically when you download windows updates again.

7. Create blank pending.xml file. echo > pending.xml through CMD.

Possible helpful: 

- to see list of windows updates installed type: 'wmic qfe list'
- I also tried turning off the secure boot under virtual machine firmware in case a update didn't like it