Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create templates for Win2008 R2 #98

Open
fzk-rec opened this issue Sep 26, 2017 · 1 comment
Open

Create templates for Win2008 R2 #98

fzk-rec opened this issue Sep 26, 2017 · 1 comment

Comments

@fzk-rec
Copy link

fzk-rec commented Sep 26, 2017

Hi @mwrock ,
I'm struggling to get your process running with an 2008 R2 iso.
Boxstarter is always displaying two errors:
1.
error_1

boxstarter_error

After the second error, the shell disappears and nothing else happens. Packer is waiting forever for WinRM to become available but no other scripts get executed, especially not your PACKAGE.ps1

When I try to execute the PACKAGE.ps1 on the machine, I run into errors about "Enable-RemoteDesktop" and "Update-ExecutionPolicy -Policy Unrestricted" . So I thought that might be because the Powershell version of the machine is too old. I tried invoking a ps1 that installs powershell 5 through chocolatey, but that didn't work either.

Now I'm stuck.
Can you please help me out by adding working templates and scripts for 2008 R2?

@fzk-rec
Copy link
Author

fzk-rec commented Sep 26, 2017

Update:
I got the installation to work by invoking the chocolatey installation for powershell5 + rebooting the machine in the boxstarter.ps1:
Install-BoxstarterPackage -PackageName a:\install_powershell.ps1 -Credential $cred
Install-BoxstarterPackage -PackageName a:\package.ps1 -Credential $cred

The install_powershell.ps1:

# Install latest powershell, so that the package.ps1 can be executed
C:\ProgramData\Chocolatey\choco.exe install powershell -y

However, now the PackerShutdown.bat fails, or rather the sysprep command within it:
image

A quick google search concluded that maybe the image has been activated too many times:
https://support.microsoft.com/en-us/help/929828/an-error-message-occurs-when-you-run-sysprep-generalize-in-windows-vis

Could this come from my additional reboot?

Help is greatly appreciated! :)

Check out fzk-rec@c166bb6 for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant