joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Added Windows 2016 support #243

Closed vitkhab closed 6 years ago

vitkhab commented 7 years ago

Windows answer file and packer build configuration copied from Windows 2012 R2. I've fixed iso url and checksum and name of image to install.

Tested on Parallels

BirknerAlex commented 7 years ago

@vitkhab Does the win-updates.ps1 script works with your Windows 2016 installation? The script always hangs on "Downloading Updates..." when I test it. Other versions like 2012 R2 are working fine, it's just the 2016 one.

windowsupdates

If I take a look into the network graphs there seems to be no download traffic on the interfaces. I'm debugging since hours now.

vitkhab commented 7 years ago

@BirknerAlex It works, but really slow. Like 30-60 minutes to download updates. Never thought it is a problem (in my experience many things take time in windows). I'll look into it and try to fix it.

parallels picture

vitkhab commented 7 years ago

@BirknerAlex I looked into it and saw no problem. I changed Autounattend.xml and removed update step then started two packer builds. In one VM I manually ran Update Windows. In another I ran win-updates.ps1. Both of them took similar time to finish (~35-40 minutes). It's just how windows works. Downloading updates is not only network activity, but it takes a lot of cpu time after actual download (I don't know what it is doing, maybe something useful like decompressing). Also KB4022715 is very big update. It takes a lot of time to download and process it.

The best option I see - uncomment \<!-- WITHOUT WINDOWS UPDATES --> section in Autounattend.xml and comment \<!-- WITH WINDOWS UPDATES --> section. Build will run faster. Also I noticed, windows updates (by hand or by script) run faster after installing parallels tools (~15 minutes).

alinefr commented 7 years ago

I'm using this pull request for Windows 10/Windows Server 2016 vagrant images and it works for me. The only thing is about Windows 10. It asks for user input. Also after first reboot I have to enter user/password before it starts a Powershell session and the updates. It would be nice to be able to create the image without any user input as this way I can automate the whole process. Apart from this, the image works and it would be nice to have it merged.

basictheprogram commented 6 years ago

No conflicts. Can this be merged into master?

lmayorga1980 commented 6 years ago

:+1:

StefanScherer commented 6 years ago

LGTM. So we have a 2016 template with SSH. Switching to WinRM will be done in another PR.

basictheprogram commented 6 years ago

Can the WinRM PR be linked here?