Comments (21)
I have a hard time justifying being a .net developer sometimes
from packer-windows.
I've seen this myself. According to the article
Important Run these commands immediately before you apply the update. Otherwise, these commands are less effective.
On a computer that is running a 32-bit Windows operating system
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queueOn a computer that is running a 64-bit Windows operating system
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue
This is strange voodoo. How would we even know it's started/finished?
from packer-windows.
IIRC there is a way to do it synchronously, leaving out the /queue argument perhaps. This article covers it a bit more (http://msdn.microsoft.com/en-us/magazine/cc163610.aspx) but the actual tool documentation doesn't indicate anything explicitly about a synchronous operation. (http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).aspx)
Worst case scenario, you could write a script that triggers queue with priority 1 and poll it until it completes.
from packer-windows.
Duh yes, take /queue
off and it just runs with output.
Microsoft.WSMan.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Compiling assembly MSBuild, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=amd64 (CLR v2.0.50727) ...
Specify the input as a .EXE for ngen to pick up the config-file
MSBuild, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Compiling assembly PresentationBuildTasks, Version=3.0.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil (CLR v2.0.50727) ...
and so on...
from packer-windows.
Yeah -- the only thing I'm questioning is running it "before" updates, seems like you'd want it to run after updates, since they likely update the .Net framework.
from packer-windows.
I agree with you here. Running it at the end of the packer run will spare the poor guy doing the vagrant up, which is where I was seeing the problem.
from packer-windows.
LGTM. Pull Request?
from packer-windows.
Still watching this, Joe. On 2012 R2 it's still running "Windows Modules Installer Worker" (TiWorker.exe) with crazy CPU after ngen exits.
from packer-windows.
Yep, definitely will submit one, but probably won't be this weekend, possibly Monday since I have the day off.
from packer-windows.
FYI my CPU was still at 50% exactly one hour later / 50 minutes after ngen was done. I restarted it and all was quiet again.
from packer-windows.
Windows is so awesome and predictable. 👊
from packer-windows.
👍
from packer-windows.
Come and be a go (golang.org) developer – https://github.com/joefitzgerald/go-plus. It'll feel dirty at first, and then you'll have an epiphany. Requires unlearning OO and then learning to use composition instead of inheritance.
Bonus: output is static binaries and cross compilation is trivial. Windows is a first class citizen.
from packer-windows.
Funny, that project you link to is all Node.js. Also a first class citizen on Windows. 😉
from packer-windows.
Funny, that project you link to is all Node.js. Also a first class citizen on Windows. 😉
from packer-windows.
I agree - the irony is not lost on me!
from packer-windows.
I had no problems running this in a .bat file as part of my windows build - thanks for the tip!
from packer-windows.
This is on my radar, working on it this week likely.
from packer-windows.
Tested this on server 2012R2, seems to work. Spits out a bunch of output to the console to show what it's compiling.
from packer-windows.
What's the current status on this? Is a PR required? Looks like we've already merged one and this can be closed.
from packer-windows.
This should be using the windows-shell provisioner. I was unable to make this work with packer 0.10.2 on Windows Server 2012 R2 until I did. packer always simply hung otherwise. I'd submit a PR, but a lot of other stuff that I won't test (since I don't use vagrant) is bundled in that provisioner step. Someone might want to look into this tho.
from packer-windows.
Related Issues (20)
- Internet Explorer can't open while User Account Control is turned off HOT 1
- Installation of Cygwin HOT 2
- Windows 10 still asking for region HOT 3
- Windows 2012 R2 in Waiting for SSH to become available... HOT 3
- Windows could not apply the unattend answer file's <DiskConfiguration> setting HOT 6
- vm-guest-tools.bat - Server 2016 issue HOT 4
- Disable welcome animation on Windows 8/10
- [question] Exclude Windows Update Patches KB's during update
- Packer hangs at : ==> vmware-iso: Waiting for SSH to become available... HOT 3
- VMWare tools installation hangs HOT 1
- debloat-windows.ps1 fails
- Packer(version1.3.2) running from AWS CodeBuild, Stops abruptly while execution PS script
- Step "StepProvision" failed
- Windows 7 iso is no longer available HOT 4
- Avoid using SourceForge tools to prevent potentially unwanted programms from being installed
- Multiple insecure HTTP download links HOT 3
- Windows Server 2019 win-updates.ps1 issue HOT 1
- Windows 10 "Waiting for WinRM to become available" HOT 1
- build stops at or after UltraDefrag HOT 1
- looks like a password was leaked as part of the openssh.ps1 script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-windows.