Skip to content

kmazzoni/packer-templates

 
 

Repository files navigation

packer-templates

A packer template that simplifies the creation of windows vagrant boxes.

This repo and much of its cotent is covered in detail from this blog post.

Prerequisites

In order to run the template, you will need the following:

  1. Packer installed with a minimum version of 0.8.1.
  2. Virtualbox
  3. An ISO file. The template is hardcoded to look for this at iso/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO. New evaluation ISOs of windows 2012R2 can be downloaded from msdn.

Invoking the template

You may invoke packer to run the template with:

packer build -force .\vbox-2012r2.json

Converting to Hyper-V

This repo includes powershell scripts that can create a Hyper-V vagrant box from the output virtualbox .vmdk file. This repo leverages psake and chocolatey to ensure that all prerequisites are installed and then runs the above packer command followed by the scripts needed to produce a vagrant .box file that can create a Hyper-V file.

Troubleshooting Boxstarter package run

Boxstarter is used as the means of proviioning. Due to the fact that provisioning takes place in the builder and not a provisioner, it can be difficult to gain vivibility into why things go wrong from the same console where poacker is invoked.

Boxstarter will log all package activity output to $env:LocalAppData\Boxstarter\boxstarter.log on the guest.

About

Templates for creating vagrant boxes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 93.7%
  • Ruby 4.9%
  • Batchfile 1.4%