This is probably specific to VM's. 1) Increase cores from 1 to something higher.
For me this had an immediate and dramatic effect on both CPU activity and RAM usability. Almost lost among the comments between KB hotfix/update answers, this passing mention in @Eugene K's comment needs an answer in its own right.
Note: I prepared this as an answer to
Windows Update doesn't work and consumes 100% of CPU (Win7 SP1), which is marked a duplicate of this one (though this one doesn't actually mention 100% CPU). I find I am unable to post my answer there as the answer controls are missing, perhaps related to marking it as a duplicate, so this seems the next best place as folks trying to solve the 100% CPU question get given the link here.
There are several different issues with Windows Update, which, superficially, all sound the same. To be clear: this particular question is about Windows Update consuming 100% CPU without anything seeming to happen, and remaining in that state over a long period of time. My Windows 7 VM was in just this state. Task Manager showed 100% CPU being consumed by svchost.exe, the generic "parent" process Windows uses to "host" and run individual services. By right-clicking svchost.exe and choosing "Go to service", I was able to see which service was the culprit, and the culprit was wuauserv, the Windows Update Automatic Updates service.
I tried turning of IPV6, something suggested among the answers (which I thought I'd already done on all machines after other issues) but it made no difference in this case. I was loth to start picking and choosing KB hotfixes and updates, when there are a number of similar issues with Windows Update; I'd much prefer it to apply all the updates itself, in the right order, if there's a way to get it in a state where it will do that. I left it for 24hrs and when I looked again it was still at 100%—and, moreover, the update history showed that it had not even installed a single update in that time. The last one had completed the previous day, over 24hrs ago. A couple of restarts made no difference: it just went straight back to 100% CPU.
Turning then to the question of Hyper-V, I looked and found where you can configure the number of processors for a VM. The setting is greyed out when the VM is running, so you must shut it down to change the setting:
I increased the number of processors from 1 to 2 and saw an immediate change: the VM now actually seemed to be doing something. Both CPU and memory usage rose and fell constantly. I also noticed that the VM seemed to be able to utilize more of the memory allocated to it: previously, when stuck at 100% CPU, it had been using 2G out of 4G bytes of RAM, whereas now, rising and falling, it was using up to 3G. I shut it down and increased the number of processors again, from 2 to 4, and saw a corresponding increase in the effects: a great deal of continuing activity in Task Manager, different in each of the 4 processors, and again, an increase in the amount of memory it could utilize, still rising and falling but now approaching the full 4G allocated. It seemed to be tearing through the updates now. And CPU usage, rapidly zigzagging too, was now typically around 25%, meaning from this point on the machine became far more responsive and usable while updates were being processed.
To recap, there are a number of different problems that can cause Windows Update to hang or run slowly, and Microsoft have published a variety of hotfixes and updates in this general area. So any time this comes up, it's quite likey there's more than one contributing factor. In any given case, upping the number of Hyper-V processors configured may or may not be the complete answer, but there's no doubt that doing so brings a dramatic improvement in the machine's ability to utilize both CPU and RAM.
Might be a similar issue to this? http://superuser.com/questions/962070/windows-7-windows-update-hangs-on-checking-for-updates
– Jake Fisher – 2015-10-20T02:13:38.7173I recently had the same problem and solved it by shutting down windows and then restarting it. A mere reboot was not enough. Only at shutdown it started installing updates and then the next boot it found the next set up updates. – Hennes – 2015-12-18T23:19:02.093
1
Neither magicandre1981 nor Moab's answers assisted me. After following both procedures (on a virtualbox I reset back to the same snapshot) I still had the hung update search. I did find a fix though! I have no idea what update got everything sorted out but using this sledge hammer I was able to get a bunch downloaded and installed. Then did a normal windows update and it had another ~30 and I was all up to date again :)
– HodlDwon – 2016-04-23T22:48:48.320See also OS/2 Museum: Updating Windows for an anecdote.
– a CVn – 2016-05-27T13:14:52.733I'm just duplicating my comment I posted in thread for similar question here for the benefit of others struggling with this:
I just spent couple of days in company of old laptop with 2GB of RAM and can confirm that issue seems to be x64 + poor hardware/insufficient RAM specific. All solutions listed above didn't help to obtain updates while using x64 Windows 7 SP1 Home Basic - really tried them (even twice). Not counting waiting for 4 days as solution I even want to try. But as soon as I switched to x86 edition + manually installed latest "Windows Update Client for Windows 7" it all works. – Mikhail – 2016-09-13T11:23:36.373
@Roger_Tech Your proposed edit is plagiarism. It's also an invalid edit, even if, you quoted and cited the material. – Ramhound – 2016-09-18T19:05:56.613
Use off-line update installer and then start to randomly run msu files after 3-5 restart it will be repaired – user956584 – 2016-10-21T12:39:46.590
The answers here work (upvoted) but read them carefully, chronological order is a thing, folks. My steps were... 1. EasyFix50202, 2. KB3020369, 3. KB3125574, 4. KB3020369 (not required, it told me), 5. KB3172605. After that I had 75 updates that took about 10 minutes to find. Respect the reboot requests. Thank you all for your research and answers. – CAD bloke – 2016-10-31T21:48:47.373
Don't comment tired - the observant among you will note that step 4 repeated step 2. Whoops. – CAD bloke – 2016-11-01T22:27:38.440
See http://wu.krelay.de/en/ for an up-to-date solution.
– oldmud0 – 2016-12-22T23:16:32.5071
If you're on Windows 8.1 and looking for a solution, this worked for me: http://www.overclockers.com/forums/showthread.php/778265-Windows-8-1-Windows-Update-stuck-at-quot-checking-for-updates-quot-SOLUTION TL;DR: install https://support.microsoft.com/en-us/kb/3102812 and https://support.microsoft.com/en-us/kb/3173424 , reboot and re-run Windows Update.
– blade – 2017-05-13T16:20:09.240