This repo is for myself and is about how to build VMs in an automated way with HashiCorp's Packer.
$ date
Wed Jan 15 16:42:30 CET 2020
I used macOS.
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G2022
$ VirtualBoxVM --help | head -n 1
Oracle VM VirtualBox VM Runner v6.1.2
$ VBoxManage --version
6.1.2r135662
$ packer version
Packer v1.5.1
$ git clone [email protected]:karolykass/learn-packer.git
$ cd learn-packer
Validate template
$ packer validate debian-10.2.0-amd64-standard-hu.json
Inspect template
$ packer inspect debian-10.2.0-amd64-standard-hu.json
Build VM
$ packer build debian-10.2.0-amd64-standard-hu.json
VirtualBox -> File -> Import Appliance... -> build/debian/10.2.0/packer-debian-10.2.0-amd64-standard-hu-virtualbox-iso.ovf
Validate template
$ packer validate ubuntu-18.04.3-server-amd64-standard-hu.json
Inspect template
$ packer inspect ubuntu-18.04.3-server-amd64-standard-hu.json
Build VM
$ packer build ubuntu-18.04.3-server-amd64-standard-hu.json
VirtualBox -> File -> Import Appliance... -> build/ubuntu/18.04.3/packer-ubuntu-18.04.3-amd64-standard-hu-virtualbox-iso.ovf