diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7d7317c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +ovmf/*.fd filter=lfs diff=lfs merge=lfs -text diff --git a/Vagrantfile b/Vagrantfile index 53b4830..1e85963 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,3 +1,5 @@ +BOX_DIR = File.dirname(File.expand_path(__FILE__)) + Vagrant.configure(2) do |config| config.vm.provider :libvirt do |libvirt| libvirt.memory = 4096 @@ -31,6 +33,10 @@ Vagrant.configure(2) do |config| libvirt.graphics_port = 0 end end + + libvirt.nvram = File.join(BOX_DIR, 'efivars.fd') + libvirt.loader = File.join(BOX_DIR, Dir.glob('OVMF_CODE*', base: BOX_DIR).first) + libvirt.machine_type = 'pc-q35-8.2' end config.vm.synced_folder '.', '/vagrant', disabled: true diff --git a/alpine-3.18.pkr.hcl b/alpine-3.18.pkr.hcl index dd4b690..9127e49 100644 --- a/alpine-3.18.pkr.hcl +++ b/alpine-3.18.pkr.hcl @@ -21,7 +21,10 @@ source "qemu" "alpine318" { "setup-interfaces -a -r && ", "setup-sshd -k 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.pub' openssh", ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,13 @@ build { } } + provisioner "shell" { + inline = [ + "apk add efibootmgr", + "efibootmgr -c -d /dev/vda -p 1 -L alpine -l '\\EFI\\alpine\\grubx64.efi'", + ] + } + provisioner "shell" { inline = ["reboot"] expect_disconnect = true @@ -64,6 +74,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/alpine-3.19.pkr.hcl b/alpine-3.19.pkr.hcl index 6887045..28844cd 100644 --- a/alpine-3.19.pkr.hcl +++ b/alpine-3.19.pkr.hcl @@ -21,7 +21,10 @@ source "qemu" "alpine319" { "setup-interfaces -a -r && ", "setup-sshd -k 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.pub' openssh", ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,13 @@ build { } } + provisioner "shell" { + inline = [ + "apk add efibootmgr", + "efibootmgr -c -d /dev/vda -p 1 -L alpine -l '\\EFI\\alpine\\grubx64.efi'", + ] + } + provisioner "shell" { inline = ["reboot"] expect_disconnect = true @@ -64,6 +74,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/alpine-3.20.pkr.hcl b/alpine-3.20.pkr.hcl index 8452e72..04a84fc 100644 --- a/alpine-3.20.pkr.hcl +++ b/alpine-3.20.pkr.hcl @@ -21,7 +21,10 @@ source "qemu" "alpine320" { "setup-interfaces -a -r && ", "setup-sshd -k 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.pub' openssh", ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,13 @@ build { } } + provisioner "shell" { + inline = [ + "apk add efibootmgr", + "efibootmgr -c -d /dev/vda -p 1 -L alpine -l '\\EFI\\alpine\\grubx64.efi'", + ] + } + provisioner "shell" { inline = ["reboot"] expect_disconnect = true @@ -64,6 +74,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/alpine-3.21.pkr.hcl b/alpine-3.21.pkr.hcl index 0e5fb57..6732fa3 100644 --- a/alpine-3.21.pkr.hcl +++ b/alpine-3.21.pkr.hcl @@ -21,7 +21,10 @@ source "qemu" "alpine321" { "setup-interfaces -a -r && ", "setup-sshd -k 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.pub' openssh", ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,13 @@ build { } } + provisioner "shell" { + inline = [ + "apk add efibootmgr", + "efibootmgr -c -d /dev/vda -p 1 -L alpine -l '\\EFI\\alpine\\grubx64.efi'", + ] + } + provisioner "shell" { inline = ["reboot"] expect_disconnect = true @@ -64,6 +74,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/alpine-answer.sh b/alpine-answer.sh index d9559d4..80fca8d 100644 --- a/alpine-answer.sh +++ b/alpine-answer.sh @@ -18,4 +18,4 @@ ROOTSSHKEY="${trimspace(file("${path.root}/keys/vagrant.pub"))}" NTPOPTS="openntpd" -DISKOPTS="-k lts -m sys /dev/vda" +DISKOPTS="-v -k lts -m sys /dev/vda" diff --git a/common.pkr.hcl b/common.pkr.hcl index 06f146e..74c1b2c 100644 --- a/common.pkr.hcl +++ b/common.pkr.hcl @@ -21,6 +21,12 @@ variable "headless" { description = "Build in headless mode" } +variable "machine_type" { + type = string + default = "pc-q35-8.2" + description = "QEMU machine type" +} + data "external-raw" "git-describe" { program = ["git", "describe", "--tags"] } diff --git a/debian-12.pkr.hcl b/debian-12.pkr.hcl index 749ec33..e8f4bcc 100644 --- a/debian-12.pkr.hcl +++ b/debian-12.pkr.hcl @@ -15,16 +15,18 @@ source "qemu" "debian12" { ssh_username = "root" ssh_password = "vagrant" boot_command = [ - "", - "", - "/install.amd/vmlinuz console=ttyS0 ", - "auto=true DEBIAN_FRONTEND=text TERM=dumb debconf/priority=critical ", - "keyboard-configuration/xkb-keymap=en ", - "initrd=/install.amd/initrd.gz --- ", - "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-preseed.cfg ", - "" + "c", + "set gfxpayload=keep", + "linux /install.amd/vmlinuz console=ttyS0 ", + "auto=true DEBIAN_FRONTEND=text TERM=dumb priority=critical keymap=en ", + "url=http://{{.HTTPIP}}:{{.HTTPPort}}/debian-preseed.cfg --- ", + "initrd /install.amd/initrd.gz", + "boot", ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -80,6 +82,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/fedora-40.pkr.hcl b/fedora-40.pkr.hcl index d8c1154..eec16ff 100644 --- a/fedora-40.pkr.hcl +++ b/fedora-40.pkr.hcl @@ -23,7 +23,10 @@ source "qemu" "fedora40" { "initrd /images/pxeboot/initrd.img", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -34,6 +37,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/fedora-41.pkr.hcl b/fedora-41.pkr.hcl index e38f91f..95488da 100644 --- a/fedora-41.pkr.hcl +++ b/fedora-41.pkr.hcl @@ -23,7 +23,10 @@ source "qemu" "fedora41" { "initrd /images/pxeboot/initrd.img", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -34,6 +37,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/opensuse-leap-15.6.pkr.hcl b/opensuse-leap-15.6.pkr.hcl index 9bbc002..ca4c947 100644 --- a/opensuse-leap-15.6.pkr.hcl +++ b/opensuse-leap-15.6.pkr.hcl @@ -15,12 +15,17 @@ source "qemu" "opensuseleap156" { ssh_username = "vagrant" ssh_password = "vagrant" boot_command = [ - "", - "linux netsetup=dhcp lang=en_US textmode=1 ssh=0 sshd=0 linuxrc.log=/dev/ttyS0 ", - "autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse.xml", - "" + "c", + "set gfxpayload=keep", + "linux /boot/x86_64/loader/linux netsetup=dhcp lang=en_US textmode=1 ssh=0 sshd=0 linuxrc.log=/dev/ttyS0 ", + "autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse.xml", + "initrd /boot/x86_64/loader/initrd", + "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -31,6 +36,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/opensuse-tumbleweed.pkr.hcl b/opensuse-tumbleweed.pkr.hcl index c19ea40..90fb527 100644 --- a/opensuse-tumbleweed.pkr.hcl +++ b/opensuse-tumbleweed.pkr.hcl @@ -31,12 +31,17 @@ source "qemu" "opensusetumbleweed" { ssh_username = "vagrant" ssh_password = "vagrant" boot_command = [ - "", - "linux netsetup=dhcp lang=en_US textmode=1 ssh=0 sshd=0 linuxrc.log=/dev/ttyS0 ", - "autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse.xml", - "" + "c", + "set gfxpayload=keep", + "linux /boot/x86_64/loader/linux netsetup=dhcp lang=en_US textmode=1 ssh=0 sshd=0 linuxrc.log=/dev/ttyS0 ", + "autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse.xml", + "initrd /boot/x86_64/loader/initrd", + "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -47,6 +52,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/ovmf/OVMF_CODE.4m.fd b/ovmf/OVMF_CODE.4m.fd new file mode 100644 index 0000000..a722c72 Binary files /dev/null and b/ovmf/OVMF_CODE.4m.fd differ diff --git a/ovmf/OVMF_VARS.4m.fd b/ovmf/OVMF_VARS.4m.fd new file mode 100644 index 0000000..efb4f46 Binary files /dev/null and b/ovmf/OVMF_VARS.4m.fd differ diff --git a/ovmf/OvmfPkg.License.txt b/ovmf/OvmfPkg.License.txt new file mode 100644 index 0000000..6ec950c --- /dev/null +++ b/ovmf/OvmfPkg.License.txt @@ -0,0 +1,79 @@ +Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved. + +SPDX-License-Identifier: BSD-2-Clause-Patent + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +Subject to the terms and conditions of this license, each copyright holder +and contributor hereby grants to those receiving rights under this license +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except for failure to satisfy the conditions of this license) patent +license to make, have made, use, offer to sell, sell, import, and otherwise +transfer this software, where such license applies only to those patent +claims, already acquired or hereafter acquired, licensable by such copyright +holder or contributor that are necessarily infringed by: + +(a) their Contribution(s) (the licensed copyrights of copyright holders and + non-copyrightable additions of contributors, in source or binary form) + alone; or + +(b) combination of their Contribution(s) with the work of authorship to + which such Contribution(s) was added by such copyright holder or + contributor, if, at the time the Contribution is added, such addition + causes such combination to be necessarily infringed. The patent license + shall not apply to any other combinations which include the + Contribution. + +Except as expressly stated above, no rights or licenses from any copyright +holder or contributor is granted under this license, whether expressly, by +implication, estoppel or otherwise. + +DISCLAIMER + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +================================================================================ + +Some files are subject to the following license, the MIT license. Those files +are located in: +- OvmfPkg/Include/IndustryStandard/Xen/ +- OvmfPkg/XenBusDxe/ + +SPDX-License-Identifier: MIT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/ovmf/edk2.License.txt b/ovmf/edk2.License.txt new file mode 100644 index 0000000..ee84050 --- /dev/null +++ b/ovmf/edk2.License.txt @@ -0,0 +1,51 @@ +Copyright (c) 2019, TianoCore and contributors. All rights reserved. + +SPDX-License-Identifier: BSD-2-Clause-Patent + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +Subject to the terms and conditions of this license, each copyright holder +and contributor hereby grants to those receiving rights under this license +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except for failure to satisfy the conditions of this license) patent +license to make, have made, use, offer to sell, sell, import, and otherwise +transfer this software, where such license applies only to those patent +claims, already acquired or hereafter acquired, licensable by such copyright +holder or contributor that are necessarily infringed by: + +(a) their Contribution(s) (the licensed copyrights of copyright holders and + non-copyrightable additions of contributors, in source or binary form) + alone; or + +(b) combination of their Contribution(s) with the work of authorship to + which such Contribution(s) was added by such copyright holder or + contributor, if, at the time the Contribution is added, such addition + causes such combination to be necessarily infringed. The patent license + shall not apply to any other combinations which include the + Contribution. + +Except as expressly stated above, no rights or licenses from any copyright +holder or contributor is granted under this license, whether expressly, by +implication, estoppel or otherwise. + +DISCLAIMER + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/silverblue-40.pkr.hcl b/silverblue-40.pkr.hcl index d43fab7..4bad70a 100644 --- a/silverblue-40.pkr.hcl +++ b/silverblue-40.pkr.hcl @@ -23,7 +23,10 @@ source "qemu" "silverblue40" { "initrd /images/pxeboot/initrd.img", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -34,6 +37,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/silverblue-41.pkr.hcl b/silverblue-41.pkr.hcl index d554057..8abb4e1 100644 --- a/silverblue-41.pkr.hcl +++ b/silverblue-41.pkr.hcl @@ -23,7 +23,10 @@ source "qemu" "silverblue41" { "initrd /images/pxeboot/initrd.img", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -34,6 +37,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/ubuntu-22.04.pkr.hcl b/ubuntu-22.04.pkr.hcl index f199c1b..5d58b8d 100644 --- a/ubuntu-22.04.pkr.hcl +++ b/ubuntu-22.04.pkr.hcl @@ -22,7 +22,10 @@ source "qemu" "ubuntu2204" { "initrd /casper/initrd", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/ubuntu-24.04.pkr.hcl b/ubuntu-24.04.pkr.hcl index d9fe1ac..1059b87 100644 --- a/ubuntu-24.04.pkr.hcl +++ b/ubuntu-24.04.pkr.hcl @@ -22,7 +22,10 @@ source "qemu" "ubuntu2404" { "initrd /casper/initrd", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" { diff --git a/ubuntu-24.10.pkr.hcl b/ubuntu-24.10.pkr.hcl index fa7c659..9683240 100644 --- a/ubuntu-24.10.pkr.hcl +++ b/ubuntu-24.10.pkr.hcl @@ -22,7 +22,10 @@ source "qemu" "ubuntu2410" { "initrd /casper/initrd", "boot" ] + efi_firmware_code = "${path.root}/ovmf/OVMF_CODE.4m.fd" + efi_firmware_vars = "${path.root}/ovmf/OVMF_VARS.4m.fd" qemuargs = [["-serial", "stdio"]] + machine_type = var.machine_type } build { @@ -39,6 +42,12 @@ build { post-processors { post-processor "vagrant" { vagrantfile_template = "Vagrantfile" + include = [ + "${path.root}/ovmf/OVMF_CODE.4m.fd", + "${path.root}/output-${source.name}/efivars.fd", + "${path.root}/ovmf/edk2.License.txt", + "${path.root}/ovmf/OvmfPkg.License.txt", + ] } post-processor "vagrant-registry" {