This repository contains example Packer configurations and Azure DevOps Pipeline YAML to orchestrate the provisioning of vSphere virtual machine templates. For more information on how to utilise this check out my blog post.
- Windows Server 2022 | Standard & Datacenter | Core & Desktop
- Windows Server 2019 | Standard & Datacenter | Core & Desktop
├── config
│ ├── windows
| | └── autounattend.pkrtpl.hcl
├── scripts
│ ├── windows
| | └── cleanup.ps1
| | └── initial-configuration.ps1
| | └── os-configuration.ps1
| | └── package-installations.ps1
├── vars
│ ├── windows-server-2019.pkrvars.hcl
│ ├── windows-server-2022.pkrvars.hcl
├── build.pkr.hcl
├── variables.pkr.hcl
├── Windows-Server-2022-Core-example.yml
├── Windows-Server-2022-DExp-example.yml
Values to change in *.pkrvars.hcl
vm_inst_os_kms_key_standard = "<standard-kms-key>"
vm_inst_os_kms_key_datacenter = "<datacenter-kms-key>"
vm_guest_os_timezone = "<time-zone>"
vm_inst_os_iso_path = "[<datastore-name>] /Media/windows_server_20XX.iso"
vm_inst_vmtools_iso_path = "[<datastore-name>] /Media/VMTools/windows.iso"
Values to change in variables.pkr.hcl
(Change the value for the default parameter)
variable "default_vsphere_server"
variable "default_vsphere_compute_cluster"
variable "default_vsphere_datacenter"
variable "default_vsphere_datastore"
variable "default_vsphere_folder"
variable "default_vsphere_portgroup_name"
variable "default_content_library_destination"