Adding Packer Plugins

15 minutes
  • 3 Learning Objectives

About this Hands-on Lab

HashiCorp Packer allows users to create identical, cross-platform machine images by writing templates that leverage our existing infrastructure tools; however, Packer doesn’t always offers native support for everything we require. In this hands-on lab, we’ll prepare our desired Packer setup by installing some Packer plugins.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Add the Windows Update Plugin
  1. Locate the appropriate binary from the plugin repository and download it:

  2. Expand the file:

    tar zxvf packer-provisioner-windows-update-linux.tgz
  3. Make binary executable:

    chmod +x packer-provisioner-windows-update
  4. Create the necessary plugins directory:

    mkdir -p ~/.packer.d/plugins
  5. Move the binary:

    mv packer-provisioner-windows-update ~/.packer.d/plugins/
Add ARM Builder Dependencies
  1. The ARM Builder plugin is a Go module; install a version of Go newer than 1.11.0:

    sudo tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
    export PATH=$PATH:/usr/local/go/bin
  2. Install the other module dependencies:

    sudo apt install kpartx qemu-user-static
Add the ARM Builder Plugin
  1. Pull down the repository:

    git clone
    cd packer-builder-arm-image
  2. Build the module:

    go mod download
    go build
  3. Move the resulting binary:

    mv packer-plugin-arm-image ~/.packer.d/plugins/
  4. Clean up your home directory when finished:

    rm -rf packer*
    sudo rm -rf go*

Additional Resources

You are the newest employee of Pax Computopia's DevOps team and have been assigned your first task, which involves Packer. You've got Packer installed, but your team uses a few Packer plugins you need to configure locally before you can get started.

Add the packer-provisioner-windows-update and the packer-builder-arm-image plugins.

Note that at least one of these modules requires a version of Go higher than 1.11.0 to install. Hint: The one in the Ubuntu 18.04 repositories won't work.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?