kafl.targets icon indicating copy to clipboard operation
kafl.targets copied to clipboard

TASK [Install Windows11SDK 10.0.22621.0] failed

Open Ch4asing opened this issue 9 months ago • 4 comments

Hello, I referred to https://intellabs.github.io/kAFL/tutorials/windows/windows_template.html to perform make build, but I encountered the following error:

qemu.windows:   cmd: vs_community.exe --quiet --wait --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Component.Microsoft.Windows.DriverKit
    qemu.windows:   delta: '0:02:46.013974'
    qemu.windows:   end: '2025-03-09 05:54:49.727210'
    qemu.windows:   msg: non-zero return code
    qemu.windows:   rc: 1603
    qemu.windows:   start: '2025-03-09 05:52:03.713235'
    qemu.windows:   stderr: ''
    qemu.windows:   stderr_lines: <omitted>
    qemu.windows:   stdout: |-
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\2052\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1029\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1046\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1045\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\3082\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1031\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1028\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1033\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1055\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1042\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1040\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1036\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1041\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\HelpFile\1049\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\vs_setup_bootstrapper.exe...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Interop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Native.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.Identity.Client.Broker.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.Identity.Client.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.Identity.Client.Extensions.Msal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.Identity.Client.NativeInterop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.IdentityModel.Abstractions.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.RemoteControl.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Common.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Download.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.Telemetry.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Microsoft.VisualStudio.Utilities.Internal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\runtimes\win-x64\native\msalruntime.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\runtimes\win-arm64\native\msalruntime_arm64.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\runtimes\win-x86\native\msalruntime_x86.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\Newtonsoft.Json.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\System.Memory.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\System.Runtime.CompilerServices.Unsafe.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\VSInstallerElevationService.Contracts.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\zh-Hant\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\pt-BR\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\ja\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\es\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\tr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\de\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\cs\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\pl\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\it\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\zh-Hans\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\fr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\ko\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\ru\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\vs_setup_bootstrapper.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\vs_setup_bootstrapper.exe.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\detection.json...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\ab32cd62b1debb76a3349f18\vs_bootstrapper_d15\vs_setup_bootstrapper.json...
    qemu.windows:   stdout_lines: <omitted>
    qemu.windows:
    qemu.windows: PLAY RECAP *********************************************************************
    qemu.windows: default                    : ok=7    changed=6    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0
    qemu.windows:
==> qemu.windows: Provisioning step had errors: Running the cleanup provisioner, if present...
==> qemu.windows: Deleting output directory...
Build 'qemu.windows' errored after 8 minutes 20 seconds: Error executing Ansible: Non-zero exit status: exit status 2

Ch4asing avatar Mar 09 '25 06:03 Ch4asing

use command PACKER_LOG=1 make build, full log:

