diff --git a/README.md b/README.md index 5b074914c..d34eb2a4e 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,14 @@ If the build is successful, your box files will be in the `builds` directory at ### KVM/qemu support for Windows -You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso). You can do this from the command line: `wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O virtio-win.iso` and place it in the packer_templates/win_answer_files/ directory. +You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso) and place it in the builds/iso/ directory. +You can do this from the command line: `mkdir -p builds/iso/; wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O builds/iso/virtio-win.iso` You can use the following sample command to build a KVM/qemu Windows box: ```bash packer init -upgrade ./packer_templates -packer build --only=qemu.vm -var-file=os_pkrvars/windwos/windows-2022-x86_64.pkrvars.hcl ./packer_templates +packer build --only=qemu.vm -var-file=os_pkrvars/windows/windows-2022-x86_64.pkrvars.hcl ./packer_templates ``` ### Proprietary Templates diff --git a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl index 579e5840c..3c059d44a 100644 --- a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl @@ -3,8 +3,8 @@ os_version = "11" os_arch = "x86_64" is_windows = true # Windows 11 source requires a prompt to select OS to install. This allows the system time to add reg keys to ignore TPM Check before the install begins. -iso_url = "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66751/22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" -iso_checksum = "ebbc79106715f44f5020f77bd90721b17c5a877cbc15a3535b99155493a1bb3f" +iso_url = "https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" +iso_checksum = "c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c" parallels_guest_os_type = "win-11" vbox_guest_os_type = "Windows11_64" vmware_guest_os_type = "windows9srv-64" diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 2fe6dbb03..2cb1a1d21 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -35,6 +35,7 @@ locals { qemuargs = var.qemuargs == null ? ( var.is_windows ? [ ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], + ["-drive", "file=${var.iso_url},media=cdrom,index=2"], ["-drive", "file=${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [