Closed vmrob closed 9 years ago
@vmrob haven't tested it recently, but this could be the same problem as the Windows 7 update problem. I've seen that I made my last builds with the dis-updates.ps1
+ win-updates.ps1
scripts.
You might have a look at my 2008_r2/Autounattend.xml.
If this fixes your problem we could fix it in this upstream repo, too.
I'll definitely take a look at that. I'm also interested in trying to get a little more verbosity with the update installer. It looks like it's pretty straightforward to do, I'm just not familiar at all with Windows COM interfaces.
If anyone wants to chime in, it would be appreciated, but otherwise, I'm looking at modifying win-updates.ps1 for more verbosity.
I've added writing a logfile to C:\Windows\Temp\win-updates.log
inside the box that could be viewed after a vagrant up
.
I tried to echo the whole logfile to stdout so that packer will show it in its console output, but it seems that the logfiles somehow exceeds some stdout buffers, perhaps in OpenSSH so I skipped this.
I normally run the build process in headless mode.
@StefanScherer, I tried your script, removed the dis-updates.ps1
section, and it looks like it worked. I'm a little perplexed as to why though... it looks like the big functional difference is the maximum number of installed updates at a time. I'm going to have to look into this further.
...and it looks like I've now been able to successfully build this with a timeout of 8 hours and by adding -MaxUpdatesPerCycle 30
as an argument to win-updates.ps1
. I'll refine the timeout a little more and submit a PR. I would really like to know exactly why this is happening to better prevent it, but I'm not sure I can think of an easy way to figure that out.
I've also confirmed that 2008 R2 Core suffers from the same issue. Adjusting the command line parameters in a similar manner produces desired output.
Scratch that.
I've been attempting to build a fully-updated 2008 R2 box with VirtualBox by incrementally increasing the timeout value (4 hour timeout failed, currently testing 8 hours) and have had no luck. When I disable the auto-update process, it works just fine.
Has this build been tested recently? Is anyone else having similar issues?
I think, more importantly, is there a way to actually see the progress of these updates during installation? If I were able to open Task Manager to at least tell if the VM was doing anything, that would be fine, but as it is, there's minimal communication to the end user.