PACKER_LOG=1 make build
packer init windows.pkr.hcl
2025/03/09 15:13:19 [INFO] Packer version: 1.12.0 [go1.22.9 linux amd64]
2025/03/09 15:13:19 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2025/03/09 15:13:19 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/ubuntu/.packerconfig
2025/03/09 15:13:19 [WARN] Config file doesn't exist: /home/ubuntu/.packerconfig
2025/03/09 15:13:19 [INFO] Setting cache directory: /home/ubuntu/.cache/packer
2025/03/09 15:13:19 [TRACE] init: plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000f3100)}}, ReleasesOnly:true}}
2025/03/09 15:13:19 [TRACE] listing potential installations for "github.com/hashicorp/qemu" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000f3100)}}, ReleasesOnly:true}}
2025/03/09 15:13:20 [TRACE] listing potential installations for "github.com/hashicorp/ansible" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000f3100)}}, ReleasesOnly:true}}
2025/03/09 15:13:20 [TRACE] listing potential installations for "github.com/hashicorp/vagrant" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000f3100)}}, ReleasesOnly:true}}
2025/03/09 15:13:20 [INFO] (telemetry) Finalizing.
2025/03/09 15:13:20 waiting for all plugin processes to complete...
source /home/ubuntu/kAFL/kafl/examples/templates/windows/../../venv/bin/activate && packer build -var-file win10.pkrvars.hcl windows.pkr.hcl
2025/03/09 15:13:20 [INFO] Packer version: 1.12.0 [go1.22.9 linux amd64]
2025/03/09 15:13:20 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2025/03/09 15:13:20 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/ubuntu/.packerconfig
2025/03/09 15:13:20 [WARN] Config file doesn't exist: /home/ubuntu/.packerconfig
2025/03/09 15:13:20 [INFO] Setting cache directory: /home/ubuntu/.cache/packer
2025/03/09 15:13:20 [TRACE] listing potential installations for "github.com/hashicorp/vagrant" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000818000)}}, ReleasesOnly:false}}
2025/03/09 15:13:20 [TRACE] Found the following "github.com/hashicorp/vagrant" installations: [{/home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 v1.1.5 x5.0}]
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name- cloud registry] post-processors from vagrant plugin
2025/03/09 15:13:20 plugin "/home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64" does not support Protobuf, forcing use of Gob
2025/03/09 15:13:20 [TRACE] listing potential installations for "github.com/hashicorp/qemu" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000818000)}}, ReleasesOnly:false}}
2025/03/09 15:13:20 [TRACE] Found the following "github.com/hashicorp/qemu" installations: [{/home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 v1.1.1 x5.0}]
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2025/03/09 15:13:20 [TRACE] listing potential installations for "github.com/hashicorp/ansible" that match "~> 1". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000818000)}}, ReleasesOnly:false}}
2025/03/09 15:13:20 [TRACE] Found the following "github.com/hashicorp/ansible" installations: [{/home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 v1.1.2 x5.0}]
2025/03/09 15:13:20 found external [-packer-default-plugin-name- local] provisioner from ansible plugin
2025/03/09 15:13:20 [TRACE] listing potential installations for <nil> that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"/home/ubuntu/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000f5200)}}, ReleasesOnly:false}}
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name- cloud registry] post-processors from vagrant plugin
2025/03/09 15:13:20 found external [-packer-default-plugin-name- local] provisioner from ansible plugin
2025/03/09 15:13:20 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2025/03/09 15:13:20 [TRACE] validateValue: not active for disk_size, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for iso_checksum, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for winrm_password, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for winrm_timeout, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for winrm_username, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for autounattend, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for cpus, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for headless, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for iso_checksum_type, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for iso_url, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for memory, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for vm_name, so skipping
2025/03/09 15:13:20 [TRACE] validateValue: not active for https_proxy, so skipping
2025/03/09 15:13:20 [INFO] Starting external plugin /home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2025/03/09 15:13:20 Starting plugin: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 []string{"/home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2025/03/09 15:13:20 Waiting for RPC address for: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Plugin address: unix /tmp/packer-plugin1921543372
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Waiting for connection...
2025/03/09 15:13:20 Received unix RPC address for /home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64: addr is /tmp/packer-plugin1921543372
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Serving a plugin connection...
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 [TRACE] starting builder -packer-default-plugin-name-
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 [DEBUG] - common: sending ConfigSpec as gob
2025/03/09 15:13:20 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 use specified accelerator: kvm
2025/03/09 15:13:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 [DEBUG] - common: sending ConfigSpec as gob
2025/03/09 15:13:20 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:20 [INFO] Starting external plugin /home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 start provisioner -packer-default-plugin-name-
2025/03/09 15:13:20 Starting plugin: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 []string{"/home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64", "start", "provisioner", "-packer-default-plugin-name-"}
2025/03/09 15:13:20 Waiting for RPC address for: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64
2025/03/09 15:13:20 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Plugin address: unix /tmp/packer-plugin1930440645
2025/03/09 15:13:20 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Waiting for connection...
2025/03/09 15:13:20 Received unix RPC address for /home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64: addr is /tmp/packer-plugin1930440645
2025/03/09 15:13:20 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 Serving a plugin connection...
2025/03/09 15:13:20 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:13:20 [TRACE] starting provisioner -packer-default-plugin-name-
2025/03/09 15:13:20 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:21 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 ansible-playbook version: 2.14.18
2025/03/09 15:13:21 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:21 [INFO] Starting external plugin /home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 start post-processor -packer-default-plugin-name-
2025/03/09 15:13:21 Starting plugin: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 []string{"/home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64", "start", "post-processor", "-packer-default-plugin-name-"}
2025/03/09 15:13:21 Waiting for RPC address for: /home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64
2025/03/09 15:13:21 packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 Plugin address: unix /tmp/packer-plugin54330616
2025/03/09 15:13:21 packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 Waiting for connection...
2025/03/09 15:13:21 Received unix RPC address for /home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64: addr is /tmp/packer-plugin54330616
2025/03/09 15:13:21 packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 Serving a plugin connection...
2025/03/09 15:13:21 packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 [TRACE] starting post-processor -packer-default-plugin-name-
2025/03/09 15:13:21 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:21 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:13:21 Build debug mode: false
2025/03/09 15:13:21 Force build: false
2025/03/09 15:13:21 On error:
2025/03/09 15:13:21 Waiting on builds to complete...
2025/03/09 15:13:21 Starting build run: qemu.windows
2025/03/09 15:13:21 Running builder: qemu
2025/03/09 15:13:21 [INFO] (telemetry) Starting builder qemu.windows
qemu.windows: output will be in this color.

2025/03/09 15:13:21 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 Qemu path: /usr/bin/qemu-system-x86_64, Qemu Image path: /usr/bin/qemu-img
==> qemu.windows: Retrieving ISO
==> qemu.windows: Trying https://go.microsoft.com/fwlink/p/?LinkID=2208844&clcid=0x409&culture=en-us&country=US
2025/03/09 15:13:21 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:21 Acquiring lock for: https://go.microsoft.com/fwlink/p/?LinkID=2208844&checksum=sha256%!A(MISSING)ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668&clcid=0x409&country=US&culture=en-us (/home/ubuntu/.cache/packer/d731b3f758e61d53033aa8a67d3d8a3050aa1122.iso.lock)
==> qemu.windows: Trying https://go.microsoft.com/fwlink/p/?LinkID=2208844&checksum=sha256%3Aef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668&clcid=0x409&country=US&culture=en-us
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Leaving retrieve loop for ISO
==> qemu.windows: https://go.microsoft.com/fwlink/p/?LinkID=2208844&checksum=sha256%3Aef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668&clcid=0x409&country=US&culture=en-us => /home/ubuntu/.cache/packer/d731b3f758e61d53033aa8a67d3d8a3050aa1122.iso
==> qemu.windows: Creating floppy disk...
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Floppy path: /tmp/packer3379948711
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Initializing block device backed by temporary file
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Formatting the block device with a FAT filesystem...
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Initializing FAT filesystem on block device
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Reading the root directory from the filesystem
    qemu.windows: Copying files flatly from floppy_files
    qemu.windows: Copying file: answer_files/10/Autounattend.xml
    qemu.windows: Copying file: scripts/fixnetwork.ps1
    qemu.windows: Copying file: scripts/setup_winrm_public.bat
    qemu.windows: Done copying files from floppy_files
    qemu.windows: Collecting paths from floppy_dirs
    qemu.windows: Resulting paths from floppy_dirs : []
    qemu.windows: Done copying paths from floppy_dirs
    qemu.windows: Copying files from floppy_content
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 No CD files specified. CD disk will not be made.
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 [INFO] Creating disk with Path: output-windows/win10.qcow2 and Size: 102400M
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Executing qemu-img: []string{"create", "-f", "qcow2", "output-windows/win10.qcow2", "102400M"}
    qemu.windows: Done copying files from floppy_content
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 stdout: Formatting 'output-windows/win10.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 stderr:
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Found available port: 2546 on IP: 0.0.0.0
==> qemu.windows: Found port for communicator (SSH, WinRM, etc): 2546.
==> qemu.windows: Looking for available port between 5900 and 6000 on 0.0.0.0
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Looking for available port between 5900 and 6000 on 0.0.0.0
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Found available port: 5920 on IP: 0.0.0.0
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Found available VNC port: 5920 on IP: 0.0.0.0
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu --version output: QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.25)
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu version: 6.2.0
==> qemu.windows: Starting VM, booting from CD-ROM
    qemu.windows: view the screen of the VM, connect via VNC without a password to
    qemu.windows: vnc://0.0.0.0:5920
    qemu.windows: The VM will be run headless, without a GUI. If you want to
    qemu.windows: view the screen of the VM, connect via VNC without a password to
    qemu.windows: vnc://0.0.0.0:5920
