As Windows Server 2025 Preview is officially released, I wanted to test a automated build of the Windows Server 2025 Preview release. So that I can deploy this in my home lab and going to test the new features if I can find the time….
About Hashicorp Packer
Hashicorp Packer is a self-contained executable producing quick and easy operating system builds across multiple platforms. Using Packer and a couple of HCL2 files, you can quickly create fully automated template(s) with latest Windows Updates en VMware Tools. When you schedule a fresh builds after patch Tuesday you have always an up-to-date and fully secured template.
When using VMware customization tools. You can spin up vm’s in minutes.
Automated Windows Server 2025 “Preview” Build
Files you need?
The files and versions I am using at the time of this writing are as follows:
Outside of downloading both Packer and Windows Server 2022 Preview build, you will need the following files:
- windowsserver2025.auto.pkrvars.hcl – houses the variable values you want to define.
- windows2025.json.pkr.hcl – the Packer build file
- Answer file – Generated with Windows System Image Manager (SIM) you can download the file below
- Custom script file(s) – optional
Other considerations and tasks you will need to complete:
- Copy the Windows Server 2025 ISO file to a vSphere datastore
Windows Server 2025 unattend Answer file for the automated Packer Build
Like other automated approaches to installing Windows Server, the automated Windows Server 2025 Packer build requires an answer file to provide answers to the GUI automatically and other installation prompts that you normally see in a manual installation of Windows Server.
You will find the scripts here: https://github.com/WardVissers/Packer-Win2025
The only problem that I had was: Switching from Nic from Public to Private
# Set network connections profile to Private mode.
Write-Output ‘Setting the network connection profiles to Private…’
do {
$connectionProfile = Get-NetConnectionProfile
Start-Sleep -Seconds 10
} while ($connectionProfile.Name -eq ‘Identifying…’)
Set-NetConnectionProfile -Name $connectionProfile.Name -NetworkCategory Private
Like this:
Like Loading...
You must be logged in to post a comment.