From db8f620e4e67dae252ef1dd4a6b228788fce6a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 28 Feb 2024 20:16:57 +0100 Subject: [PATCH 1/5] fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a9038a61..5f17ca3ed 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ 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 From 97c6164920e19f27f8d4c0aef5169513df550cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 28 Feb 2024 20:33:33 +0100 Subject: [PATCH 2/5] fix virtio-win.iso directory in README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f17ca3ed..a20099454 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,8 @@ 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: From d8d17e772e495b98a41cdff91925361ab7a7a5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 28 Feb 2024 22:10:40 +0100 Subject: [PATCH 3/5] fix mount of downloaded iso in qemu --- packer_templates/pkr-sources.pkr.hcl | 1 + 1 file changed, 1 insertion(+) diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 25f92d8ee..c471279ca 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" ? [ From b58e76b93918b6a1e21c07a33dc982ab33ad6ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 28 Feb 2024 23:11:08 +0100 Subject: [PATCH 4/5] Upgrade Windows 11 to 23H2 --- os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl index 579e5840c..3c46c8fa5 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_CLIENTENTERPRI> +iso_checksum = "c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c" parallels_guest_os_type = "win-11" vbox_guest_os_type = "Windows11_64" vmware_guest_os_type = "windows9srv-64" From 86acadddf7d8f6d854feec7c1d580f7cc457fed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= Date: Wed, 28 Feb 2024 23:11:50 +0100 Subject: [PATCH 5/5] fixup! --- os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl index 3c46c8fa5..3c059d44a 100644 --- a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl @@ -3,7 +3,7 @@ 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/888969d5-f34g-4e03-ac9d-1f9786c66749/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRI> +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"