==> qemu.windows: Overriding default Qemu arguments with qemuargs template option...
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Executing /usr/bin/qemu-system-x86_64: []string{"-drive", "file=output-windows/win10.qcow2,if=ide,cache=writeback,discard=ignore,format=qcow2", "-drive", "file=/home/ubuntu/.cache/packer/d731b3f758e61d53033aa8a67d3d8a3050aa1122.iso,media=cdrom", "-netdev", "user,id=user.0,hostfwd=tcp::2546-:5985", "-vnc", "0.0.0.0:20", "-fda", "/tmp/packer3379948711", "-m", "16384M", "-boot", "once=d", "-name", "win10.qcow2", "-smp", "6", "-usb", "-device", "usb-tablet", "-device", "rtl8139,netdev=user.0", "-machine", "type=pc,accel=kvm"}
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Started Qemu. Pid: 54977
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: WARNING: Image format was not specified for '/tmp/packer3379948711' and probing guessed raw.
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr:          Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr:          Specify the 'raw' format explicitly to remove the restrictions.
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2025/03/09 15:13:23 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:23 Qemu stderr: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
==> qemu.windows: Waiting 5s for boot...
==> qemu.windows: Connecting to VM via VNC (0.0.0.0:5920)
2025/03/09 15:13:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:30 Connected to VNC desktop: QEMU (win10.qcow2)
==> qemu.windows: Typing the boot commands over VNC...
    qemu.windows: Not using a NetBridge -- skipping StepWaitGuestAddress
==> qemu.windows: Using WinRM communicator to connect: 127.0.0.1
2025/03/09 15:13:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:30 Waiting for WinRM, up to timeout: 8h0m0s
2025/03/09 15:13:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:30 [INFO] Attempting WinRM connection...
2025/03/09 15:13:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:30 [DEBUG] connecting to remote shell using WinRM
==> qemu.windows: Waiting for WinRM to become available...
2025/03/09 15:13:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:30 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:13:36 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:36 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:13:48 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:13:48 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:00 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:00 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:12 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:12 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:24 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:24 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:36 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:36 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:45 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:45 [ERROR] connection error: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:34898->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:14:45 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:45 [ERROR] WinRM connection err: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:34898->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:14:50 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:50 [INFO] Attempting WinRM connection...
2025/03/09 15:14:50 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:50 [DEBUG] connecting to remote shell using WinRM
2025/03/09 15:14:50 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:50 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:14:56 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:14:56 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:15:08 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:15:08 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:15:20 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:15:20 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:15:32 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:15:32 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:15:44 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:15:44 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:16:05 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:16:05 [ERROR] connection error: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:37836->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:16:05 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:16:05 [ERROR] WinRM connection err: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:37836->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:16:10 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:16:10 [INFO] Attempting WinRM connection...
2025/03/09 15:16:10 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:16:10 [DEBUG] connecting to remote shell using WinRM
2025/03/09 15:16:28 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:16:28 Qemu stderr: qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
2025/03/09 15:17:25 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:17:25 [ERROR] connection error: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:51018->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:17:25 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:17:25 [ERROR] WinRM connection err: unknown error Post "http://127.0.0.1:2546/wsman": read tcp 127.0.0.1:51018->127.0.0.1:2546: read: connection reset by peer
2025/03/09 15:17:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:17:30 [INFO] Attempting WinRM connection...
2025/03/09 15:17:30 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:17:30 [DEBUG] connecting to remote shell using WinRM
2025/03/09 15:18:17 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:18:17 Checking that WinRM is connected with: 'powershell.exe -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwA7AGkAZgAgACgAVABlAHMAdAAtAFAAYQB0AGgAIAB2AGEAcgBpAGEAYgBsAGUAOgBnAGwAbwBiAGEAbAA6AFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlACkAewAkAFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlAD0AJwBTAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACcAfQA7ACAAZQBjAGgAbwAgACIAVwBpAG4AUgBNACAAYwBvAG4AbgBlAGMAdABlAGQALgAiAA=='
2025/03/09 15:18:17 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:18:17 [INFO] starting remote command: powershell.exe -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwA7AGkAZgAgACgAVABlAHMAdAAtAFAAYQB0AGgAIAB2AGEAcgBpAGEAYgBsAGUAOgBnAGwAbwBiAGEAbAA6AFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlACkAewAkAFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlAD0AJwBTAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACcAfQA7ACAAZQBjAGgAbwAgACIAVwBpAG4AUgBNACAAYwBvAG4AbgBlAGMAdABlAGQALgAiAA==
2025/03/09 15:18:18 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:18:18 [INFO] command 'powershell.exe -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwA7AGkAZgAgACgAVABlAHMAdAAtAFAAYQB0AGgAIAB2AGEAcgBpAGEAYgBsAGUAOgBnAGwAbwBiAGEAbAA6AFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlACkAewAkAFAAcgBvAGcAcgBlAHMAcwBQAHIAZQBmAGUAcgBlAG4AYwBlAD0AJwBTAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACcAfQA7ACAAZQBjAGgAbwAgACIAVwBpAG4AUgBNACAAYwBvAG4AbgBlAGMAdABlAGQALgAiAA==' exited with code: 0
    qemu.windows: WinRM connected.
2025/03/09 15:18:18 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:18:18 Connected to machine
==> qemu.windows: Connected to WinRM!
2025/03/09 15:18:18 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:18:18 Running the provision hook
2025/03/09 15:18:18 [INFO] (telemetry) Starting provisioner ansible
2025/03/09 15:18:18 [DEBUG] - common: receiving ConfigSpec as gob
2025/03/09 15:18:19 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:18:19 ansible-playbook version: 2.14.18
==> qemu.windows: Provisioning with Ansible...
    qemu.windows: 	Using WinRM Password from Packer communicator...
    qemu.windows: Not using Proxy adapter for Ansible run:
    qemu.windows: 	Using WinRM Password from Packer communicator...
2025/03/09 15:18:19 packer-plugin-ansible_v1.1.2_x5.0_linux_amd64 plugin: 2025/03/09 15:18:19 Creating inventory file for Ansible run...
==> qemu.windows: Executing Ansible: ansible-playbook -e packer_build_name="windows" -e packer_builder_type=qemu -e packer_http_addr=10.0.2.2:0 -e ansible_winrm_scheme=http -e ansible_proxy= -v -e ansible_password=***** -i /tmp/packer-provisioner-ansible829353536 /home/ubuntu/kAFL/kafl/examples/templates/windows/playbook.yml
    qemu.windows: Using /home/ubuntu/kAFL/kafl/examples/templates/windows/ansible.cfg as config file
    qemu.windows:
    qemu.windows: PLAY [Deploy] ******************************************************************
    qemu.windows:
    qemu.windows: TASK [Gathering Facts] *********************************************************
    qemu.windows: ok: [default]
    qemu.windows:
    qemu.windows: TASK [Configure IE proxy settings to apply to all users] ***********************
    qemu.windows: skipping: [default] => changed=false
    qemu.windows:   skip_reason: Conditional result was False
    qemu.windows:
    qemu.windows: TASK [Configure IE proxy settings] *********************************************
    qemu.windows: skipping: [default] => changed=false
    qemu.windows:   skip_reason: Conditional result was False
    qemu.windows:
    qemu.windows: TASK [Import IE proxy configuration to WinHTTP] ********************************
    qemu.windows: skipping: [default] => changed=false
    qemu.windows:   skip_reason: Conditional result was False
    qemu.windows:
    qemu.windows: TASK [Ensure Chocolatey installed from internal repo] **************************
    qemu.windows: [WARNING]: Chocolatey was missing from this system, so it was installed during
    qemu.windows: this task run.
    qemu.windows: changed: [default] => changed=true
    qemu.windows:   rc: 0
    qemu.windows:
    qemu.windows: TASK [Set chocolatey proxy] ****************************************************
    qemu.windows: skipping: [default] => changed=false
    qemu.windows:   skip_reason: Conditional result was False
    qemu.windows:
    qemu.windows: TASK [Disable uncessary services] **********************************************
    qemu.windows: changed: [default] => (item=WSearch) => changed=true
    qemu.windows:   ansible_loop_var: item
    qemu.windows:   can_pause_and_continue: false
    qemu.windows:   depended_by:
    qemu.windows:   - workfolderssvc
    qemu.windows:   - WMPNetworkSvc
    qemu.windows:   dependencies:
    qemu.windows:   - RPCSS
    qemu.windows:   - BrokerInfrastructure
    qemu.windows:   description: Provides content indexing, property caching, and search results for files, e-mail, and other content.
    qemu.windows:   desktop_interact: false
    qemu.windows:   display_name: Windows Search
    qemu.windows:   exists: true
    qemu.windows:   item: WSearch
    qemu.windows:   name: WSearch
    qemu.windows:   path: C:\Windows\system32\SearchIndexer.exe /Embedding
    qemu.windows:   start_mode: disabled
    qemu.windows:   state: stopped
    qemu.windows:   username: LocalSystem
    qemu.windows: changed: [default] => (item=Spooler) => changed=true
    qemu.windows:   ansible_loop_var: item
    qemu.windows:   can_pause_and_continue: false
    qemu.windows:   depended_by:
    qemu.windows:   - Fax
    qemu.windows:   dependencies:
    qemu.windows:   - RPCSS
    qemu.windows:   - http
    qemu.windows:   description: This service spools print jobs and handles interaction with the printer.  If you turn off this service, you won’t be able to print or see your printers.
    qemu.windows:   desktop_interact: false
    qemu.windows:   display_name: Print Spooler
    qemu.windows:   exists: true
    qemu.windows:   item: Spooler
    qemu.windows:   name: Spooler
    qemu.windows:   path: C:\Windows\System32\spoolsv.exe
    qemu.windows:   start_mode: disabled
    qemu.windows:   state: stopped
    qemu.windows:   username: LocalSystem
    qemu.windows:
    qemu.windows: TASK [Disable OneDrive] ********************************************************
    qemu.windows: changed: [default] => changed=true
    qemu.windows:   data_changed: false
    qemu.windows:   data_type_changed: false
    qemu.windows:
    qemu.windows: TASK [Disable Cortana] *********************************************************
    qemu.windows: changed: [default] => changed=true
    qemu.windows:   data_changed: false
    qemu.windows:   data_type_changed: false
    qemu.windows:
    qemu.windows: TASK [Disable Defender] ********************************************************
    qemu.windows: changed: [default] => changed=true
    qemu.windows:   data_changed: false
    qemu.windows:   data_type_changed: false
    qemu.windows:
    qemu.windows: TASK [Download Visual Studio 2022 community installer] *************************
    qemu.windows: changed: [default] => changed=true
    qemu.windows:   checksum_dest: 4ce104ffa297e12da8f47b54e7407ab0ccf732c2
    qemu.windows:   checksum_src: 4ce104ffa297e12da8f47b54e7407ab0ccf732c2
    qemu.windows:   dest: C:\Users\vagrant\AppData\Local\Temp\vs_community.exe
    qemu.windows:   elapsed: 1.1249589
    qemu.windows:   msg: OK
    qemu.windows:   size: 4451712
    qemu.windows:   status_code: 200
    qemu.windows:   url: https://aka.ms/vs/17/release/vs_Community.exe
    qemu.windows:
    qemu.windows: TASK [Install Windows11SDK 10.0.22621.0] ***************************************
    qemu.windows: fatal: [default]: FAILED! => changed=true
    qemu.windows:   cmd: vs_community.exe --quiet --wait --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Component.Microsoft.Windows.DriverKit
    qemu.windows:   delta: '0:02:44.714238'
    qemu.windows:   end: '2025-03-09 07:21:52.580620'
    qemu.windows:   msg: non-zero return code
    qemu.windows:   rc: 1603
    qemu.windows:   start: '2025-03-09 07:19:07.866382'
    qemu.windows:   stderr: ''
    qemu.windows:   stderr_lines: <omitted>
    qemu.windows:   stdout: |-
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\2052\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1029\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1046\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1045\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\3082\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1031\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1028\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1033\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1055\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1042\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1040\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1036\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1041\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\HelpFile\1049\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\vs_setup_bootstrapper.exe...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Interop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Native.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.Identity.Client.Broker.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.Identity.Client.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.Identity.Client.Extensions.Msal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.Identity.Client.NativeInterop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.IdentityModel.Abstractions.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.RemoteControl.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Common.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Download.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.Telemetry.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Microsoft.VisualStudio.Utilities.Internal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\runtimes\win-x64\native\msalruntime.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\runtimes\win-arm64\native\msalruntime_arm64.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\runtimes\win-x86\native\msalruntime_x86.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\Newtonsoft.Json.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\System.Memory.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\System.Runtime.CompilerServices.Unsafe.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\VSInstallerElevationService.Contracts.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\zh-Hant\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\pt-BR\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\ja\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\es\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\tr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\de\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\cs\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\pl\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\it\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\zh-Hans\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\fr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\ko\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\ru\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\vs_setup_bootstrapper.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\vs_setup_bootstrapper.exe.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\detection.json...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\6365dee4fa42b5b2e981d612\vs_bootstrapper_d15\vs_setup_bootstrapper.json...
    qemu.windows:   stdout_lines: <omitted>
    qemu.windows:
    qemu.windows: PLAY RECAP *********************************************************************
    qemu.windows: default                    : ok=7    changed=6    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0
    qemu.windows:
2025/03/09 15:21:52 [INFO] (telemetry) ending ansible
==> qemu.windows: Provisioning step had errors: Running the cleanup provisioner, if present...
2025/03/09 15:21:52 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:21:52 failed to unlock port lockfile: close tcp [::]:5920: use of closed network connection
2025/03/09 15:21:52 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:21:52 failed to unlock port lockfile: close tcp [::]:2546: use of closed network connection
2025/03/09 15:21:52 packer-plugin-qemu_v1.1.1_x5.0_linux_amd64 plugin: 2025/03/09 15:21:52 Deleting floppy disk: /tmp/packer3379948711
==> qemu.windows: Deleting output directory...
2025/03/09 15:21:52 [INFO] (telemetry) ending qemu.windows
==> Wait completed after 8 minutes 31 seconds
2025/03/09 15:21:52 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2025/03/09 15:21:52 machine readable: qemu.windows,error []string{"Error executing Ansible: Non-zero exit status: exit status 2"}
==> Builds finished but no artifacts were created.
2025/03/09 15:21:52 [INFO] (telemetry) Finalizing.
Build 'qemu.windows' errored after 8 minutes 31 seconds: Error executing Ansible: Non-zero exit status: exit status 2

==> Wait completed after 8 minutes 31 seconds

==> Some builds didn't complete successfully and had errors:
--> qemu.windows: Error executing Ansible: Non-zero exit status: exit status 2

==> Builds finished but no artifacts were created.
2025/03/09 15:21:53 waiting for all plugin processes to complete...
2025/03/09 15:21:53 /home/ubuntu/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.1_x5.0_linux_amd64: plugin process exited
2025/03/09 15:21:53 /home/ubuntu/.config/packer/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.2_x5.0_linux_amd64: plugin process exited
2025/03/09 15:21:53 /home/ubuntu/.config/packer/plugins/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_linux_amd64: plugin process exited
make: *** [Makefile:14: build] Error 1

Ch4asing avatar Mar 09 '25 07:03 Ch4asing

Hi @1e1e, thank you for reporting this issue.

I recently merged #53 which should increase the stability of the provisioning step. Can you retry with the latest updates and tell me if this works ?

Wenzel avatar Mar 12 '25 13:03 Wenzel

Hi @Wenzel , the build was successful after the update. However, I only succeeded using PACKER_LOG=1 make build. The make build command failed twice. I don't know why. failed log:

make build
make[1]: Entering directory '/home/ubuntu/kAFL/kafl/examples/templates/windows'
python3 -m venv /home/ubuntu/kAFL/kafl/examples/templates/windows/../../venv
/home/ubuntu/kAFL/kafl/examples/templates/windows/../../venv/bin/python -m pip install ansible==7.1.0 pywinrm
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Collecting ansible==7.1.0
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/57/33/0c6024d1114e267a362f1c5a0593c2c1a41f5b556da59b48ae47b35acc56/ansible-7.1.0-py3-none-any.whl (42.4 MB)
Collecting pywinrm
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/0c/45/4340320145c225387f40ce412de1b209d991c322032e4922cc0a9935fd31/pywinrm-0.5.0-py3-none-any.whl (48 kB)
Collecting ansible-core~=2.14.1
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/12/54/08580cf5131b81a5275d2b7db76de0fc210e05b5edd2ef78776f7dcfc2c1/ansible_core-2.14.18-py3-none-any.whl (2.2 MB)
Collecting requests-ntlm>=1.1.0
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/9e/5d/836b97537a390cf811b0488490c389c5a614f0a93acb23f347bd37a2d914/requests_ntlm-1.3.0-py3-none-any.whl (6.6 kB)
Collecting requests>=2.9.1
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB)
Collecting xmltodict
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/d6/45/fc303eb433e8a2a271739c98e953728422fa61a3c1f36077a49e395c972e/xmltodict-0.14.2-py2.py3-none-any.whl (10.0 kB)
Collecting cryptography
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/89/33/c1cf182c152e1d262cac56850939530c05ca6c8d149aa0dcee490b417e99/cryptography-44.0.2-cp39-abi3-manylinux_2_34_x86_64.whl (4.2 MB)
Collecting resolvelib<0.9.0,>=0.5.3
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/98/c0/46cfa3f56e43033b705965120058c018375600fa8fdb44c4e53d75820673/resolvelib-0.8.1-py2.py3-none-any.whl (16 kB)
Collecting jinja2>=3.0.0
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl (134 kB)
Collecting PyYAML>=5.1
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (751 kB)
Collecting packaging
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB)
Collecting certifi>=2017.4.17
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl (166 kB)
Collecting charset-normalizer<4,>=2
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/93/62/5e89cdfe04584cb7f4d36003ffa2936681b03ecc0754f8e969c2becb7e24/charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (146 kB)
Collecting urllib3<3,>=1.21.1
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl (128 kB)
Collecting idna<4,>=2.5
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB)
Collecting pyspnego>=0.4.0
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/57/ea/b3c1438839d8724beff7b31ec42b9d041265dc9ca27ccb54477d442bfbcf/pyspnego-0.11.2-py3-none-any.whl (130 kB)
Collecting cffi>=1.12
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/8d/fb/4da72871d177d63649ac449aec2e8a29efe0274035880c7af59101ca2232/cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (446 kB)
Collecting MarkupSafe>=2.0
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20 kB)
Collecting pycparser
  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl (117 kB)
Installing collected packages: resolvelib, xmltodict, urllib3, PyYAML, pycparser, packaging, MarkupSafe, idna, charset-normalizer, certifi, requests, jinja2, cffi, cryptography, pyspnego, ansible-core, requests-ntlm, ansible, pywinrm
  WARNING: The script normalizer is installed in '/home/ubuntu/kAFL/kafl/examples/venv/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyspnego-parse is installed in '/home/ubuntu/kAFL/kafl/examples/venv/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts ansible, ansible-config, ansible-connection, ansible-console, ansible-doc, ansible-galaxy, ansible-inventory, ansible-playbook, ansible-pull and ansible-vault are installed in '/home/ubuntu/kAFL/kafl/examples/venv/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script ansible-community is installed in '/home/ubuntu/kAFL/kafl/examples/venv/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed MarkupSafe-3.0.2 PyYAML-6.0.2 ansible-7.1.0 ansible-core-2.14.18 certifi-2025.1.31 cffi-1.17.1 charset-normalizer-3.4.1 cryptography-44.0.2 idna-3.10 jinja2-3.1.6 packaging-24.2 pycparser-2.22 pyspnego-0.11.2 pywinrm-0.5.0 requests-2.32.3 requests-ntlm-1.3.0 resolvelib-0.8.1 urllib3-2.3.0 xmltodict-0.14.2
packer init windows.pkr.hcl
source /home/ubuntu/kAFL/kafl/examples/templates/windows/../../venv/bin/activate && packer build -var-file win10.pkrvars.hcl windows.pkr.hcl
qemu.windows: output will be in this color.

==> qemu.windows: Retrieving ISO
==> qemu.windows: Trying https://go.microsoft.com/fwlink/p/?LinkID=2208844&clcid=0x409&culture=en-us&country=US
==> qemu.windows: Trying https://go.microsoft.com/fwlink/p/?LinkID=2208844&checksum=sha256%3Aef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668&clcid=0x409&country=US&culture=en-us
==> qemu.windows: https://go.microsoft.com/fwlink/p/?LinkID=2208844&checksum=sha256%3Aef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668&clcid=0x409&country=US&culture=en-us => /home/ubuntu/.cache/packer/d731b3f758e61d53033aa8a67d3d8a3050aa1122.iso
==> qemu.windows: Creating floppy disk...
    qemu.windows: Copying files flatly from floppy_files
    qemu.windows: Copying file: answer_files/10/Autounattend.xml
    qemu.windows: Copying file: scripts/fixnetwork.ps1
    qemu.windows: Copying file: scripts/setup_winrm_public.bat
    qemu.windows: Done copying files from floppy_files
    qemu.windows: Collecting paths from floppy_dirs
    qemu.windows: Resulting paths from floppy_dirs : []
    qemu.windows: Done copying paths from floppy_dirs
    qemu.windows: Copying files from floppy_content
    qemu.windows: Done copying files from floppy_content
==> qemu.windows: Found port for communicator (SSH, WinRM, etc): 2228.
==> qemu.windows: Looking for available port between 5900 and 6000 on 0.0.0.0
==> qemu.windows: Starting VM, booting from CD-ROM
    qemu.windows: The VM will be run headless, without a GUI. If you want to
    qemu.windows: view the screen of the VM, connect via VNC without a password to
    qemu.windows: vnc://0.0.0.0:5910
==> qemu.windows: Overriding default Qemu arguments with qemuargs template option...
==> qemu.windows: Waiting 5s for boot...
==> qemu.windows: Connecting to VM via VNC (0.0.0.0:5910)
==> qemu.windows: Typing the boot commands over VNC...
    qemu.windows: Not using a NetBridge -- skipping StepWaitGuestAddress
==> qemu.windows: Using WinRM communicator to connect: 127.0.0.1
==> qemu.windows: Waiting for WinRM to become available...
    qemu.windows: WinRM connected.
==> qemu.windows: Connected to WinRM!
==> qemu.windows: Provisioning with Ansible...
    qemu.windows: Not using Proxy adapter for Ansible run:
    qemu.windows: 	Using WinRM Password from Packer communicator...
==> qemu.windows: Executing Ansible: ansible-playbook -e packer_build_name="windows" -e packer_builder_type=qemu -e packer_http_addr=10.0.2.2:0 -e ansible_winrm_scheme=http -e ansible_proxy= -e ansible_password=***** -i /tmp/packer-provisioner-ansible3141789684 /home/ubuntu/kAFL/kafl/examples/templates/windows/playbook.yml
    qemu.windows:
    qemu.windows: PLAY [Deploy] ******************************************************************
    qemu.windows:
    qemu.windows: TASK [Gathering Facts] *********************************************************
    qemu.windows: ok: [default]
    qemu.windows:
    qemu.windows: TASK [Configure IE proxy settings to apply to all users] ***********************
    qemu.windows: skipping: [default]
    qemu.windows:
    qemu.windows: TASK [Configure IE proxy settings] *********************************************
    qemu.windows: skipping: [default]
    qemu.windows:
    qemu.windows: TASK [Import IE proxy configuration to WinHTTP] ********************************
    qemu.windows: skipping: [default]
    qemu.windows:
    qemu.windows: TASK [Ensure Chocolatey installed from internal repo] **************************
    qemu.windows: [WARNING]: Chocolatey was missing from this system, so it was installed during
    qemu.windows: this task run.
    qemu.windows: changed: [default]
    qemu.windows:
    qemu.windows: TASK [Set chocolatey proxy] ****************************************************
    qemu.windows: skipping: [default]
    qemu.windows:
    qemu.windows: TASK [Disable uncessary services] **********************************************
    qemu.windows: changed: [default] => (item=WSearch)
    qemu.windows: changed: [default] => (item=Spooler)
    qemu.windows:
    qemu.windows: TASK [Disable OneDrive] ********************************************************
    qemu.windows: changed: [default]
    qemu.windows:
    qemu.windows: TASK [Disable Cortana] *********************************************************
    qemu.windows: changed: [default]
    qemu.windows:
    qemu.windows: TASK [Disable Defender] ********************************************************
    qemu.windows: changed: [default]
    qemu.windows:
    qemu.windows: TASK [Download Visual Studio 2022 community installer] *************************
    qemu.windows: changed: [default]
    qemu.windows:
    qemu.windows: TASK [Install Visual Studio Native Desktop Workload] ***************************
    qemu.windows: fatal: [default]: FAILED! => changed=true
    qemu.windows:   cmd: vs_community.exe --quiet --wait --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop
    qemu.windows:   delta: '0:02:50.757311'
    qemu.windows:   end: '2025-03-12 17:14:58.911774'
    qemu.windows:   msg: non-zero return code
    qemu.windows:   rc: 1603
    qemu.windows:   start: '2025-03-12 17:12:08.154462'
    qemu.windows:   stderr: ''
    qemu.windows:   stderr_lines: <omitted>
    qemu.windows:   stdout: |-
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\2052\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1029\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1033\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1055\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1040\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\3082\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1036\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1028\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1046\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1045\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1031\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1041\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1042\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\HelpFile\1049\help.html...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\vs_setup_bootstrapper.exe...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Interop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.C2RSignatureReader.Native.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.Identity.Client.Broker.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.Identity.Client.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.Identity.Client.Extensions.Msal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.Identity.Client.NativeInterop.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.IdentityModel.Abstractions.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.RemoteControl.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Common.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Download.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.Telemetry.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Microsoft.VisualStudio.Utilities.Internal.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\runtimes\win-x64\native\msalruntime.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\runtimes\win-arm64\native\msalruntime_arm64.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\runtimes\win-x86\native\msalruntime_x86.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\Newtonsoft.Json.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\System.Memory.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\System.Runtime.CompilerServices.Unsafe.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\VSInstallerElevationService.Contracts.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\zh-Hant\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\pt-BR\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\ja\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\es\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\tr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\de\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\cs\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\pl\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\it\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\zh-Hans\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\fr\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\ko\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\ru\vs_setup_bootstrapper.resources.dll...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\vs_setup_bootstrapper.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\vs_setup_bootstrapper.exe.config...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\detection.json...
    qemu.windows:     Preparing: C:\Users\vagrant\AppData\Local\Temp\2b9384b486fbbca36c768aa6\vs_bootstrapper_d15\vs_setup_bootstrapper.json...
    qemu.windows:   stdout_lines: <omitted>
    qemu.windows:
    qemu.windows: PLAY RECAP *********************************************************************
    qemu.windows: default                    : ok=7    changed=6    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0
    qemu.windows:
==> qemu.windows: Provisioning step had errors: Running the cleanup provisioner, if present...
==> qemu.windows: Deleting output directory...

Ch4asing avatar Mar 12 '25 17:03 Ch4asing

Thanks for the feedback The PACKER_LOG=1 doesn't change Packer's behavior in any way, simply adding more logging.

The only solution right now is to retry a couple of times. Maybe updating to Windows 11 24h2 will solve this problem

Wenzel avatar Mar 12 '25 19:03 Wenzel