joefitzgerald / packer-windows

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

handshaking error when disabling windows updates on 2008_r2 #16

Closed lmayorga1980 closed 10 years ago

lmayorga1980 commented 10 years ago

Hi,

I get an ssh handshaking error when disabling the Windows Update XML Nodes but it works when the Updates Get Executed.

dylanmei commented 10 years ago

If you're trying to temporarily skip the updates, you'll want to pass -AutoStart to the previous SyncronousCommand, a powershell command that installs OpenSSH.

lmayorga1980 commented 10 years ago

Don't get me wrong but this is the first time i see this file. Should I add another node ? which I don't think is the case but where should I add this AutoStart??

    <SynchronousCommand wcm:action="add">
                    <CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
                    <Description>Install OpenSSH</Description>
                    <Order>99</Order>
                    <RequiresUserInput>true</RequiresUserInput>
                </SynchronousCommand>
lmayorga1980 commented 10 years ago

I found the Argument on the PS Script duhhh!.

dylanmei commented 10 years ago

Hehe ya. Skipping the Windows Updates would defeat one of the core awesomes of this project, but its useful when hacking on the project. Perhaps it is something that can be parametrized when we get to generating the templates.

lmayorga1980 commented 10 years ago

Yeah I think so too. Need to execute a full run in order to get some ideas.

joefitzgerald commented 10 years ago

I have updated the README to better describe how to disable Windows Update installation. I've also modified the Autounattend.xml files to show exactly what needs to be commented / uncommented to make that happen. Hopefully that'll save others from running into the same issue here.

Note: you need to upgrade to Packer 0.5.0 to work with v1.4 (which includes the changes I described above).