hashicorp / packer-plugin-qemu

Packer plugin for QEMU Builder
https://www.packer.io/docs/builders/qemu
Mozilla Public License 2.0
59 stars 43 forks source link

Efi-build example fails for me. #147

Closed Folaht closed 1 year ago

Folaht commented 1 year ago

Overview of the Issue

Once the iso is downloaded, which link needs updated,
as it's no longer current, I receive the following error:

==> qemu.debian_efi: failed to locate swtpm (exec: "swtpm": executable file not found in $PATH), this is required for vTPM support

Reproduction Steps

packer build efi-debian.pkr.hcl

Plugin and Packer version

1.0.9 & 1.9.1

Simplified Packer Buildfile

If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.

Operating system and Environment details

$neofetch
██████████████████  ████████   folaht@xxx
██████████████████  ████████   ------------------
██████████████████  ████████   OS: Manjaro Linux x86_64
██████████████████  ████████   Kernel: 6.1.31-2-MANJARO
████████            ████████   Uptime: 14 days, 4 hours, 57 mins
████████  ████████  ████████   Packages: 1560 (pacman)
████████  ████████  ████████   Shell: bash 5.1.16
████████  ████████  ████████   Resolution: 3840x1080
████████  ████████  ████████   DE: Xfce 4.18
████████  ████████  ████████   WM: Xfwm4
████████  ████████  ████████   WM Theme: Matcha-sea
████████  ████████  ████████   Theme: Matcha-sea [GTK2], Adwaita [GTK3]
████████  ████████  ████████   Icons: Papirus-Maia [GTK2], Adwaita [GTK3]
████████  ████████  ████████   Terminal: alacritty
                               CPU: Intel Pentium Silver J5040 (4) @ 3.200GHz
                               GPU: Intel GeminiLake [UHD Graphics 605]
                               Memory: 5625MiB / 35734MiB

Log Fragments and crash.log files

https://gist.github.com/Folaht/bfae339b8f78d397e536bbca1fbd539e

lbajolet-hashicorp commented 1 year ago

Hi @Folaht,

The error message points to you not having swtpm installed, which is required by the plugin in order to expose a virtual TPM to the VM, have you tried installing it before running the build?

Since you're on Manjaro, the following should get you started: pacman -S swtpm