Packer – notes

Note, when you want to create a box to be shared on atlas, you need to ensure yoru box has the following configurations: (e.g. root user's password should be "vagrant")

Install Packer on windows:

this is a binary, so simply unzip it and place it a in a place like:


Then update windows "PATH" environment variable

Then open powershell termianl and run "packer --help".

Now create your packer projects folder, e.g. :


than download an iso into it e.g. the centos dvd iso:


While it's downloading, create an empty json file, give it a meaningful name:


Enter the following in the json file:

  "builders": [
      "type": "virtualbox-iso",
      "guest_os_type": "RedHat_64",
      "iso_url": "CentOS-7-x86_64-DVD-1503-01.iso",
      "iso_checksum": "99E450FB1B22D2E528757653FCBF5FDC",
      "iso_checksum_type": "md5",
      "ssh_username": "packer",
      "ssh_password": "packer",
      "ssh_wait_timeout": "30s",
      "shutdown_command": "echo 'packer' | sudo -S shutdown -P now"

  "provisioners": [
      "type": "shell",
      "script": ""

I created the above from the sample in:

You also need to find a checksum value which you can do in powershell v4 using:

Get-FileHash c:\path\to\file -Algorithm MD5

Then in your powershell terminal, cd into this directory, and run:

$ packer validate centos7-dvd-iso-virtualbox.json

It will fail citing that scripts doesn't exist, create an empty file in the cwd and try again.

Next do:

$ packer build centos7-dvd-iso-virtualbox.json

Need to use convert to vagrant:

Now upload your box to hashicorp-atlas: