Skip to content

nicolasvan/packer-templates

 
 

Repository files navigation

packer-templates

A Packer template that simplifies the creation of minimally-sized Windows Vagrant boxes.

This repo and much of its content are covered in detail from this blog post. Also see this post specifically for the Nano Server template.

Prerequisites

You need the following to run the template:

  1. Packer installed with a minimum version of 0.8.6.
  2. VirtualBox

Invoking the template

Invoke packer to run the template like this:

packer build -force -only virtualbox-iso .\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.

See this blog post for more detail on converting VirtualBox disks to Hyper-V.

Troubleshooting Boxstarter package run

Boxstarter is used as the means of provisioning except on Nano Server. Due to the fact that provisioning takes place in the builder and not a provisioner, it can be difficult to gain visibility into why things go wrong from the same console where packer is run.

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 88.0%
  • Ruby 6.7%
  • Batchfile 5.3%