I’m trying to build qcow2 format image for Windows server 2025 and when asking Packer to use UEFI mode, it’s unable to boot from ISO and it just drops me in EFI Shell where I see the content of the ISO is FS1: not in FS0:
I’m able to boot form ISO in BIOS mode but want to build image in UEFI mode.
here is my packer script
packer {
required_version = ">= 1.11.0"
required_plugins {
qemu = {
version = ">= 1.1.1"
source = "github.com/hashicorp/qemu"
}
}
}
source "qemu" "windows" {
vm_name = "panw-cisl1-windows-2025"
# Windows 2025 - Internet
# iso_url = "https://artifactory.paloaltonetworks.com:443/artifactory/openshift-images-local/26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
# iso_checksum = "d0ef4502e350e3c6c53c15b1b3020d38a5ded011bf04998e950720ac8579b23d"
# Windows 2025 - Thomas image
iso_url = "https://artifactory.paloaltonetworks.com/artifactory/openshift-images-local/SW_DVD9_Win_Server_STD_CORE_2025_24H2.9_64Bit_English_DC_STD_MLF_X24-08243.ISO"
iso_checksum = "2509618770af72a6335f975beb9f3caacfecbd60c448cafa37959aabccb0d12d"
# Windows 2025 with autounattended
format = "qcow2"
output_directory = "build"
machine_type = "q35"
accelerator = "kvm"
cpus = "4"
memory = "14096"
disk_size = "40960M"
headless = "true"
qemuargs = [
["-drive", "file=/home/jenkins-agent/.cache/packer/45173890bb9e0fc063f71cfb6d5ec40a0210e2d9.iso,media=cdrom,index=4"],
["-drive", "if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd"],
["-drive", "if=pflash,format=raw,file=/home/jenkins-agent/ovmf/OVMF_VARS.fd"],
["-boot", "order=d"]
]
communicator = "winrm"
winrm_username = "Administrator"
winrm_password = "WindowsPassword"
net_device = "e1000"
disk_interface = "ide"
floppy_files = ["../answer-files/autounattend.xml", "../answer-files/winrm-config.ps1"]
boot_command = ["<spacebar><spacebar>"]
any idea why ?