Installation of GOAD on PROXMOX Part 2 of 3 - Provisioning
In this part of the tutorial, we’ll create the Provisioning CT which will manage the GOAD lab deployment using Ansible.
Create Provisioning CT
Go to your local storage on your Proxmox
- Go to Templates
- Search for Ubuntu and select the newest version
Once you have Ubuntu you will set your own password here with the hostname: provisioning
- Paste
your ssh public key that you'll use to ssh to the provisioning CT (
the same one given in ~/.ssh/config).
- Set
the Template as the ubuntu we downloaded
- Set
4096 for the memory
- Bridge = vmbr2
You should end up with this, and you can then click Finish .

Download
GOAD
On
your provisioning ct download GOAD from its github by running:
apt install python3-venv
cd /root
git clone
cd GOAD ./goad.sh

If all went well, you
should see the GOAD interface here which you can then leave by typing exit
Run the setup for Proxmox :
cd /root/GOADbash -f ./scripts/setup_proxmox.sh

This
may work directly for you and you can skip the following, however I ran into several errors because the container had Python 3.13 by default which Ansible currently has compatibility issues with.
curl <https://pyenv.run> | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo'[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
source ~/.bashrc
apt install libssl-dev
pyenv install 3.10.13
Make
sure that if it already created the .venv file to delete it to
recreate with a different python version.
Get
your Files:
Download
Windows ISO
Local
→ ISO Images → download from URL

Download
the two windows iso images by url and query the url for their data.
Give
them the following names (windows_server_2019_17763.737_eval_x64.iso
and windows_server_2016_14393.0_eval_x64.iso)
or make sure to change the change the iso_file
variables in
/root/GOAD/packer/proxmox/windows_server2019_proxmox_cloudinit.pkvars.hcl
and
/root/GOAD/packer/proxmox/windows_server2016_proxmox_cloudinit.pkvars.hcl
Windows
2019
Windows
2016
Download
cloudbase on goadprovisioning
Packer
needs ${path.root}/scripts/sysprep/cloudbase-init.ps1, and
${path.root}/scripts/sysprep/cloudbase-init-p2.ps1
cd /root/GOAD/packer/proxmox/scripts/sysprep/
wget https://cloudbase.it/downloads/CloudbaseInitSetup_Stable_x64.msi
Download
virtio-win.iso on goadproxmox
ssh goadproxmox
cd /var/lib/vz/template/iso
wget <https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
Provisioning
User
Create
user to provision with: infra_as_code@pve
on
the proxmox ssh:
pveum useradd infra_as_code@pve
pveum passwd infra_as_code@pve
pveum roleadd Packer -privs "VM.Config.Disk VM.Config.CPU VM.Config.Memory Datastore.AllocateTemplate Datastore.Audit Datastore.AllocateSpace Sys.Modify VM.Config.Options VM.Allocate VM.Audit VM.Console VM.Config.CDROM VM.Config.Cloudinit VM.Config.Network VM.PowerMgmt VM.Config.HWType VM.Monitor SDN.Use"
pveum acl modify / -user 'infra_as_code@pve' -role Packer
pveum acl modify / -user 'infra_as_code@pve' -role Administrator
Modify
Variables
cd /root/GOAD/packer/proxmox/
cp config.auto.pkrvars.hcl.template config.auto.pkrvars.hcl
vim config.auto.pkrvars.hcl

config.auto.pkrvars.hcl:
proxmox_url = "<https://192.168.1.1:8006/api2/json>"
proxmox_username = "infra_as_code@pve"
proxmox_password = "infra_as_code@pve password"
proxmox_skip_tls_verify= "true"
proxmox_node = "toad"
proxmox_pool = "Templates"
proxmox_iso_storage = "local"
proxmox_vm_storage = "local-lvm"
*
If you don't have a proxmox_pool:
Check
for an available proxmox_pool using zpool list
Create
a pool if not available
Datacenter
→ Permission → Pools → create

*
If you don't have local-lvm for proxmox_vm_storage:
I set proxmox_iso_storage and proxmox_vm_storage both to "local"
to avoid making another storage
Run
the build_proxmox_iso.sh :
this
creates ./iso/Autounattend_winserver2016_cloudinit.iso
cd /root/GOAD/packer/proxmox/
./build_proxmox_iso.sh
Copy
over scripts_withcloudinit.iso
from goadprovisioning to goadproxmox
scp ./iso/scripts_withcloudinit.iso root@192.168.1.1:/var/lib/vz/template/iso/
Install
packer + terraform
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list > /dev/null
apt update && apt install packer && apt install terraform
Build
with packer
The values in windows_server2019_proxmox_cloudinit.pkvars.hcl and windows_server2016_proxmox_cloudinit.pkvars.hcl should be good since we named the windows iso files correctly:

cd /root/GOAD/packer/proxmox
packer init .
packer validate -var-file=windows_server2019_proxmox_cloudinit.pkvars.hcl
packer build -var-file=windows_server2019_proxmox_cloudinit.pkvars.hcl .
Do
the same for the 2016 server
packer validate -var-file=windows_server2016_proxmox_cloudinit.pkvars.hcl .
packer build -var-file=windows_server2016_proxmox_cloudinit.pkvars.hcl .

Provisioning
Important
variables are in /root/GOAD/globalsettings.ini and
/root/.goad/goad.ini
If
you made other changes to ips, proxmox_pool, proxmox_node, the
storage, etc. change them here
You
don't have to change the default values in goad.ini because we
will pass variables directly in the command. However change values under
[proxmox] if you have a different name for the pool or node
Run
: This may take a bit
cd /root/GOAD
./goad.sh -t check -l GOAD -p proxmox -ip 192.168.10
./goad.sh -t install -l GOAD -p proxmox -ip 192.168.10
Input
your password for the two prompts for the infra_as_code@pve user you
created earlier


It
took about an hour for me, but the five VMs were created.
If you are having problems check for internet connection and DNS resolution for the devices. Common errors came from the created VMs not having DNS resolution or internet connection so check either using dig or route or using the proxmox Diagnosis tools.