From eadc216b10810cd5bd7efcc8f7aedf19a609b95a Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Mon, 27 Nov 2023 23:33:56 +0800 Subject: [PATCH 01/28] Add FreeBSD 14.0-RELEASE (#1538) Signed-off-by: Li-Wen Hsu --- .github/workflows/pkr-bld-hyperv-x64.yml | 1 + .github/workflows/pkr-bld-parallels-arm64.yml | 1 + .github/workflows/pkr-bld-parallels-x64.yml | 1 + .github/workflows/pkr-bld-qemu-arm64.yml | 1 + .github/workflows/pkr-bld-qemu-x64.yml | 1 + .github/workflows/pkr-bld-virtualbox-arm64.yml | 1 + .github/workflows/pkr-bld-virtualbox-x64.yml | 1 + .github/workflows/pkr-bld-vmware-arm64.yml | 1 + .github/workflows/pkr-bld-vmware-x64.yml | 1 + builds.yml | 3 +++ os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl | 9 +++++++++ os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl | 9 +++++++++ 12 files changed, 30 insertions(+) create mode 100644 os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl create mode 100644 os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index bfb2cb1d5..62dabdbb2 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 475684809..353648dac 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index ad314d708..02c6c09e2 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index 84f662037..a49121387 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index 81939a74b..3a86d84fb 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index 4388429b6..83e89b93c 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 173c381b8..3b8619d86 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index f5cedfc32..527c3cd8d 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 1b37b9abc..94f43c695 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -23,6 +23,7 @@ jobs: - fedora-39 - freebsd-12 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - oracle-7 - oracle-8 diff --git a/builds.yml b/builds.yml index 34ba53df2..4aa1bf5df 100644 --- a/builds.yml +++ b/builds.yml @@ -15,6 +15,7 @@ public: - 'fedora-39' - 'freebsd-12' - 'freebsd-13' + - 'freebsd-14' - 'opensuse-leap-15' - 'oracle-7' - 'oracle-8' @@ -41,6 +42,7 @@ public: - 'fedora-39-arm64' - 'freebsd-12-arm64' - 'freebsd-13-arm64' + - 'freebsd-14-arm64' - 'opensuse-leap-15-arm64' - 'oracle-7-arm64' - 'oracle-8-arm64' @@ -65,6 +67,7 @@ slugs: 'fedora-latest': 'fedora-38' 'freebsd-12': 'freebsd-12' 'freebsd-13': 'freebsd-13' + 'freebsd-14': 'freebsd-14' 'opensuse-leap-15': 'opensuse-leap-15' 'oracle-7': 'oracle-7' 'oracle-8': 'oracle-8' diff --git a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl new file mode 100644 index 000000000..69344d36c --- /dev/null +++ b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "freebsd" +os_version = "14.0" +os_arch = "aarch64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-arm64-aarch64" +parallels_guest_os_type = "freebsd" +vbox_guest_os_type = "FreeBSD_64" +vmware_guest_os_type = "arm-freebsd-64" +boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl new file mode 100644 index 000000000..3e2c2138e --- /dev/null +++ b/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "freebsd" +os_version = "14.0" +os_arch = "x86_64" +iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-amd64" +parallels_guest_os_type = "freebsd" +vbox_guest_os_type = "FreeBSD_64" +vmware_guest_os_type = "freebsd-64" +boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig"] From 014e04f23e0d5678adbc82ae25e5312f3b9f2b55 Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Tue, 28 Nov 2023 00:49:27 +0800 Subject: [PATCH 02/28] Fix os_arch of freebsd-13-aarch64 config (#1539) Signed-off-by: Li-Wen Hsu --- os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl index 6c8ec883a..b467c948e 100644 --- a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl @@ -1,6 +1,6 @@ os_name = "freebsd" os_version = "13.2" -os_arch = "x86_64" +os_arch = "aarch64" iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-arm64-aarch64-disc1.iso" iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" From 04c78b2d25ab497e57c28ece640285bba8f5bff0 Mon Sep 17 00:00:00 2001 From: Shawn Kelly O'Shea Date: Thu, 7 Dec 2023 14:05:50 -0500 Subject: [PATCH 03/28] Bump almalinux minor versions (#1540) --- os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl | 4 ++-- os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl | 4 ++-- os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl | 4 ++-- os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl index 1e576d376..56b364127 100644 --- a/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "8.8" +os_version = "8.9" os_arch = "aarch64" -iso_url = "https://repo.almalinux.org/almalinux/8/isos/aarch64/AlmaLinux-8.8-aarch64-minimal.iso" +iso_url = "https://repo.almalinux.org/almalinux/8/isos/aarch64/AlmaLinux-8.9-aarch64-minimal.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl index 3ca1bb569..494183e16 100644 --- a/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "8.8" +os_version = "8.9" os_arch = "x86_64" -iso_url = "https://repo.almalinux.org/almalinux/8/isos/x86_64/AlmaLinux-8.8-x86_64-minimal.iso" +iso_url = "https://repo.almalinux.org/almalinux/8/isos/x86_64/AlmaLinux-8.9-x86_64-minimal.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/8/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl index 1052b8951..9a0c45b7b 100644 --- a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "9.2" +os_version = "9.3" os_arch = "aarch64" -iso_url = "https://repo.almalinux.org/almalinux/9/isos/aarch64/AlmaLinux-9.2-aarch64-dvd.iso" +iso_url = "https://repo.almalinux.org/almalinux/9/isos/aarch64/AlmaLinux-9.3-aarch64-dvd.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/9/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl index 722d23ee1..7a6a8456b 100644 --- a/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "9.2" +os_version = "9.3" os_arch = "x86_64" -iso_url = "https://repo.almalinux.org/almalinux/9/isos/x86_64/AlmaLinux-9.2-x86_64-dvd.iso" +iso_url = "https://repo.almalinux.org/almalinux/9/isos/x86_64/AlmaLinux-9.3-x86_64-dvd.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/9/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" From be8b5e342a582e9d30eeb5bbf3b86b52dd1264f0 Mon Sep 17 00:00:00 2001 From: Phillip Ross Date: Sat, 23 Dec 2023 21:31:15 -0500 Subject: [PATCH 04/28] - update to rockylinux 9.3 (#1542) --- os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl | 4 ++-- os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl index 016152923..f3d975df4 100644 --- a/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "9.2" +os_version = "9.3" os_arch = "aarch64" -iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.2-aarch64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.3-aarch64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/9/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl index c2080690f..19438d23a 100644 --- a/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "9.2" +os_version = "9.3" os_arch = "x86_64" -iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.2-x86_64-dvd.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.3-x86_64-dvd.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/9/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" From 99d5e1d90754cebbf25c2f784409f1fa448f7244 Mon Sep 17 00:00:00 2001 From: Seth Grover <13872653+mmguero@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:11:29 -0700 Subject: [PATCH 05/28] Bump Debian to v12.4, released December 10th, 2023 (#1541) --- os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl | 6 +++--- os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index a09a8ca52..aa3acc355 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.1" +os_version = "12.4" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.1.0/arm64/iso-dvd/debian-12.1.0-arm64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.1.0/arm64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/debian-12.4.0-arm64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian-64" diff --git a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl index 27a47e5d1..817f0a3c3 100644 --- a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.1" +os_version = "12.4" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.1.0/amd64/iso-dvd/debian-12.1.0-amd64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.1.0/amd64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/debian-12.4.0-amd64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" From ba10f22c8c82b8baf868f8e79bf985af3de4d253 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 31 Jan 2024 16:07:00 -0600 Subject: [PATCH 06/28] Update latest OS versions and fix arm64 build list command (#1543) * Update latest OS versions and fix arm64 build list command --------- --- .github/workflows/pkr-bld-hyperv-x64.yml | 7 +- .github/workflows/pkr-bld-parallels-arm64.yml | 3 +- .github/workflows/pkr-bld-parallels-x64.yml | 7 +- .github/workflows/pkr-bld-qemu-arm64.yml | 3 +- .github/workflows/pkr-bld-qemu-x64.yml | 7 +- .../workflows/pkr-bld-virtualbox-arm64.yml | 3 +- .github/workflows/pkr-bld-virtualbox-x64.yml | 7 +- .github/workflows/pkr-bld-vmware-arm64.yml | 3 +- .github/workflows/pkr-bld-vmware-x64.yml | 7 +- CHANGELOG.md | 90 ++++++++++--------- README.md | 9 +- builds.yml | 25 +----- lib/bento/cli.rb | 9 +- lib/bento/common.rb | 1 + lib/bento/upload.rb | 19 ++-- lib/bento/version.rb | 2 +- .../centos/centos-7-aarch64.pkrvars.hcl | 2 +- os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl | 2 +- .../debian/debian-11-aarch64.pkrvars.hcl | 4 +- .../debian/debian-11-x86_64.pkrvars.hcl | 4 +- .../freebsd/freebsd-12-aarch64.pkrvars.hcl | 9 -- .../freebsd/freebsd-12-x86_64.pkrvars.hcl | 9 -- .../oracle/oracle-8-aarch64.pkrvars.hcl | 6 +- os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl | 6 +- .../oracle/oracle-9-aarch64.pkrvars.hcl | 6 +- os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl | 6 +- os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl | 2 +- .../rockylinux-8-aarch64.pkrvars.hcl | 4 +- .../rockylinux-8-x86_64.pkrvars.hcl | 4 +- .../scientificlinux-7-x86_64.pkrvars.hcl | 9 -- os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl | 6 +- .../springdalelinux-7-x86_64.pkrvars.hcl | 9 -- .../springdalelinux-8-x86_64.pkrvars.hcl | 9 -- .../springdalelinux-9-x86_64.pkrvars.hcl | 9 -- .../ubuntu/ubuntu-20.04-aarch64.pkrvars.hcl | 2 +- ...s.hcl => ubuntu-23.10-aarch64.pkrvars.hcl} | 6 +- ...rs.hcl => ubuntu-23.10-x86_64.pkrvars.hcl} | 6 +- 40 files changed, 125 insertions(+), 203 deletions(-) delete mode 100644 os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/scientificlinux/scientificlinux-7-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/springdalelinux/springdalelinux-7-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/springdalelinux/springdalelinux-8-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/springdalelinux/springdalelinux-9-x86_64.pkrvars.hcl rename os_pkrvars/ubuntu/{ubuntu-23.04-aarch64.pkrvars.hcl => ubuntu-23.10-aarch64.pkrvars.hcl} (69%) rename os_pkrvars/ubuntu/{ubuntu-23.04-x86_64.pkrvars.hcl => ubuntu-23.10-x86_64.pkrvars.hcl} (61%) diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index 62dabdbb2..fae3953c8 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -30,13 +29,9 @@ jobs: - oracle-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - hyperv-iso steps: diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 353648dac..08ec7d8ab 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +31,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - parallels-iso steps: diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index 02c6c09e2..1b9d1d3e2 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -30,13 +29,9 @@ jobs: - oracle-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - parallels-iso steps: diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index a49121387..69e50b286 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +31,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - qemu steps: diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index 3a86d84fb..b5fbc75bd 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -30,13 +29,9 @@ jobs: - oracle-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - qemu steps: diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index 83e89b93c..5a5057700 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +31,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - virtualbox-iso steps: diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 3b8619d86..e3d29389e 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -30,13 +29,9 @@ jobs: - oracle-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - virtualbox-iso steps: diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index 527c3cd8d..dcfd9e484 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +31,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - vmware-iso steps: diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 94f43c695..0e8b489d4 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -21,7 +21,6 @@ jobs: - debian-12 - fedora-38 - fedora-39 - - freebsd-12 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -30,13 +29,9 @@ jobs: - oracle-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-23.10 provider: - vmware-iso steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 395fa9c4d..073a25234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,45 +5,41 @@ ***Note:** Markdown table generated at -| | hyperv
x86_64 | parallels
x86_64 | parallels
aarch64 | qemu
x86_64 | qemu
aarch64 | virtualbox
x86_64 | virtualbox
aarch64 | vmware
x86_64 | vmware
aarch64 | -|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| almalinux-8 | | x | | x | | x | | x | | -| almalinux-9 | | x | x | | | x | | x | x | -| amazonlinux-2 | | na | na | | | | na | | na | -| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | -| centos-7 | | x | | x | | x | | x | | -| centos-stream-8 | | x | | x | | x | | x | | -| centos-stream-9 | | | x | | | | | | | -| debian-11 | | x | x | | | x | | x | | -| debian-12 | | x | x | | | x | | x | x | -| fedora-37 | | x | x | x | | x | | x | x | -| fedora-38 | | x | | x | | x | | x | x | -| freebsd-12 | | | | | | x | | x | | -| freebsd-13 | | | | | | x | | x | | -| opensuse-leap-15 | | x | | x | | x | | x | | -| oraclelinux-7 | | x | | x | | x | | x | | -| oraclelinux-8 | | | | x | | x | | x | | -| oraclelinux-9 | | x | x | | | x | | x | | -| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rockylinux-8 | | x | | x | | x | | x | | -| rockylinux-9 | | x | | | | x | | x | x | -| scientificlinux-7 | | x | na | x | na | x | na | x | na | -| sles-12 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| sles-13 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| solaris-11 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| springdalelinux-7 | | x | na | x | na | | na | | na | -| springdalelinux-8 | | x | na | x | na | x | na | x | na | -| springdalelinux-9 | | | na | | na | | na | | na | -| ubuntu-20.04 | | x | x | | | x | | x | x | -| ubuntu-22.04 | | x | | x | | x | | x | | -| ubuntu-23.04 | | x | | x | | x | | x | | -| windows-10 | | x | na | | na | x | na | | na | -| windows-11 | | x | na | | na | x | na | | na | -| windows-2016 | | x | na | | na | x | na | | na | -| windows-2019 | | x | na | | na | x | na | | na | -| windows-2022 | | x | na | | na | x | na | | na | +| | hyperv
x86_64 | parallels
x86_64 | parallels
aarch64 | qemu
x86_64 | qemu
aarch64 | virtualbox
x86_64 | virtualbox
aarch64 | vmware
x86_64 | vmware
aarch64 | +|:-----------------:|:---:|:---:|:--------------------:|:---:|:---:|:---:|:---:|:---:|:---:| +| almalinux-8 | | x | | x | | x | | x | | +| almalinux-9 | | x | x | | | x | | x | x | +| amazonlinux-2 | | na | na | | | | na | | na | +| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | +| centos-7 | | x | | x | | x | | x | | +| centos-stream-8 | | x | | x | | x | | x | | +| centos-stream-9 | | | x | | | | | | | +| debian-11 | | x | x | | | x | | x | | +| debian-12 | | x | x | | | x | | x | x | +| fedora-38 | | x | | x | | x | | x | x | +| fedora-39 | | | | | | | | | | +| freebsd-12 | | | | | | x | | x | | +| freebsd-13 | | | | | | x | | x | | +| opensuse-leap-15 | | x | | x | | x | | x | | +| oraclelinux-7 | | x | | x | | x | | x | | +| oraclelinux-8 | | | | x | | x | | x | | +| oraclelinux-9 | | x | x | | | x | | x | | +| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rockylinux-8 | | x | | x | | x | | x | | +| rockylinux-9 | | x | | | | x | | x | x | +| sles-12 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| sles-13 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| solaris-11 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| ubuntu-20.04 | | x | x | | | x | | x | x | +| ubuntu-22.04 | | x | | x | | x | | x | | +| ubuntu-23.10 | | | | | | | | | | +| windows-10 | | x | na | | na | x | na | | na | +| windows-11 | | x | na | | na | x | na | | na | +| windows-2016 | | x | na | | na | x | na | | na | +| windows-2019 | | x | na | | na | x | na | | na | +| windows-2022 | | x | na | | na | x | na | | na | ### Todo @@ -58,7 +54,21 @@ Markdown table generated at - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches - Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2023-09-15) +## [unreleased] (2024-01-31) + +- Fix build list generation on aarch64 machines +- Updated Debian 12 to 12.4 +- Updated RockyLinux 9 to 9.3 +- Updated Oracle Linux 8 to 8.9 +- Updated Oracle Linux 9 to 9.3 +- Added FreeBSD 14 +- Removed FreeBSD 12 +- Added Fedora 39 +- Removed Fedora 37 +- Remove Scientific Linux 7 +- Remove Springdale Linux builds +- Removed Ubuntu 23.04 +- Added Ubuntu 23.10 ## [v.3.2.0] (2023-09-15) diff --git a/README.md b/README.md index da579c5c5..5daaa8919 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,12 @@ end - [VirtualBox](https://www.virtualbox.org/) - [VMware Fusion](https://www.vmware.com/products/fusion.html) - [VMware Workstation](https://www.vmware.com/products/workstation-pro.html) - - [Parallels Desktop](https://www.parallels.com/products/desktop/) also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versons < 19.x - - [qemu](https://www.qemu.org/) * - - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) * + - [Parallels Desktop Pro](https://www.parallels.com/products/desktop/)*2 also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versions < 19.x + - [qemu](https://www.qemu.org/) *1 + - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) *1 -***NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. +*1**NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. +*2**NOTE:** AARCH64 or ARM64 support is only guaranteed through parallels provider. ### Using `bento` executable diff --git a/builds.yml b/builds.yml index 4aa1bf5df..a429f96e8 100644 --- a/builds.yml +++ b/builds.yml @@ -13,7 +13,6 @@ public: - 'debian-12' - 'fedora-38' - 'fedora-39' - - 'freebsd-12' - 'freebsd-13' - 'freebsd-14' - 'opensuse-leap-15' @@ -22,13 +21,9 @@ public: - 'oracle-9' - 'rockylinux-8' - 'rockylinux-9' - - 'scientific-7' - - 'springdalelinux-7' - - 'springdalelinux-8' - - 'springdalelinux-9' - 'ubuntu-20.04' - 'ubuntu-22.04' - - 'ubuntu-23.04' + - 'ubuntu-23.10' - 'almalinux-8-arm64' - 'almalinux-9-arm64' - 'amazon-2-arm64' @@ -40,7 +35,6 @@ public: - 'debian-12-arm64' - 'fedora-38-arm64' - 'fedora-39-arm64' - - 'freebsd-12-arm64' - 'freebsd-13-arm64' - 'freebsd-14-arm64' - 'opensuse-leap-15-arm64' @@ -49,13 +43,9 @@ public: - 'oracle-9-arm64' - 'rockylinux-8-arm64' - 'rockylinux-9-arm64' - - 'scientific-7-arm64' - - 'springdalelinux-7-arm64' - - 'springdalelinux-8-arm64' - - 'springdalelinux-9-arm64' - 'ubuntu-20.04-arm64' - 'ubuntu-22.04-arm64' - - 'ubuntu-23.04-arm64' + - 'ubuntu-23.10-arm64' # slug box name: text string from standard box name to match (generally the same) slugs: @@ -64,8 +54,7 @@ slugs: 'centos-7': 'centos-7' 'debian-12': 'debian-12' 'debian-11': 'debian-11' - 'fedora-latest': 'fedora-38' - 'freebsd-12': 'freebsd-12' + 'fedora-latest': 'fedora-39' 'freebsd-13': 'freebsd-13' 'freebsd-14': 'freebsd-14' 'opensuse-leap-15': 'opensuse-leap-15' @@ -74,16 +63,12 @@ slugs: 'oracle-9': 'oracle-9' 'rockylinux-8': 'rockylinux-8' 'rockylinux-9': 'rockylinux-9' - 'scientific-7': 'scientific-7' - 'springdalelinux-7': 'springdalelinux-7' - 'springdalelinux-8': 'springdalelinux-8' - 'springdalelinux-9': 'springdalelinux-9' 'almalinux-8-arm64': 'almalinux-8' 'almalinux-9-arm64': 'almalinux-9' 'centos-7-arm64': 'centos-7' 'debian-12-arm64': 'debian-12' 'debian-11-arm64': 'debian-11' - 'fedora-latest-arm64': 'fedora-38' + 'fedora-latest-arm64': 'fedora-39' 'oracle-7-arm64': 'oracle-7' 'oracle-8-arm64': 'oracle-8' 'oracle-9-arm64': 'oracle-9' @@ -105,6 +90,4 @@ do_not_build: # - opensuse-leap # - oracle # - rockylinux -# - scientificlinux -# - springdalelinux # - ubuntu diff --git a/lib/bento/cli.rb b/lib/bento/cli.rb index bd3301287..5b44ae3ce 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -11,9 +11,14 @@ class Options NAME = File.basename($PROGRAM_NAME).freeze def self.parse(args) + arch = if RbConfig::CONFIG['host_cpu'] == 'arm64' + 'aarch64' + else + RbConfig::CONFIG['host_cpu'] + end not_buildable = YAML.load(File.read('builds.yml'))['do_not_build'] options = OpenStruct.new - options.template_files = calculate_templates("os_pkrvars/**/*-#{RbConfig::CONFIG['host_cpu']}.pkrvars.hcl") + options.template_files = calculate_templates("os_pkrvars/**/*-#{arch}.pkrvars.hcl") not_buildable.each do |os| options.template_files.delete_if { |template| template.include?(os) } end @@ -83,7 +88,7 @@ def self.parse(args) options.debug = opt end - opts.on('-o BUILDS', '--only BUILDS', 'Only build some Packer builds (ex: parallels-iso,virtualbox-iso,vmware-iso)') do |opt| + opts.on('-o BUILDS', '--only BUILDS', 'Only build some Packer builds (ex: parallels-iso.vm,virtualbox-iso.vm,vmware-iso.vm)') do |opt| options.only = opt end diff --git a/lib/bento/common.rb b/lib/bento/common.rb index a6c6ddf8c..24aa0b81f 100644 --- a/lib/bento/common.rb +++ b/lib/bento/common.rb @@ -64,6 +64,7 @@ def box_metadata(metadata_file) # metadata needed for upload: boxname, version, provider, box filename metadata['name'] = json['name'] metadata['version'] = json['version'] + metadata['arch'] = json['arch'] metadata['box_basename'] = json['box_basename'] metadata['packer'] = json['packer'] metadata['vagrant'] = json['vagrant'] diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index b78c228db..c5cca05ba 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -34,20 +34,26 @@ def start # def upload_box(md_file) md_data = box_metadata(md_file) - + arch = case md_data['arch'] + when 'x86_64', 'amd64' + 'amd64' + when 'aarch64', 'arm64' + 'arm64' + else + raise "Unknown arch #{md_data.inspect}" + end md_data['providers'].each_pair do |prov, prov_data| if File.exist?(File.join('builds', prov_data['file'])) puts '' banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") - - upload_cmd = "vagrant cloud publish --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['name'])}' --short-description '#{box_desc(md_data['name'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" + upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) slug_name = lookup_slug(md_data['name']) if slug_name puts '' banner("Uploading slug #{builds_yml['vagrant_cloud_account']}/#{slug_name} from #{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") - upload_cmd = "vagrant cloud publish --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{slug_name} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{slug_desc(slug_name)}' --short-description '#{slug_desc(slug_name)}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" + upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{slug_name} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{slug_desc(slug_name)}' --short-description '#{slug_desc(slug_name)}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) end @@ -86,9 +92,8 @@ def public_private_box(name) else return '--no-private' if name.start_with?(public) && !public.include?('arm64') end - - return '--private' end + return '--private' end def box_desc(name) @@ -115,6 +120,6 @@ def ver_desc(md_data) tool_versions.sort! tool_versions << "packer: #{md_data['packer']}" - "#{md_data['name'].tr('-', ' ').capitalize} Vagrant box version #{md_data['version']} created with Bento by Chef. Built with: #{tool_versions.join(', ')}" + "#{md_data['box_basename'].capitalize.tr('-', ' ')} Vagrant box version #{md_data['version']} created with Bento by Chef. Built with: #{tool_versions.join(', ')}" end end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 643cd2b80..b701c30fe 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.2.0'.freeze + VERSION = '3.2.1'.freeze end diff --git a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl index 2c4fbc7eb..c9cb1a8bc 100644 --- a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "centos" os_version = "7.9" os_arch = "aarch64" iso_url = "https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/CentOS-7-aarch64-Minimal-2009.iso" -iso_checksum = "1bef71329e51f9bed12349aa026b3fe0c4bb27db729399a3f9addae22848da9b" +iso_checksum = "file:https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/sha256sum.txt" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "arm-centos-64" diff --git a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl index 867d24baf..b78910cf8 100644 --- a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "centos" os_version = "7.9" os_arch = "x86_64" iso_url = "http://mirrors.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso" -iso_checksum = "07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a" +iso_checksum = "file:https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/sha256sum.txt" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "centos-64" diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index cf5dfbab2..ee5e7dedd 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.7" +os_version = "11.8" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.7.0-arm64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.8.0-arm64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index 989e2875e..9107b7f2e 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.7" +os_version = "11.8" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.7.0-amd64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.8.0-amd64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl deleted file mode 100644 index b79ee2f48..000000000 --- a/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "freebsd" -os_version = "12.4" -os_arch = "aarch64" -iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/12.4/FreeBSD-12.4-RELEASE-arm64-aarch64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/12.4/CHECKSUM.SHA256-FreeBSD-12.4-RELEASE-arm64-aarch64" -parallels_guest_os_type = "freebsd" -vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "arm-freebsd-64" -boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig \u0026\u0026 bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl deleted file mode 100644 index 41181b3a9..000000000 --- a/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "freebsd" -os_version = "12.4" -os_arch = "x86_64" -iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/12.4/FreeBSD-12.4-RELEASE-amd64-disc1.iso" -iso_checksum = "606435637b76991f96df68f561badf03266f3d5452e9f72ed9b130d96b188800" -parallels_guest_os_type = "freebsd" -vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "freebsd-64" -boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig \u0026\u0026 bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl index f95e9f8f7..dd1c6561d 100644 --- a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oracle" -os_version = "8.8" +os_version = "8.9" os_arch = "aarch64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u8/aarch64/OracleLinux-R8-U8-aarch64-dvd.iso" -iso_checksum = "6fe0c274b08084787f8d82d8cf2ff7893eea91f018c1f2d0c72383588b2fd480" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/aarch64/OracleLinux-R8-U9-aarch64-dvd.iso" +iso_checksum = "c732ec9bb4a85349c0f1ca82020a8514341247506d114b8b79ec32bf99d59ea0" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "arm-centos-64" diff --git a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl b/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl index 3768bb278..af05d8767 100644 --- a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oracle" -os_version = "8.8" +os_version = "8.9" os_arch = "x86_64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u8/x86_64/OracleLinux-R8-U8-x86_64-dvd.iso" -iso_checksum = "cae39116245ff7c3c86d5305d9c11430ce5c4e512987563435ac59c37a082d7e" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/x86_64/OracleLinux-R8-U9-x86_64-dvd.iso" +iso_checksum = "ce90b598be2e9889fa880128fc53b3e9c1f95d9e31859759e5e180602312c181" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "centos-64" diff --git a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl index 606a8d3cf..f5384427d 100644 --- a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oracle" -os_version = "9.2" +os_version = "9.3" os_arch = "aarch64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u2/aarch64/OracleLinux-R9-U2-aarch64-dvd.iso" -iso_checksum = "412f1a5e90d11313735a2a98a977f82d0d09642e3ab14a03da36d4e2b0b0d275" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/aarch64/OracleLinux-R9-U3-aarch64-dvd.iso" +iso_checksum = "7cc50a48f361cb1100a28621ba455edaac3a38182f6dd3fe67588b3eeaf18dc3" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "arm-centos-64" diff --git a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl b/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl index 9bb6e5078..b76944965 100644 --- a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oracle" -os_version = "9.2" +os_version = "9.3" os_arch = "x86_64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u2/x86_64/OracleLinux-R9-U2-x86_64-dvd.iso" -iso_checksum = "cac3c41cc2d3467ba8902a5d74575bcf460f129634d5a0d1d67d87094dd70b09" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/x86_64/OracleLinux-R9-U3-x86_64-dvd.iso" +iso_checksum = "242f0ecc37417995137507862cb170215c0b5bd512c47badd16b623686ef39e2" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "centos-64" diff --git a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl index 03b29e385..0785f59d0 100644 --- a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "8.8" +os_version = "8.9" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl index 29168e5db..0d939441b 100644 --- a/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "8.8" +os_version = "8.9" os_arch = "x86_64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl index 7223a554a..345324625 100644 --- a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "9.2" +os_version = "9.3" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl index 434e0c5f8..aac6e2b5d 100644 --- a/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "9.2" +os_version = "9.3" os_arch = "x86_64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl index 5a8e84ba1..9a542230e 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "8.8" +os_version = "8.9" os_arch = "aarch64" -iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarch64/Rocky-8.8-aarch64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarch64/Rocky-8.9-aarch64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl index 97dbf6978..e64db8fcd 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "8.8" +os_version = "8.9" os_arch = "x86_64" -iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.8-x86_64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.9-x86_64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/scientificlinux/scientificlinux-7-x86_64.pkrvars.hcl b/os_pkrvars/scientificlinux/scientificlinux-7-x86_64.pkrvars.hcl deleted file mode 100644 index 90f2d7d52..000000000 --- a/os_pkrvars/scientificlinux/scientificlinux-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "scientificlinux" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "http://www.gtlib.gatech.edu/pub/scientific/7.9/x86_64/iso/SL-7-DVD-x86_64.iso" -iso_checksum = "7ac643e164c4a0da0b9f33411c68368cf908e0c34254904044957a3ca7793934" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg"] diff --git a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl index 4cb327e06..4d9b85d40 100644 --- a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl +++ b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "suse" -os_version = "15.4" +os_version = "15.5" os_arch = "x86_64" -iso_url = "https://updates.suse.com/SUSE/Products/SLE-Product-SLES/15-SP4/x86_64/iso/SLE-15-SP4-Online-x86_64-GM-Media1.iso" -iso_checksum = "c0ceebe14d23c6c9484a1594fc5159225292f0847f7f15046f45a83319536d0e" +iso_url = "https://updates.suse.com/SUSE/Products/SLE-Product-SLES/15-SP5/x86_64/iso/SLE-15-SP5-Online-x86_64-GM-Media1.iso" +iso_checksum = "" parallels_guest_os_type = "suse" vbox_guest_os_type = "SUSE_LE_64" vmware_guest_os_type = "sles15-64" diff --git a/os_pkrvars/springdalelinux/springdalelinux-7-x86_64.pkrvars.hcl b/os_pkrvars/springdalelinux/springdalelinux-7-x86_64.pkrvars.hcl deleted file mode 100644 index 3c35a3201..000000000 --- a/os_pkrvars/springdalelinux/springdalelinux-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "springdalelinux" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "http://springdale.princeton.edu/data/springdale/7/x86_64/iso/Springdale%20Linux-7.9-x86_64-netinst.iso" -iso_checksum = "ad47807e17f796bdca35bb3ec5b65f1340d43b698ee04dcf60faecc8c6818c67" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/springdalelinux/7ks.cfg"] diff --git a/os_pkrvars/springdalelinux/springdalelinux-8-x86_64.pkrvars.hcl b/os_pkrvars/springdalelinux/springdalelinux-8-x86_64.pkrvars.hcl deleted file mode 100644 index 443cd96ce..000000000 --- a/os_pkrvars/springdalelinux/springdalelinux-8-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "springdalelinux" -os_version = "8.8" -os_arch = "x86_64" -iso_url = "http://springdale.princeton.edu/data/springdale/8/x86_64/iso/Springdale%20Linux-8.8-x86_64-netinst.iso" -iso_checksum = "8bd617eb9fb050387fdf5abd9445722a1ef247523f2aa66d9cd9f952fbc9f6ff" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/springdalelinux/8ks.cfg"] diff --git a/os_pkrvars/springdalelinux/springdalelinux-9-x86_64.pkrvars.hcl b/os_pkrvars/springdalelinux/springdalelinux-9-x86_64.pkrvars.hcl deleted file mode 100644 index 22c7d987c..000000000 --- a/os_pkrvars/springdalelinux/springdalelinux-9-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "springdalelinux" -os_version = "9.2" -os_arch = "x86_64" -iso_url = "http://springdale.princeton.edu/data/springdale/9/x86_64/iso/Springdale%20Linux-9.2-x86_64-netinst.iso" -iso_checksum = "88138260fec7898decf421fe0ae53953f9512c68009dd24cbd897ce226c6295d" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/springdalelinux/9ks.cfg"] diff --git a/os_pkrvars/ubuntu/ubuntu-20.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-20.04-aarch64.pkrvars.hcl index 2ab4099ce..f24afed1b 100644 --- a/os_pkrvars/ubuntu/ubuntu-20.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-20.04-aarch64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "ubuntu" os_version = "20.04" os_arch = "aarch64" iso_url = "http://cdimage.ubuntu.com/releases/focal/release/ubuntu-20.04.5-live-server-arm64.iso" -iso_checksum = "sha256:e42d6373dd39173094af5c26cbf2497770426f42049f8b9ea3e60ce35bebdedf" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/focal/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "arm-ubuntu-64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl similarity index 69% rename from os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl index a4d080aeb..770a5671a 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.04" +os_version = "23.10" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/lunar/release/ubuntu-23.04-live-server-arm64.iso" -iso_checksum = "file:https://cdimage.ubuntu.com/releases/lunar/release/SHA256SUMS" +iso_url = "https://cdimage.ubuntu.com/releases/mantic/release/ubuntu-23.10-live-server-arm64.iso" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/mantic/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "arm-ubuntu-64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl similarity index 61% rename from os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl index b63e4dd21..43a2a3941 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.04" +os_version = "23.10" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/lunar/ubuntu-23.04-live-server-amd64.iso" -iso_checksum = "file:https://releases.ubuntu.com/lunar/SHA256SUMS" +iso_url = "https://releases.ubuntu.com/mantic/ubuntu-23.10-live-server-amd64.iso" +iso_checksum = "file:https://releases.ubuntu.com/mantic/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "ubuntu-64" From 82435a503823e5a6536b1421d6e1aa0f7458e868 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 1 Feb 2024 22:09:54 -0600 Subject: [PATCH 07/28] Fix upload public/private flag lookup (#1544) * fix upload public or private flag lookup * oracle 7 cleanup script error removing linux-firmware * ubuntu 23.10 post install command on file that doesn't exist --- CHANGELOG.md | 10 +++++++++- lib/bento/upload.rb | 2 +- lib/bento/version.rb | 2 +- packer_templates/http/ubuntu/user-data | 1 - packer_templates/scripts/rhel/cleanup_yum.sh | 8 ++++++-- packer_templates/scripts/ubuntu/cleanup_ubuntu.sh | 3 ++- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 073a25234..da48662fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,15 @@ Markdown table generated at - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches - Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-01-31) +## [unreleased] (2024-02-01) + +## [v3.2.2] (2024-02-01) + +- Fix upload private or public flag lookup in builds.yml +- Fix yum cleanup script for oracle linux 7 error removing linux-firmware +- Fix ubuntu user-data post command modifying a file that doesn't exist on 23.10 + +## [v3.2.1] (2024-01-31) - Fix build list generation on aarch64 machines - Updated Debian 12 to 12.4 diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index c5cca05ba..56863406b 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -87,7 +87,7 @@ def lookup_slug(name) def public_private_box(name) builds_yml['public'].each do |public| - if name.include?('arm64') + if name.include?('arm64') || name.include?('aarch64') return '--no-private' if name.start_with?(public) && public.include?('arm64') else return '--no-private' if name.start_with?(public) && !public.include?('arm64') diff --git a/lib/bento/version.rb b/lib/bento/version.rb index b701c30fe..40b214786 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.2.1'.freeze + VERSION = '3.2.2'.freeze end diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index df9c1b033..01a91e224 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,7 +13,6 @@ autoinstall: install-server: yes allow-pw: yes late-commands: - - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi diff --git a/packer_templates/scripts/rhel/cleanup_yum.sh b/packer_templates/scripts/rhel/cleanup_yum.sh index 077319234..abc88a934 100644 --- a/packer_templates/scripts/rhel/cleanup_yum.sh +++ b/packer_templates/scripts/rhel/cleanup_yum.sh @@ -19,8 +19,12 @@ package-cleanup --oldkernels --count=1 -y # Avoid ~200 meg firmware package we don't need # this cannot be done in the KS file so we do it here -echo "Removing extra firmware packages" -yum -y remove linux-firmware +if test "$(uname -r)" == -- *el7uek*; then + echo "Skipping firmware removal for Oracle Linux" +else + echo "Removing extra firmware packages" + yum -y remove linux-firmware +fi echo "clean all package cache information" yum -y clean all --enablerepo=\*; diff --git a/packer_templates/scripts/ubuntu/cleanup_ubuntu.sh b/packer_templates/scripts/ubuntu/cleanup_ubuntu.sh index 91f05656c..a009405f0 100644 --- a/packer_templates/scripts/ubuntu/cleanup_ubuntu.sh +++ b/packer_templates/scripts/ubuntu/cleanup_ubuntu.sh @@ -26,11 +26,12 @@ dpkg --list \ | grep linux-source \ | xargs apt-get -y purge; +# 23.10 gives dependency errors for systemd-dev package echo "remove all development packages" dpkg --list \ | awk '{ print $2 }' \ | grep -- '-dev\(:[a-z0-9]\+\)\?$' \ - | xargs apt-get -y purge; + | xargs -I % apt-get -y purge % || true; echo "remove docs packages" dpkg --list \ From 7bbfea46d8214dc5f13ecacef923b24103613ebf Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Mon, 5 Feb 2024 17:43:51 -0600 Subject: [PATCH 08/28] vagrant cloud cpu architecture support added (#1546) * vagrant cloud cpu architecture support added --- CHANGELOG.md | 79 +++++++++-------- README.md | 22 ++--- builds.yml | 37 +------- lib/bento/buildmetadata.rb | 14 +--- lib/bento/cli.rb | 9 ++ lib/bento/runner.rb | 6 +- lib/bento/upload.rb | 29 ++++--- lib/bento/version.rb | 2 +- packer_templates/http/springdalelinux/7ks.cfg | 81 ------------------ packer_templates/http/springdalelinux/8ks.cfg | 84 ------------------- packer_templates/http/springdalelinux/9ks.cfg | 82 ------------------ packer_templates/http/ubuntu/user-data | 6 +- 12 files changed, 91 insertions(+), 360 deletions(-) delete mode 100644 packer_templates/http/springdalelinux/7ks.cfg delete mode 100644 packer_templates/http/springdalelinux/8ks.cfg delete mode 100644 packer_templates/http/springdalelinux/9ks.cfg diff --git a/CHANGELOG.md b/CHANGELOG.md index da48662fa..0b7ad41a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,41 +5,41 @@ ***Note:** Markdown table generated at -| | hyperv
x86_64 | parallels
x86_64 | parallels
aarch64 | qemu
x86_64 | qemu
aarch64 | virtualbox
x86_64 | virtualbox
aarch64 | vmware
x86_64 | vmware
aarch64 | -|:-----------------:|:---:|:---:|:--------------------:|:---:|:---:|:---:|:---:|:---:|:---:| -| almalinux-8 | | x | | x | | x | | x | | -| almalinux-9 | | x | x | | | x | | x | x | -| amazonlinux-2 | | na | na | | | | na | | na | -| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | -| centos-7 | | x | | x | | x | | x | | -| centos-stream-8 | | x | | x | | x | | x | | -| centos-stream-9 | | | x | | | | | | | -| debian-11 | | x | x | | | x | | x | | -| debian-12 | | x | x | | | x | | x | x | -| fedora-38 | | x | | x | | x | | x | x | -| fedora-39 | | | | | | | | | | -| freebsd-12 | | | | | | x | | x | | -| freebsd-13 | | | | | | x | | x | | -| opensuse-leap-15 | | x | | x | | x | | x | | -| oraclelinux-7 | | x | | x | | x | | x | | -| oraclelinux-8 | | | | x | | x | | x | | -| oraclelinux-9 | | x | x | | | x | | x | | -| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rockylinux-8 | | x | | x | | x | | x | | -| rockylinux-9 | | x | | | | x | | x | x | -| sles-12 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| sles-13 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| solaris-11 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| ubuntu-20.04 | | x | x | | | x | | x | x | -| ubuntu-22.04 | | x | | x | | x | | x | | -| ubuntu-23.10 | | | | | | | | | | -| windows-10 | | x | na | | na | x | na | | na | -| windows-11 | | x | na | | na | x | na | | na | -| windows-2016 | | x | na | | na | x | na | | na | -| windows-2019 | | x | na | | na | x | na | | na | -| windows-2022 | | x | na | | na | x | na | | na | +| | hyperv
x86_64 | parallels
x86_64 | parallels
aarch64 | qemu
x86_64 | qemu
aarch64 | virtualbox
x86_64 | virtualbox
aarch64 | vmware
x86_64 | vmware
aarch64 | +|:----------------:|:---:|:-------------------:|:--------------------:|:---:|:---:|:--------------------:|:---:|:-----------------:|:-----------------:| +| almalinux-8 | | x | | x | | x | | x | | +| almalinux-9 | | x | x | | | x | | x | x | +| amazonlinux-2 | | na | na | | | | na | | na | +| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | +| centos-7 | | x | | x | | x | | x | | +| centos-stream-8 | | x | | x | | x | | x | | +| centos-stream-9 | | | x | | | | | | | +| debian-11 | | x | x | | | x | | x | | +| debian-12 | | x | x | | | x | | x | x | +| fedora-38 | | x | | x | | x | | x | x | +| fedora-39 | | | | | | | | | | +| freebsd-13 | | | | | | x | | x | x | +| freebsd-14 | | | | | | x | | x | | +| opensuse-leap-15 | | x | | x | | x | | x | | +| oraclelinux-7 | | x | | x | | x | | x | | +| oraclelinux-8 | | | | x | | x | | x | | +| oraclelinux-9 | | x | x | | | x | | x | | +| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rockylinux-8 | | x | | x | | x | | x | | +| rockylinux-9 | | x | | | | x | | x | x | +| sles-12 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| sles-13 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| solaris-11 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | +| ubuntu-20.04 | | x | x | | | x | | x | x | +| ubuntu-22.04 | | x | | x | | x | | x | | +| ubuntu-23.10 | | x | x | | | x | | x | x | +| windows-10 | | x | na | | na | x | na | | na | +| windows-11 | | x | na | | na | x | na | | na | +| windows-2016 | | x | na | | na | x | na | | na | +| windows-2019 | | x | na | | na | x | na | | na | +| windows-2022 | | x | na | | na | x | na | | na | ### Todo @@ -54,7 +54,14 @@ Markdown table generated at - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches - Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-02-01) +## [unreleased] (2024-02-05) + +## [v4.0.0] (2024-02-05) + +- Added Vagrant Cloud architecture flags so amd64 and arm64 boxes can live under the same cloud box +- Setting amd64 as default architecture for uploads, configurable in the builds.yml file +- Update descriptions mentioning chef to progress chef +- Update README.md to reflect vagrant version for new architecture support ## [v3.2.2] (2024-02-01) diff --git a/README.md b/README.md index 5daaa8919..5a9038a61 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Bento is a project that encapsulates [Packer](https://www.packer.io/) templates ***NOTE:** +- Vagrant 2.4.0+ is required for new cpu archetecture support - Virutalbox 6.x requires disabling nat config that allows vbox 7.x guests to connect to the host. To use comment out lines #161 and #162 in bento/packer_templates/pkr-variables.pkr.hcl or add variable `vboxmanage = []` to os_pkrvars files. - When running packer build command the output directory is relative to the working directory the command is currently running in. Suggest running packer build commands from bento root directory for build working files to be placed in bento/builds/(build_name) directory by default. If the output_directory variable isn't overwritten a directory called builds/(build_name) will be created in the current working directory that you are running the command from @@ -28,17 +29,18 @@ end #### Requirements - [Packer](https://www.packer.io/) >= 1.7.0 -- [Vagrant](https://www.vagrantup.com/) +- [Vagrant](https://www.vagrantup.com/) >= 2.4.0 - At least one of the following virtualization providers: - - [VirtualBox](https://www.virtualbox.org/) - - [VMware Fusion](https://www.vmware.com/products/fusion.html) - - [VMware Workstation](https://www.vmware.com/products/workstation-pro.html) - - [Parallels Desktop Pro](https://www.parallels.com/products/desktop/)*2 also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versions < 19.x - - [qemu](https://www.qemu.org/) *1 - - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) *1 + - [VirtualBox](https://www.virtualbox.org/)*2 + - [VMware Fusion](https://www.vmware.com/products/fusion.html)*2 + - [VMware Workstation](https://www.vmware.com/products/workstation-pro.html)*2 + - [Parallels Desktop Pro](https://www.parallels.com/products/desktop/) also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versions < 19.x + - [qemu](https://www.qemu.org/) *1 *2 + - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) *1 *2 -*1**NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. -*2**NOTE:** AARCH64 or ARM64 support is only guaranteed through parallels provider. +*1 **NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. + +*2 **NOTE:** AARCH64 or ARM64 support is a work in progress only guaranteed through parallels and vmware provider. ### Using `bento` executable @@ -196,7 +198,7 @@ These basebox templates were converted from [veewee](https://github.com/jedi4eve - Author: Corey Hemminger ([corey.hemminger@progress.com](mailto:corey.hemminger@progress.com)) ```text -Copyright 2012-2023, Progress Software, Inc. () +Copyright 2012-2024, Progress Software, Inc. () Copyright 2011-2012, Tim Dysinger () Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/builds.yml b/builds.yml index a429f96e8..6f0cd3b65 100644 --- a/builds.yml +++ b/builds.yml @@ -1,6 +1,10 @@ --- vagrant_cloud_account: 'bento' +default_architectures: + - 'x86_64' + - 'amd64' + public: - 'almalinux-8' - 'almalinux-9' @@ -24,28 +28,6 @@ public: - 'ubuntu-20.04' - 'ubuntu-22.04' - 'ubuntu-23.10' - - 'almalinux-8-arm64' - - 'almalinux-9-arm64' - - 'amazon-2-arm64' - - 'amazon-2023-arm64' - - 'centos-7-arm64' - - 'centos-stream-8-arm64' - - 'centos-stream-9-arm64' - - 'debian-11-arm64' - - 'debian-12-arm64' - - 'fedora-38-arm64' - - 'fedora-39-arm64' - - 'freebsd-13-arm64' - - 'freebsd-14-arm64' - - 'opensuse-leap-15-arm64' - - 'oracle-7-arm64' - - 'oracle-8-arm64' - - 'oracle-9-arm64' - - 'rockylinux-8-arm64' - - 'rockylinux-9-arm64' - - 'ubuntu-20.04-arm64' - - 'ubuntu-22.04-arm64' - - 'ubuntu-23.10-arm64' # slug box name: text string from standard box name to match (generally the same) slugs: @@ -63,17 +45,6 @@ slugs: 'oracle-9': 'oracle-9' 'rockylinux-8': 'rockylinux-8' 'rockylinux-9': 'rockylinux-9' - 'almalinux-8-arm64': 'almalinux-8' - 'almalinux-9-arm64': 'almalinux-9' - 'centos-7-arm64': 'centos-7' - 'debian-12-arm64': 'debian-12' - 'debian-11-arm64': 'debian-11' - 'fedora-latest-arm64': 'fedora-39' - 'oracle-7-arm64': 'oracle-7' - 'oracle-8-arm64': 'oracle-8' - 'oracle-9-arm64': 'oracle-9' - 'rockylinux-8-arm64': 'rockylinux-8' - 'rockylinux-9-arm64': 'rockylinux-9' do_not_build: - amazon diff --git a/lib/bento/buildmetadata.rb b/lib/bento/buildmetadata.rb index ecbba79d5..d343686dc 100644 --- a/lib/bento/buildmetadata.rb +++ b/lib/bento/buildmetadata.rb @@ -33,12 +33,7 @@ def read attr_reader :template, :build_timestamp, :override_version, :pkr_cmd def box_basename - temp_name = name.gsub('/', '__').split('-') - if temp_name.last == 'arm64' - temp_name.join('-') - else - (temp_name.first temp_name.size - 1).join('-') - end + name.gsub('/', '__').split('-')[0...-1].join('-') end def git_revision @@ -54,12 +49,7 @@ def merged_vars end def name - arch = merged_vars.fetch('arch', UNKNOWN).downcase - if arch == 'aarch64' || arch == 'arm64' - "#{merged_vars.fetch('name', template)}-arm64" - else - "#{merged_vars.fetch('name', template)}-x86_64" - end + merged_vars.fetch('name', template) end def arch diff --git a/lib/bento/cli.rb b/lib/bento/cli.rb index 5b44ae3ce..0727465e4 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -6,6 +6,7 @@ require 'bento/normalize' require 'bento/test' require 'bento/upload' +require 'bento/version' class Options NAME = File.basename($PROGRAM_NAME).freeze @@ -33,6 +34,7 @@ def self.parse(args) normalize : normalize one or more templates test : test one or more builds with kitchen upload : upload and release one or more builds to Vagrant Cloud + version : prints the version of #{NAME} COMMANDS end @@ -59,6 +61,13 @@ def self.parse(args) exit(0) }, }, + version: { + parser: OptionParser.new {}, + argv: proc { |_opts| + puts Bento::VERSION + exit(0) + }, + }, build: { class: BuildRunner, parser: OptionParser.new do |opts| diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index f1f170046..9c3331622 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -17,7 +17,7 @@ def initialize(opts) @dry_run = opts.dry_run @metadata_only = opts.metadata_only @debug = opts.debug - @only = opts.only ||= 'parallels-iso.vm,virtualbox-iso.vm,vmware-iso.vm' + @only = opts.only ||= 'parallels-iso.vm,virtualbox-iso.vm,vmware-iso.vm,qemu.vm' @except = opts.except @mirror = opts.mirror @headed = opts.headed ||= false @@ -64,8 +64,8 @@ def build(file) time = Benchmark.measure do cmd.run_command end - if Dir.glob("../../builds/*.box").empty? - banner("Not writing metadata file since no boxes exist") + if Dir.glob("../../builds/#{template.split('-')[0...-1].join('-')}*-#{template.split('-')[-1]}.*.box").empty? + banner('Not writing metadata file since no boxes exist') else write_final_metadata(template, time.real.ceil) end diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index 56863406b..d9c5699ca 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -46,7 +46,7 @@ def upload_box(md_file) if File.exist?(File.join('builds', prov_data['file'])) puts '' banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") - upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" + upload_cmd = "vagrant cloud publish --architecture #{arch} #{default_arch(arch)} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) slug_name = lookup_slug(md_data['name']) @@ -75,11 +75,7 @@ def upload_box(md_file) # def lookup_slug(name) builds_yml['slugs'].each_pair do |slug, match_string| - if name.include?('arm64') - return slug if name.start_with?(match_string) && slug.include?('arm64') - else - return slug if name.start_with?(match_string) && !slug.include?('arm64') - end + return slug if name.start_with?(match_string) end nil @@ -87,21 +83,24 @@ def lookup_slug(name) def public_private_box(name) builds_yml['public'].each do |public| - if name.include?('arm64') || name.include?('aarch64') - return '--no-private' if name.start_with?(public) && public.include?('arm64') - else - return '--no-private' if name.start_with?(public) && !public.include?('arm64') - end + return '--no-private' if name.start_with?(public) + end + '--private' + end + + def default_arch(architecture) + builds_yml['default_architectures'].each do |arch| + return '--default-architecture' if architecture.eql?(arch) end - return '--private' + '--no-default-architecture' end def box_desc(name) - "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Chef" + "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Progress Chef" end def slug_desc(name) - "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" + "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Progress Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" end def ver_desc(md_data) @@ -120,6 +119,6 @@ def ver_desc(md_data) tool_versions.sort! tool_versions << "packer: #{md_data['packer']}" - "#{md_data['box_basename'].capitalize.tr('-', ' ')} Vagrant box version #{md_data['version']} created with Bento by Chef. Built with: #{tool_versions.join(', ')}" + "#{md_data['box_basename'].capitalize.tr('-', ' ')} Vagrant box version #{md_data['version']} created with Bento by Progress Chef. Built with: #{tool_versions.join(', ')}" end end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 40b214786..afc40757d 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.2.2'.freeze + VERSION = '4.0.0'.freeze end diff --git a/packer_templates/http/springdalelinux/7ks.cfg b/packer_templates/http/springdalelinux/7ks.cfg deleted file mode 100644 index bef5e9bd7..000000000 --- a/packer_templates/http/springdalelinux/7ks.cfg +++ /dev/null @@ -1,81 +0,0 @@ -install -eula --agreed -url --url="http://springdale.princeton.edu/data/Springdale/7/x86_64/os" -repo --name="Addons" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Addons -repo --name="Computational" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Computational -repo --name="Updates" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Updates -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --type=plain -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -%packages --ignoremissing --excludedocs -@core -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/springdalelinux/8ks.cfg b/packer_templates/http/springdalelinux/8ks.cfg deleted file mode 100644 index 9209acbaf..000000000 --- a/packer_templates/http/springdalelinux/8ks.cfg +++ /dev/null @@ -1,84 +0,0 @@ -install -url --url="http://springdale.princeton.edu/data/Springdale/8/x86_64/os" -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --nohome --nolvm --noboot -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -%packages --ignoremissing --excludedocs --instLangs=en_US.utf8 -# maybe prb needed for vbos guest additions? https://github.com/chef/bento/issues/1345 -# kernel-devel -# gcc -# make -# perl -# elfutils-libelf-devel -# end vbox -# vagrant needs this to copy initial files via scp -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/springdalelinux/9ks.cfg b/packer_templates/http/springdalelinux/9ks.cfg deleted file mode 100644 index 8f2523d42..000000000 --- a/packer_templates/http/springdalelinux/9ks.cfg +++ /dev/null @@ -1,82 +0,0 @@ -# Kickstart file for springdalelinux 9 -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --nohome --nolvm --noboot -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -url --url="http://springdale.princeton.edu/data/springdale/9/x86_64/os" -repo --name="BaseOS" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/BaseOS -repo --name="Updates_BaseOS" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/Updates_BaseOS -repo --name="AppStream" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/AppStream -repo --name="Updates_AppStream" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/Updates_AppStream - -%packages --ignoremissing --excludedocs -@^server-product-environment -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 01a91e224..17f05ca0a 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,6 +13,6 @@ autoinstall: install-server: yes allow-pw: yes late-commands: - - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant - # Enable hyper-v daemons only if using hyper-v virtualization - - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi + - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant + # Enable hyper-v daemons only if using hyper-v virtualization + - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi From 3094137d6b6a1a937d48cb729a4da28790d72fa5 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 16 Feb 2024 15:50:05 -0600 Subject: [PATCH 09/28] fix metadata basename (#1548) fixed metadata base_boxname updated debian 11 to 11.9 updated debian 12 to 12.5 --- CHANGELOG.md | 9 +- lib/bento/buildmetadata.rb | 2 +- .../debian/debian-11-aarch64.pkrvars.hcl | 4 +- .../debian/debian-11-x86_64.pkrvars.hcl | 4 +- .../debian/debian-12-aarch64.pkrvars.hcl | 6 +- .../debian/debian-12-x86_64.pkrvars.hcl | 6 +- .../windows/windows-10-x86_64.pkrvars.hcl | 1 - .../windows/windows-11-aarch64.pkrvars.hcl | 9 + packer_templates/http/ubuntu/user-data | 2 + packer_templates/pkr-builder.pkr.hcl | 4 +- packer_templates/pkr-sources.pkr.hcl | 40 +- packer_templates/pkr-variables.pkr.hcl | 1 + .../win_answer_files/10/Autounattend.xml | 2 +- .../10/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/11/Autounattend.xml | 2 +- .../11/arm64/Autounattend.xml | 720 ++++++++++++++++++ .../11/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2016/Autounattend.xml | 2 +- .../2016/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2019/Autounattend.xml | 2 +- .../2019/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2022/Autounattend.xml | 2 +- .../2022/hyperv-gen2/Autounattend.xml | 2 +- 23 files changed, 784 insertions(+), 44 deletions(-) create mode 100644 os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl create mode 100644 packer_templates/win_answer_files/11/arm64/Autounattend.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7ad41a4..a6abc2b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,14 @@ Markdown table generated at - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches - Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-02-05) +## [unreleased] (2024-02-16) + +## [v4.0.1] (2024-02-16) + +- Fix metadata file box_basename +- Updated Debian 11 to 11.9 +- Updated Debian 12 to 12.5 +- Added Windows 11 aarch64 template ## [v4.0.0] (2024-02-05) diff --git a/lib/bento/buildmetadata.rb b/lib/bento/buildmetadata.rb index d343686dc..5b9c61341 100644 --- a/lib/bento/buildmetadata.rb +++ b/lib/bento/buildmetadata.rb @@ -33,7 +33,7 @@ def read attr_reader :template, :build_timestamp, :override_version, :pkr_cmd def box_basename - name.gsub('/', '__').split('-')[0...-1].join('-') + name.gsub('/', '__').split('-').join('-') end def git_revision diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index ee5e7dedd..88909284d 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.8" +os_version = "11.9" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.8.0-arm64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.9.0-arm64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index 9107b7f2e..e60ff9fb2 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.8" +os_version = "11.9" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.8.0-amd64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.9.0-amd64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index aa3acc355..1fcfb21ac 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.4" +os_version = "12.5" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/debian-12.4.0-arm64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/debian-12.5.0-arm64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian-64" diff --git a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl index 817f0a3c3..6ad4b3f04 100644 --- a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.4" +os_version = "12.5" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/debian-12.4.0-amd64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" diff --git a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl index ad283fb4e..0036e7c10 100644 --- a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl @@ -7,4 +7,3 @@ iso_checksum = "ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d60 parallels_guest_os_type = "win-10" vbox_guest_os_type = "Windows10_64" vmware_guest_os_type = "windows9srv-64" - diff --git a/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl b/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl new file mode 100644 index 000000000..876c78c06 --- /dev/null +++ b/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "windows" +os_version = "11" +os_arch = "aarch64" +is_windows = true +iso_url = "../../builds/iso/WIN11_PROFESSIONAL_ARM64_EN-US.ISO" +iso_checksum = "90d4f9b5377e3c41784696ad0bb021b690e4f981f8e278fad62e07726f86bd77" +parallels_guest_os_type = "win-11" +vbox_guest_os_type = "Windows11_64" +vmware_guest_os_type = "windows9srv-64" diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 17f05ca0a..24598df56 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,6 +13,8 @@ autoinstall: install-server: yes allow-pw: yes late-commands: + - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf + - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 799b849a3..4604def93 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -117,9 +117,7 @@ locals { "${var.os_name}-${substr(var.os_version, 0, 1)}" == "amazonlinux-2" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oracle-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "scientificlinux-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "springdalelinux-7" ? [ + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ "${path.root}/scripts/rhel/update_yum.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 9dafa9856..25f92d8ee 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -2,10 +2,10 @@ locals { # Source block provider specific # hyperv-iso hyperv_enable_dynamic_memory = var.hyperv_enable_dynamic_memory == null ? ( - var.hyperv_generation == 2 && var.is_windows ? "true" : null + var.hyperv_generation == 2 && var.is_windows ? true : false ) : var.hyperv_enable_dynamic_memory hyperv_enable_secure_boot = var.hyperv_enable_secure_boot == null ? ( - var.hyperv_generation == 2 && var.is_windows ? false : null + var.hyperv_generation == 2 && var.is_windows ? true : false ) : var.hyperv_enable_secure_boot # parallels-iso @@ -21,11 +21,10 @@ locals { ) : var.parallels_tools_mode parallels_prlctl = var.parallels_prlctl == null ? ( var.is_windows ? [ - ["set", "{{ .Name }}", "--efi-boot", "off"] - ] : [ - ["set", "{{ .Name }}", "--3d-accelerate", "off"], - ["set", "{{ .Name }}", "--videosize", "16"] - ] + ["set", "{{ .Name }}", "--efi-boot", "off"], + ["set", "{{ .Name }}", "--efi-secure-boot", "off"], + ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../builds/iso/unattended.iso", "--connect"], + ] : null ) : var.parallels_prlctl # qemu @@ -35,7 +34,7 @@ locals { ) : var.qemu_machine_type qemuargs = var.qemuargs == null ? ( var.is_windows ? [ - ["-drive", "file=${path.root}/win_answer_files/virtio-win.iso,media=cdrom,index=3"], + ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], ["-drive", "file=${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [ @@ -76,22 +75,26 @@ locals { var.is_windows ? ( var.hyperv_generation == 2 ? [ "${path.root}/win_answer_files/${var.os_version}/hyperv-gen2/Autounattend.xml", - ] : [ - "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", - ] + ] : ( + var.os_arch == "x86_64" ? [ + "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", + ] : [ + "${path.root}/win_answer_files/${var.os_version}/arm64/Autounattend.xml", + ] + ) ) : null ) : var.cd_files communicator = var.communicator == null ? ( var.is_windows ? "winrm" : "ssh" ) : var.communicator floppy_files = var.floppy_files == null ? ( - var.is_windows ? [ - "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", - ] : ( - var.os_name == "springdalelinux" ? [ - "${path.root}/http/rhel/${substr(var.os_version, 0, 1)}ks.cfg" - ] : null - ) + var.is_windows ? ( + var.os_arch == "x86_64" ? [ + "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", + ] : [ + "${path.root}/win_answer_files/${var.os_version}/arm64/Autounattend.xml", + ] + ) : null ) : var.floppy_files http_directory = var.http_directory == null ? "${path.root}/http" : var.http_directory memory = var.memory == null ? (var.is_windows ? 4096 : 2048) : var.memory @@ -203,6 +206,7 @@ source "qemu" "vm" { } source "virtualbox-iso" "vm" { # Virtualbox specific options + #firmware = "efi" gfx_controller = local.vbox_gfx_controller gfx_vram_size = local.vbox_gfx_vram_size guest_additions_path = var.vbox_guest_additions_path diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 1ba744623..049ca0d6d 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -225,6 +225,7 @@ variable "vmware_version" { variable "vmware_vmx_data" { type = map(string) default = { + # "firmware" = "efi" "cpuid.coresPerSocket" = "2" "ethernet0.pciSlotNumber" = "32" "svga.autodetect" = true diff --git a/packer_templates/win_answer_files/10/Autounattend.xml b/packer_templates/win_answer_files/10/Autounattend.xml index e54d1ce35..9686440fb 100644 --- a/packer_templates/win_answer_files/10/Autounattend.xml +++ b/packer_templates/win_answer_files/10/Autounattend.xml @@ -106,7 +106,7 @@ true Vagrant - Bento by Chef Software, Inc. + Bento by Progress Chef false diff --git a/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend.xml index 4465d46ea..b56757830 100644 --- a/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend.xml @@ -125,7 +125,7 @@ true Vagrant - Bento by Chef Software, Inc. + Bento by Progress Chef false diff --git a/packer_templates/win_answer_files/11/Autounattend.xml b/packer_templates/win_answer_files/11/Autounattend.xml index dad87a233..5a8171159 100644 --- a/packer_templates/win_answer_files/11/Autounattend.xml +++ b/packer_templates/win_answer_files/11/Autounattend.xml @@ -116,7 +116,7 @@ true Vagrant - Bento by Chef Software, Inc. + Bento by Progress Chef. false diff --git a/packer_templates/win_answer_files/11/arm64/Autounattend.xml b/packer_templates/win_answer_files/11/arm64/Autounattend.xml new file mode 100644 index 000000000..ae51928dd --- /dev/null +++ b/packer_templates/win_answer_files/11/arm64/Autounattend.xml @@ -0,0 +1,720 @@ + + + + + + + + + F:\drivers\viostor\w11\ARM64 + + + F:\drivers\NetKVM\w11\ARM64 + + + F:\drivers\Balloon\w11\ARM64 + + + F:\drivers\pvpanic\w11\ARM64 + + + F:\drivers\vioinput\w11\ARM64 + + + F:\drivers\viorng\w11\ARM64 + + + F:\drivers\vioscsi\w11\ARM64 + + + F:\drivers\vioserial\w11\ARM64 + + + + + + en-US + + en-US + en-US + en-US + + + + + + + /IMAGE/NAME + Windows 11 Professional + + + + 0 + 3 + + + + + + VK7JG-NPHTM-C97JM-9MPGT-3V66T + + true + + + + 1 + cmd.exe /c ">>"X:\diskpart.txt" echo SELECT DISK=0" + + + 2 + cmd.exe /c ">>"X:\diskpart.txt" echo CLEAN" + + + 3 + cmd.exe /c ">>"X:\diskpart.txt" echo CONVERT GPT" + + + 4 + cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION EFI SIZE=100" + + + 5 + cmd.exe /c ">>"X:\diskpart.txt" echo FORMAT QUICK FS=FAT32 LABEL="System"" + + + 6 + cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION MSR SIZE=16" + + + 7 + cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION PRIMARY" + + + 8 + cmd.exe /c ">>"X:\diskpart.txt" echo FORMAT QUICK FS=NTFS LABEL="Windows"" + + + 9 + cmd.exe /c ">>"X:\diskpart.log" diskpart.exe /s "X:\diskpart.txt"" + + + 10 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f + + + 11 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f + + + 12 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f + + + 13 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f + + + 14 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f + + + 15 + reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f + + + + + + + 1 + + + false + false + + + + + 1 + + + false + + + + + true + Windows Remote Management + all + + + true + Remote Administration + all + + + + + 0 + + + true + + + + + 1 + ReAgentc.exe /disable + + + 2 + cmd.exe /c "del /a /f "C:\Windows\System32\Recovery\Winre.wim"" + + + 3 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Microsoft3DViewer" + + + 4 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsCalculator" + + + 5 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsCamera" + + + 6 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Clipchamp.Clipchamp" + + + 7 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsAlarms" + + + 8 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.549981C3F5F10" + + + 9 + reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f + + + 10 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsFeedbackHub" + + + 11 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.GetHelp" + + + 12 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo Browser.InternetExplorer" + + + 13 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsMaps" + + + 14 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo MathRecognizer" + + + 15 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.ZuneVideo" + + + 16 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.BingNews" + + + 17 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsNotepad" + + + 18 + reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT" + + + 19 + reg.exe add "HKU\mount\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f + + + 20 + reg.exe unload "HKU\mount" + + + 21 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftOfficeHub" + + + 22 + cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"" + + + 23 + cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe"" + + + 24 + cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe"" + + + 25 + reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT" + + + 26 + reg.exe delete "HKU\mount\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f + + + 27 + reg.exe unload "HKU\mount" + + + 28 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Office.OneNote" + + + 29 + reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f + + + 30 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo Microsoft.Windows.MSPaint" + + + 31 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Paint" + + + 32 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.MSPaint" + + + 33 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.People" + + + 34 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Windows.Photos" + + + 35 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.PowerAutomateDesktop" + + + 36 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo App.Support.QuickAssist" + + + 37 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo MicrosoftCorporationII.QuickAssist" + + + 38 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.SkypeApp" + + + 39 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.ScreenSketch" + + + 40 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftSolitaireCollection" + + + 41 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo App.StepsRecorder" + + + 42 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftStickyNotes" + + + 43 + reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f + + + 44 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Getstarted" + + + 45 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Todos" + + + 46 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.WindowsSoundRecorder" + + + 47 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.BingWeather" + + + 48 + cmd.exe /c ">>"%TEMP%\remove-caps.txt" echo Media.WindowsMediaPlayer" + + + 49 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.ZuneMusic" + + + 50 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.Xbox.TCUI" + + + 51 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.XboxApp" + + + 52 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.XboxGameOverlay" + + + 53 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.XboxGamingOverlay" + + + 54 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.XboxIdentityProvider" + + + 55 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.XboxSpeechToTextOverlay" + + + 56 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.GamingApp" + + + 57 + cmd.exe /c ">>"%TEMP%\remove-packages.txt" echo Microsoft.YourPhone" + + + 58 + powershell.exe -NoProfile -Command "Get-AppxProvisionedPackage -Online | where DisplayName -In (Get-Content $env:TEMP\remove-packages.txt ) | Remove-AppxProvisionedPackage -AllUsers -Online *>&1 >> $env:TEMP\remove-packages.log;" + + + 59 + powershell.exe -NoProfile -Command "Get-WindowsCapability -Online | where {($_.Name -split '~')[0] -in (Get-Content $env:TEMP\remove-caps.txt ) } | Remove-WindowsCapability -Online *>&1 >> $env:TEMP\remove-caps.log;" + + + 60 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"^>" + + + 61 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^<LayoutOptions StartTileGroupCellWidth="6" /^>" + + + 62 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^<DefaultLayoutOverride^>" + + + 63 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^<StartLayoutCollection^>" + + + 64 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^<StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" /^>" + + + 65 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^</StartLayoutCollection^>" + + + 66 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^</DefaultLayoutOverride^>" + + + 67 + cmd.exe /c ">>"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^</LayoutModificationTemplate^>" + + + 68 + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f + + + 69 + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f + + + 70 + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f + + + 71 + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f + + + 72 + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f + + + 73 + net.exe accounts /lockoutthreshold:0 + + + 74 + netsh.exe advfirewall firewall set rule group="Remote Desktop" new enable=Yes + + + 75 + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f + + + 76 + powershell.exe -NoProfile -Command "Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force;" + + + 77 + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f + + + 78 + reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT" + + + 79 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f + + + 80 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f + + + 81 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 82 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 83 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f + + + 84 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f + + + 85 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f + + + 86 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f + + + 87 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f + + + 88 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f + + + 89 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f + + + 90 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f + + + 91 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f + + + 92 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f + + + 93 + reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f + + + 94 + reg.exe unload "HKU\mount" + + + 95 + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f + + + + + + + en-US + en-US + en-US + en-US + + + + true + true + true + true + true + Work + 3 + true + true + + true + true + true + + + + + vagrant + true</PlainText> + </AdministratorPassword> + <LocalAccounts> + <LocalAccount wcm:action="add"> + <Password> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </Password> + <Description>Vagrant User</Description> + <DisplayName>vagrant</DisplayName> + <Group>Administrators</Group> + <Name>vagrant</Name> + </LocalAccount> + </LocalAccounts> + </UserAccounts> + <AutoLogon> + <Password> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </Password> + <Username>vagrant</Username> + <Enabled>true</Enabled> + </AutoLogon> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 64 Bit</Description> + <Order>1</Order> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 32 Bit</Description> + <Order>2</Order> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>3</Order> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"</CommandLine> + <Description>Sets detected network connections to private to allow start of winrm</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>4</Order> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any</CommandLine> + <Description>Allows winrm over public profile interfaces</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>5</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm quickconfig -q</CommandLine> + <Description>winrm quickconfig -q</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>6</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm quickconfig -transport:http</CommandLine> + <Description>winrm quickconfig -transport:http</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>7</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}</CommandLine> + <Description>Win RM MaxTimoutms</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>8</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}</CommandLine> + <Description>Win RM MaxMemoryPerShellMB</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>9</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}</CommandLine> + <Description>Win RM AllowUnencrypted</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>10</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}</CommandLine> + <Description>Win RM auth Basic</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>11</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}</CommandLine> + <Description>Win RM client auth Basic</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>12</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}</CommandLine> + <Description>Win RM listener Address/Port</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>13</Order> + <CommandLine>%windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"</CommandLine> + <Description>Win RM port open</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>14</Order> + <CommandLine>%windir%\System32\cmd.exe /c net stop winrm</CommandLine> + <Description>Stop Win RM Service</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>15</Order> + <CommandLine>%windir%\System32\cmd.exe /c sc config winrm start= auto</CommandLine> + <Description>Win RM Autostart</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>16</Order> + <CommandLine>%windir%\System32\cmd.exe /c net start winrm</CommandLine> + <Description>Start Win RM Service</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>17</Order> + <CommandLine>%windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE</CommandLine> + <Description>Disable password expiration for vagrant user</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "vagrant" /f</CommandLine> + <Order>18</Order> + <Description>Enable AutoLogon</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f</CommandLine> + <Order>19</Order> + <Description>Enable AutoLogon</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>20</Order> + <CommandLine>powershell.exe -NoProfile -Command "Disable-ComputerRestore -Drive 'C:';"</CommandLine> + <Description>Disable Computer Restore</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>cmd.exe /c E:\PTAgent.exe /install_silent</CommandLine> + <Description>Install Parallels Desktop tools</Description> + <Order>21</Order> + </SynchronousCommand> + </FirstLogonCommands> + </component> + <component name="Microsoft-Windows-WinRE-RecoveryAgent" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <UninstallWindowsRE>true</UninstallWindowsRE> + </component> + </settings> + <settings pass="offlineServicing"> + <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <EnableLUA>false</EnableLUA> + </component> + </settings> +</unattend> diff --git a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml index 65a4caaa3..431ef5e0c 100644 --- a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml @@ -136,7 +136,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef.</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2016/Autounattend.xml b/packer_templates/win_answer_files/2016/Autounattend.xml index f58062063..6379e2f8c 100644 --- a/packer_templates/win_answer_files/2016/Autounattend.xml +++ b/packer_templates/win_answer_files/2016/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml index 64579c515..c51a95ee9 100644 --- a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2019/Autounattend.xml b/packer_templates/win_answer_files/2019/Autounattend.xml index 041dccbef..6cb3a61b4 100644 --- a/packer_templates/win_answer_files/2019/Autounattend.xml +++ b/packer_templates/win_answer_files/2019/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml index 58f6821a7..8d8498365 100644 --- a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2022/Autounattend.xml b/packer_templates/win_answer_files/2022/Autounattend.xml index 929915b8c..9d02fb7df 100644 --- a/packer_templates/win_answer_files/2022/Autounattend.xml +++ b/packer_templates/win_answer_files/2022/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml index ecfca3ebe..8d6565fc0 100644 --- a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> From 45792040a997156a257660bd3e2d8f6b1209b677 Mon Sep 17 00:00:00 2001 From: Theo Dickinson <theodson@gmail.com> Date: Wed, 21 Feb 2024 05:49:03 +1100 Subject: [PATCH 10/28] Fix waiting for ssh - ubuntu netplan dhcp-identifer format error (#1550) --- packer_templates/http/ubuntu/user-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 24598df56..bd5b64355 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -14,7 +14,7 @@ autoinstall: allow-pw: yes late-commands: - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf - - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' + - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi From 9a3547ae99c8bfd5bc53e2e4f8927e26572ff190 Mon Sep 17 00:00:00 2001 From: Jimmy Huang <jimmy.huang@duragility.com> Date: Wed, 28 Feb 2024 07:54:44 -0800 Subject: [PATCH 11/28] bumped iso url versions (#1553) --- os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl | 2 +- os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl index 35e379886..e49428e2b 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.3-live-server-arm64.iso" +iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso" iso_checksum = "file:https://cdimage.ubuntu.com/releases/jammy/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl index 7475a60a4..c4f1bb6fe 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.3-live-server-amd64.iso" +iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso" iso_checksum = "file:https://releases.ubuntu.com/jammy/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" From 5ff5536c8d80d9a97cf3b8ce62d46c4944cfb2dd Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu <lwhsu@lwhsu.org> Date: Wed, 6 Mar 2024 12:12:51 +0800 Subject: [PATCH 12/28] Update to FreeBSD 13.3 (#1556) --- os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl | 6 +++--- os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl index b467c948e..dd7dc26fc 100644 --- a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "freebsd" -os_version = "13.2" +os_version = "13.3" os_arch = "aarch64" -iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-arm64-aarch64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-arm64-aarch64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.3/FreeBSD-13.3-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.3/CHECKSUM.SHA256-FreeBSD-13.3-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" vmware_guest_os_type = "arm-freebsd-64" diff --git a/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl index 74d59042e..1b14f89e3 100644 --- a/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "freebsd" -os_version = "13.2" +os_version = "13.3" os_arch = "x86_64" -iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-amd64" +iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.3/FreeBSD-13.3-RELEASE-amd64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.3/CHECKSUM.SHA256-FreeBSD-13.3-RELEASE-amd64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" vmware_guest_os_type = "freebsd-64" From 292fdc63dafc8244a792221960273ec921daa4e7 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Wed, 20 Mar 2024 18:18:18 -0500 Subject: [PATCH 13/28] Update (#1559) Add amz Linux 2023 and update testing scripts --- .gitignore | 1 + AMZ_README_FIRST.md | 12 +-- CHANGELOG.md | 17 ++++- README.md | 10 ++- ...> amazonlinux-2-x86_64-virtualbox-build.sh | 16 ++-- amazonlinux-2023-aarch64-virtualbox-build.sh | 75 +++++++++++++++++++ amazonlinux-2023-x86_64-virtualbox-build.sh | 73 ++++++++++++++++++ builds.yml | 2 + lib/bento/runner.rb | 4 +- lib/bento/test.rb | 26 ++++++- lib/bento/test_templates/kitchen.yml.erb | 3 +- lib/bento/upload.rb | 4 +- lib/bento/version.rb | 2 +- .../amazonlinux-2-aarch64.pkrvars.hcl | 11 +++ .../amazonlinux-2-x86_64.pkrvars.hcl | 22 ++---- .../amazonlinux-2023-aarch64.pkrvars.hcl | 11 +++ .../amazonlinux-2023-x86_64.pkrvars.hcl | 28 +++---- .../centos/centos-7-aarch64.pkrvars.hcl | 2 +- .../centos-stream-8-aarch64.pkrvars.hcl | 2 +- .../centos-stream-9-aarch64.pkrvars.hcl | 2 +- .../debian/debian-11-aarch64.pkrvars.hcl | 2 +- .../debian/debian-12-aarch64.pkrvars.hcl | 2 +- .../freebsd/freebsd-13-aarch64.pkrvars.hcl | 2 +- .../freebsd/freebsd-14-aarch64.pkrvars.hcl | 2 +- .../opensuse-leap-15-aarch64.pkrvars.hcl | 2 +- .../oracle/oracle-7-aarch64.pkrvars.hcl | 2 +- .../oracle/oracle-8-aarch64.pkrvars.hcl | 2 +- .../oracle/oracle-9-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl | 2 +- .../rockylinux-8-aarch64.pkrvars.hcl | 2 +- packer_templates/amz_seed_iso/user-data | 28 ++----- packer_templates/pkr-builder.pkr.hcl | 2 +- packer_templates/pkr-sources.pkr.hcl | 26 ++++--- packer_templates/pkr-variables.pkr.hcl | 45 +++++++++-- .../scripts/_common/vmware_rhel.sh | 24 +++--- packer_templates/scripts/rhel/cleanup_dnf.sh | 4 +- 38 files changed, 347 insertions(+), 129 deletions(-) rename AMZ_build_virtualbox-ovf.sh => amazonlinux-2-x86_64-virtualbox-build.sh (74%) create mode 100755 amazonlinux-2023-aarch64-virtualbox-build.sh create mode 100755 amazonlinux-2023-x86_64-virtualbox-build.sh create mode 100644 os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl create mode 100644 os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl diff --git a/.gitignore b/.gitignore index 175b1f75c..14efcc395 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.ovf *.vmdk *.vdi +*.qcow2 *.log virtualfloppy.vfd packer_cache/ diff --git a/AMZ_README_FIRST.md b/AMZ_README_FIRST.md index 5393c82d2..1fd70bdbf 100644 --- a/AMZ_README_FIRST.md +++ b/AMZ_README_FIRST.md @@ -1,12 +1,12 @@ -This is not your normal Bento box. Instead of building a system from an ISO we're building a system from an Amazon provided VirtualBox VDI file. This means the process is a bit different than usual. +This is not your normal Bento box. Instead of building a system from an ISO we're building a system from an Amazon provided vm hdd image files. This means the process is a bit different than usual. # Building this box -Simply run the AMZ_build_virtualbox-ovf.sh script +Simply run one of the amazonlinxu-2*-build.sh scripts -This script will: +These scripts will: -1. Download the VirtualBox .vdi file for Amazon Linux 2 and place it in the amz_working_files directory. Amazon hosts these at <https://cdn.amazonlinux.com/os-images/latest/virtualbox/>. It will name it amazon.vdi instead of the version specific name that Amazon gives it on their site -1. It will prepare this VDI file for packer and export it as a OVF file +1. Download the vm image file for Amazon Linux 2 or 2023 and place it in the amz_working_files directory. Amazon hosts these at <https://cdn.amazonlinux.com/os-images/latest/> and <https://cdn.amazonlinux.com/al2023/os-images/latest/>. +1. It will prepare the VDI file for packer and export it as a OVF file 1. It will run the packer build -1. Lastly it will clean up the leftover files in the working directory +1. Lastly it will clean up the leftover files in the working directory on successful completion diff --git a/CHANGELOG.md b/CHANGELOG.md index a6abc2b66..13dcfefa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,9 +52,21 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> - Look into making all build uefi default builds - Create CD pipeline to upload vagrant boxes after PR is merged - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches -- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-02-16) +## [unreleased] (2024-03-20) + +## [v4.0.2] (2024-03-20) + +- Update upload message to show architecture +- Fix open-vm-tools install for vmware builds +- Fix amazonlinux 2 build script +- Added amazonlinux 2023 build scripts +- Allow failed tests to continue and report at the end each test that failed +- Added amazonlinux aarch64 packer templates +- removed unneeded config from amazon user-data script for seed.iso +- Added additional qemu variables for various qemu source properties +- Added virtualbox-ovf vbox_source_path and vbox_checksum variables +- Added recursive flag to rhel cleanup scripts for persistent network files ## [v4.0.1] (2024-02-16) @@ -108,6 +120,7 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> - Updated Bento to continue builds even if one fails and report all failures at the end and exit with exit code 1 - Added qemu clone of libvirt box when metadata file is created for uploading to vagrant qemu provider - Made build shell scripts customizable through packer variable +- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private ## [v3.1.1] (2023-07-07) diff --git a/README.md b/README.md index 5a9038a61..5b074914c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Bento is a project that encapsulates [Packer](https://www.packer.io/) templates ***NOTE:** -- Vagrant 2.4.0+ is required for new cpu archetecture support +- Vagrant 2.4.0+ is required for new cpu architecture support - Virutalbox 6.x requires disabling nat config that allows vbox 7.x guests to connect to the host. To use comment out lines #161 and #162 in bento/packer_templates/pkr-variables.pkr.hcl or add variable `vboxmanage = []` to os_pkrvars files. - When running packer build command the output directory is relative to the working directory the command is currently running in. Suggest running packer build commands from bento root directory for build working files to be placed in bento/builds/(build_name) directory by default. If the output_directory variable isn't overwritten a directory called builds/(build_name) will be created in the current working directory that you are running the command from @@ -24,6 +24,14 @@ Vagrant.configure("2") do |config| end ``` +### Installing Bento + +1. install ruby environment +1. clone repo +1. cd <path/to>/bento +1. gem build bento.gemspec +1. gem install bento-*.gem + ### Building Boxes #### Requirements diff --git a/AMZ_build_virtualbox-ovf.sh b/amazonlinux-2-x86_64-virtualbox-build.sh similarity index 74% rename from AMZ_build_virtualbox-ovf.sh rename to amazonlinux-2-x86_64-virtualbox-build.sh index d935dc3c9..8902e9dae 100755 --- a/AMZ_build_virtualbox-ovf.sh +++ b/amazonlinux-2-x86_64-virtualbox-build.sh @@ -12,10 +12,10 @@ IMG="$(wget -q https://cdn.amazonlinux.com/os-images/latest/virtualbox/ -O - | g # Download vbox vdi echo "Downloading Vbox VDI $IMG" -wget -q -O "$AMZDIR"/amazon.vdi -c https://cdn.amazonlinux.com/os-images/latest/virtualbox/"$IMG" +wget -q -O "$AMZDIR"/amazon2_x86_64.vdi -c https://cdn.amazonlinux.com/os-images/latest/virtualbox/"$IMG" -if [ ! -f "$AMZDIR"/amazon.vdi ]; then - echo There must be a file named amazon.vdi in "$AMZDIR"! +if [ ! -f "$AMZDIR"/amazon2_x86_64.vdi ]; then + echo There must be a file named amazon2_x86_64.vdi in "$AMZDIR"! echo You can download the vdi file at https://cdn.amazonlinux.com/os-images/latest/virtualbox/ exit 1 fi @@ -36,8 +36,8 @@ echo "Creating the VM" # from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html VBoxManage createvm --name $VM --ostype "RedHat_64" --register VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon.vdi -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 1 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2_x86_64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso VBoxManage modifyvm $VM --memory 2048 VBoxManage modifyvm $VM --cpus 2 VBoxManage modifyvm $VM --audio-driver none @@ -48,18 +48,18 @@ echo Sleeping for 120 seconds to let the system boot and cloud-init to run VBoxManage startvm $VM --type headless sleep 120 VBoxManage controlvm $VM poweroff --type headless -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 1 --type dvddrive --medium none +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none sleep 5 echo Exporting the VM to an OVF file -vboxmanage export $VM -o "$AMZDIR"/amazon2.ovf +vboxmanage export $VM -o "$AMZDIR"/amazon2_x86_64.ovf sleep 5 echo Deleting the VM vboxmanage unregistervm $VM --delete echo starting packer build of amazonlinux -if packer build -timestamp-ui -only=virtualbox-ovf.amazonlinux -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then +if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then echo "Cleaning up files" rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso else diff --git a/amazonlinux-2023-aarch64-virtualbox-build.sh b/amazonlinux-2023-aarch64-virtualbox-build.sh new file mode 100755 index 000000000..5d0ec7ae8 --- /dev/null +++ b/amazonlinux-2023-aarch64-virtualbox-build.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +# Getting script directory location +SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") +cd "$SCRIPT_RELATIVE_DIR" || exit + +# set tmp dir for files +AMZDIR="$(pwd)/packer_templates/amz_working_files" + +echo "Cleaning up old files" +rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.vdi + +# Get virtualbox vdi file name with latest version number +IMG="$(wget -q https://cdn.amazonlinux.com/al2023/os-images/latest/kvm-arm64/ -O - | grep ".qcow2" | cut -d "\"" -f 2)" + +echo "Downloading $IMG" +wget -q -O "$AMZDIR"/amazon2023_arm64.qcow2 -c https://cdn.amazonlinux.com/al2023/os-images/latest/kvm-arm64/"$IMG" + +echo "Convert qcow2 to vdi" +qemu-img convert -f qcow2 "$AMZDIR"/amazon2023_arm64.qcow2 -O vdi "$AMZDIR"/amazon2023_arm64.vdi + +if [ ! -f "$AMZDIR"/amazon2023_arm64.vdi ]; then + echo There must be a file named amazon2023_arm64.vdi in "$AMZDIR"! + echo You can download the files at https://cdn.amazonlinux.com/al2023/os-images/latest/ + exit 1 +fi + +echo "Creating ISO" +hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso + +VM="AmazonLinuxBento" +echo Powering off and deleting any existing VMs named $VM +VBoxManage controlvm $VM poweroff --type headless 2> /dev/null +VBoxManage unregistervm $VM --delete 2> /dev/null +sleep 5 + +echo "Creating the VM" +# from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html +VBoxManage createvm --name $VM --ostype "Fedora_64" --register +VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage modifyvm $VM --chipset ich9 +VBoxManage modifyvm $VM --firmware efi +VBoxManage modifyvm $VM --memory 2048 +VBoxManage modifyvm $VM --cpus 2 +VBoxManage modifyvm $VM --nat-localhostreachable1 on +VBoxManage modifyvm $VM --vram 33 +VBoxManage modifyvm $VM --graphicscontroller vmsvga +VBoxManage modifyvm $VM --vrde off +VBoxManage modifyvm $VM --audio-driver none +VBoxManage modifyvm $VM --ioapic on +sleep 5 + +echo "Sleeping for 120 seconds to let the system boot and cloud-init to run" +VBoxManage startvm $VM --type headless +sleep 120 +VBoxManage controlvm $VM poweroff --type headless +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none +sleep 5 + +echo "Exporting the VM to an OVF file" +vboxmanage export $VM -o "$AMZDIR"/amazon2023_arm64.ovf +sleep 5 + +echo "Deleting the VM" +vboxmanage unregistervm $VM --delete + +echo "starting packer build of amazonlinux" +if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_arm64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then + echo "Cleaning up files" + rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 +else + exit 1 +fi diff --git a/amazonlinux-2023-x86_64-virtualbox-build.sh b/amazonlinux-2023-x86_64-virtualbox-build.sh new file mode 100755 index 000000000..f58fb84b6 --- /dev/null +++ b/amazonlinux-2023-x86_64-virtualbox-build.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +# Getting script directory location +SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") +cd "$SCRIPT_RELATIVE_DIR" || exit + +# set tmp dir for files +AMZDIR="$(pwd)/packer_templates/amz_working_files" + +echo "Cleaning up old files" +rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.vdi + +# Get virtualbox vdi file name with latest version number +IMG="$(wget -q https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/ -O - | grep ".qcow2" | cut -d "\"" -f 2)" + +echo "Downloading $IMG" +wget -q -O "$AMZDIR"/amazon2023_x86_64.qcow2 -c https://cdn.amazonlinux.com/al2023/os-images/latest/kvm/"$IMG" + +echo "Convert qcow2 to vdi" +qemu-img convert -f qcow2 "$AMZDIR"/amazon2023_x86_64.qcow2 -O vdi "$AMZDIR"/amazon2023_x86_64.vdi + +if [ ! -f "$AMZDIR"/amazon2023_x86_64.vdi ]; then + echo There must be a file named amazon2023_x86_64.vdi in "$AMZDIR"! + echo You can download the files at https://cdn.amazonlinux.com/al2023/os-images/latest/ + exit 1 +fi + +echo "Creating ISO" +hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso + +VM="AmazonLinuxBento" +echo Powering off and deleting any existing VMs named $VM +VBoxManage controlvm $VM poweroff --type headless 2> /dev/null +VBoxManage unregistervm $VM --delete 2> /dev/null +sleep 5 + +echo "Creating the VM" +# from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html +VBoxManage createvm --name $VM --ostype "Fedora_64" --register +VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2023_x86_64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage modifyvm $VM --memory 2048 +VBoxManage modifyvm $VM --cpus 2 +VBoxManage modifyvm $VM --nat-localhostreachable1 on +VBoxManage modifyvm $VM --vram 10 +VBoxManage modifyvm $VM --graphicscontroller vmsvga +VBoxManage modifyvm $VM --vrde off +VBoxManage modifyvm $VM --audio-driver none +VBoxManage modifyvm $VM --ioapic on +sleep 5 + +echo "Sleeping for 120 seconds to let the system boot and cloud-init to run" +VBoxManage startvm $VM --type headless +sleep 120 +VBoxManage controlvm $VM poweroff --type headless +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none +sleep 5 + +echo "Exporting the VM to an OVF file" +vboxmanage export $VM -o "$AMZDIR"/amazon2023_x86_64.ovf +sleep 5 + +echo "Deleting the VM" +vboxmanage unregistervm $VM --delete + +echo "starting packer build of amazonlinux" +if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then + echo "Cleaning up files" + rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 +else + exit 1 +fi diff --git a/builds.yml b/builds.yml index 6f0cd3b65..6a3567516 100644 --- a/builds.yml +++ b/builds.yml @@ -6,6 +6,8 @@ default_architectures: - 'amd64' public: + - 'amazonlinux-2' + - 'amazonlinux-2023' - 'almalinux-8' - 'almalinux-9' - 'amazon-2' diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index 9c3331622..b59554dcc 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -17,7 +17,7 @@ def initialize(opts) @dry_run = opts.dry_run @metadata_only = opts.metadata_only @debug = opts.debug - @only = opts.only ||= 'parallels-iso.vm,virtualbox-iso.vm,vmware-iso.vm,qemu.vm' + @only = opts.only ||= nil @except = opts.except @mirror = opts.mirror @headed = opts.headed ||= false @@ -87,7 +87,7 @@ def packer_build_cmd(template, _var_file) var_files.each do |var_file| cmd.insert(5, "-var-file=#{var_file}") if File.exist?(var_file) end if var_files - cmd.insert(4, "-only=#{only}") + cmd.insert(4, "-only=#{only}") if only cmd.insert(4, "-except=#{except}") if except # Build the command line in the correct order and without spaces as future input for the splat operator. cmd.insert(4, "-var cpus=#{cpus}") if cpus diff --git a/lib/bento/test.rb b/lib/bento/test.rb index b4a572f56..21c2b684d 100644 --- a/lib/bento/test.rb +++ b/lib/bento/test.rb @@ -5,12 +5,13 @@ class TestRunner include Common - attr_reader :shared_folder, :boxname, :provider, :box_url, :no_shared, :provisioner + attr_reader :shared_folder, :boxname, :provider, :box_url, :no_shared, :provisioner, :errors def initialize(opts) @debug = opts.debug @no_shared = opts.no_shared @provisioner = opts.provisioner.nil? ? 'shell' : opts.provisioner + @errors = [] end def start @@ -23,6 +24,9 @@ def start end end banner("Testing finished in #{duration(time.real)}.") + unless errors.empty? + raise("Failed Tests:\n #{errors.join("\n")}\n exited #{$CHILD_STATUS}") + end end private @@ -45,8 +49,17 @@ def test_box(md_json) temp_dir = "#{bento_dir}/builds/test-kitchen" Dir.mkdir(temp_dir) unless Dir.exist?(temp_dir) md = box_metadata(md_json) + arch = case md['arch'] + when 'x86_64', 'amd64' + 'amd64' + when 'aarch64', 'arm64' + 'arm64' + else + raise "Unknown arch #{md_data.inspect}" + end @boxname = md['name'] @providers = md['providers'] + @arch = arch @share_disabled = no_shared || /(bsd|opensuse)/.match(boxname) ? true : false dir = "#{File.expand_path('../../', File.dirname(__FILE__))}/lib/bento/test_templates" @@ -58,9 +71,14 @@ def test_box(md_json) Dir.chdir(temp_dir) banner("Test kitchen file located in #{temp_dir}") - test = Mixlib::ShellOut.new('kitchen test', timeout: 900, live_stream: STDOUT) - test.run_command - test.error! + @providers.each do |k, _v| + test = Mixlib::ShellOut.new("kitchen test #{@boxname}-#{@arch}-#{k.tr('_', '-')}", timeout: 900, live_stream: STDOUT) + test.run_command + if test.error? + test.stderr + errors << "#{@boxname}-#{@arch}-#{k}" + end + end Dir.chdir(bento_dir) FileUtils.rm_rf(temp_dir) end diff --git a/lib/bento/test_templates/kitchen.yml.erb b/lib/bento/test_templates/kitchen.yml.erb index f676bab8f..56836444e 100644 --- a/lib/bento/test_templates/kitchen.yml.erb +++ b/lib/bento/test_templates/kitchen.yml.erb @@ -4,13 +4,14 @@ provisioner: platforms: <% @providers.each do |k,v| -%> -- name: <%= @boxname + '-' + k %> +- name: <%= "#{@boxname}-#{@arch}-#{k}" %> driver: name: vagrant provider: <%= k %> vm_hostname: bento-test box: bento-<%= @boxname %> box_url: file://<%= Dir.pwd %>/builds/<%= v['file'] %> + box_arch: <%= @arch %> synced_folders: <% if k =~ /hyperv/ -%> - [".", "/vagrant", "disabled: true"] diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index d9c5699ca..582cc9d70 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -45,14 +45,14 @@ def upload_box(md_file) md_data['providers'].each_pair do |prov, prov_data| if File.exist?(File.join('builds', prov_data['file'])) puts '' - banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") + banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov} arch:#{arch}...") upload_cmd = "vagrant cloud publish --architecture #{arch} #{default_arch(arch)} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) slug_name = lookup_slug(md_data['name']) if slug_name puts '' - banner("Uploading slug #{builds_yml['vagrant_cloud_account']}/#{slug_name} from #{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") + banner("Uploading slug #{builds_yml['vagrant_cloud_account']}/#{slug_name} from #{md_data['box_basename']} version:#{md_data['version']} provider:#{prov} arch:#{arch}...") upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{slug_name} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{slug_desc(slug_name)}' --short-description '#{slug_desc(slug_name)}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index afc40757d..9cba61623 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '4.0.0'.freeze + VERSION = '4.0.2'.freeze end diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl new file mode 100644 index 000000000..0895fcfd9 --- /dev/null +++ b/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl @@ -0,0 +1,11 @@ +os_name = "amazonlinux" +os_version = "2" +os_arch = "aarch64" +vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/amzn2-kvm-2.0.20240306.2-arm64.xfs.gpt.qcow2" +vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/SHA256SUMS" +parallels_guest_os_type = "fedora-core" +vbox_guest_os_type = "Fedora_64" +vmware_guest_os_type = "arm-fedora-64" +sources_enabled = [ + "source.virtualbox-ovf.vm" +] diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl index 4707acc7d..08baf9a58 100644 --- a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl +++ b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl @@ -1,21 +1,11 @@ os_name = "amazonlinux" os_version = "2" os_arch = "x86_64" -vbox_guest_os_type = "RedHat_64" +vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/virtualbox/amzn2-virtualbox-2.0.20240306.2-x86_64.xfs.gpt.vdi" +vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/virtualbox/SHA256SUMS" +parallels_guest_os_type = "centos" +vbox_guest_os_type = "RedHat_64" +vmware_guest_os_type = "rhel9-64" sources_enabled = [ - "source.virtualbox-ovf.amazonlinux" -] -vboxmanage = [ - [ - "modifyvm", - "{{ .Name }}", - "--memory", - "2048", - "--cpus", - "2", - "--audio", - "none", - "--nat-localhostreachable1", - "on", - ] + "source.virtualbox-ovf.vm" ] diff --git a/os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl new file mode 100644 index 000000000..6a72f30af --- /dev/null +++ b/os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl @@ -0,0 +1,11 @@ +os_name = "amazonlinux" +os_version = "2023" +os_arch = "aarch64" +vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova" +vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/SHA256SUMS" +parallels_guest_os_type = "fedora-core" +vbox_guest_os_type = "Fedora_64" +vmware_guest_os_type = "arm-fedora-64" +sources_enabled = [ + "source.virtualbox-ovf.vm" +] diff --git a/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl index 421326585..b059b2b4a 100644 --- a/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl +++ b/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl @@ -1,21 +1,11 @@ -os_name = "amazonlinux" -os_version = "2023" -os_arch = "x86_64" -vbox_guest_os_type = "RedHat_64" +os_name = "amazonlinux" +os_version = "2023" +os_arch = "x86_64" +vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/latest/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova" +vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/latest/vmware/SHA256SUMS" +parallels_guest_os_type = "fedora-core" +vbox_guest_os_type = "Fedora_64" +vmware_guest_os_type = "fedora-64" sources_enabled = [ - "source.virtualbox-ovf.amazonlinux" -] -vboxmanage = [ - [ - "modifyvm", - "{{ .Name }}", - "--memory", - "2048", - "--cpus", - "2", - "--audio", - "none", - "--nat-localhostreachable1", - "on", - ] + "source.virtualbox-ovf.vm" ] diff --git a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl index c9cb1a8bc..1d5b199f2 100644 --- a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://quantum-mirror.hu/mirrors/pub/centos-altarch/ iso_checksum = "file:https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/sha256sum.txt" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl index 20fb10372..08d946e6b 100644 --- a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://mirrors.edge.kernel.org/centos/8-stream/isos/ iso_checksum = "file:https://mirrors.edge.kernel.org/centos/8-stream/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/centos/centos-stream-9-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-9-aarch64.pkrvars.hcl index 9acbd0cf6..635e561ba 100644 --- a/os_pkrvars/centos/centos-stream-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-stream-9-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://mirror.stream.centos.org/9-stream/BaseOS/aarc iso_checksum = "file:https://mirror.stream.centos.org/9-stream/BaseOS/aarch64/iso/CentOS-Stream-9-latest-aarch64-dvd1.iso.SHA256SUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index 88909284d..e06e354f1 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://cdimage.debian.org/cdimage/archive/latest-old iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" -vmware_guest_os_type = "arm-debian-64" +vmware_guest_os_type = "arm-debian11-64" boot_command = ["<wait><up>e<wait><down><down><down><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><wait>install <wait> preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg <wait>debian-installer=en_US.UTF-8 <wait>auto <wait>locale=en_US.UTF-8 <wait>kbd-chooser/method=us <wait>keyboard-configuration/xkb-keymap=us <wait>netcfg/get_hostname={{ .Name }} <wait>netcfg/get_domain=vagrantup.com <wait>fb=false <wait>debconf/frontend=noninteractive <wait>console-setup/ask_detect=false <wait>console-keymaps-at/keymap=us <wait>grub-installer/bootdev=/dev/sda <wait><f10><wait>"] diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index 1fcfb21ac..a1f98a930 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/arm iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" -vmware_guest_os_type = "arm-debian-64" +vmware_guest_os_type = "arm-debian12-64" boot_command = ["<wait><up>e<wait><down><down><down><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><right><wait>install <wait> preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg <wait>debian-installer=en_US.UTF-8 <wait>auto <wait>locale=en_US.UTF-8 <wait>kbd-chooser/method=us <wait>keyboard-configuration/xkb-keymap=us <wait>netcfg/get_hostname={{ .Name }} <wait>netcfg/get_domain=vagrantup.com <wait>fb=false <wait>debconf/frontend=noninteractive <wait>console-setup/ask_detect=false <wait>console-keymaps-at/keymap=us <wait>grub-installer/bootdev=/dev/sda <wait><f10><wait>"] diff --git a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl index dd7dc26fc..d981c6986 100644 --- a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.freebsd.org/releases/arm64/aarch64/I iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.3/CHECKSUM.SHA256-FreeBSD-13.3-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "arm-freebsd-64" +vmware_guest_os_type = "arm-freebsd13-64" boot_command = ["<wait><esc><wait>boot -s<wait><enter><wait><wait10><wait10>/bin/sh<enter><wait>mdmfs -s 100m md1 /tmp<enter><wait>mdmfs -s 100m md2 /mnt<enter><wait>dhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0<enter><wait><wait5>fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig<enter><wait>"] diff --git a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl index 69344d36c..f2dfcfdb6 100644 --- a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.freebsd.org/releases/arm64/aarch64/I iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "arm-freebsd-64" +vmware_guest_os_type = "arm-freebsd14-64" boot_command = ["<wait><esc><wait>boot -s<wait><enter><wait><wait10><wait10>/bin/sh<enter><wait>mdmfs -s 100m md1 /tmp<enter><wait>mdmfs -s 100m md2 /mnt<enter><wait>dhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0<enter><wait><wait5>fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig<enter><wait>"] diff --git a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl index ae1d00738..29b434d07 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "http://provo-mirror.opensuse.org/distribution/leap/15 iso_checksum = "file:https://provo-mirror.opensuse.org/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-aarch64-Media.iso.sha256" parallels_guest_os_type = "opensuse" vbox_guest_os_type = "OpenSUSE_64" -vmware_guest_os_type = "arm-opensuse-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait5><esc><wait>e<wait><down><down><down><down><end> biosdevname=0 net.ifnames=0 netdevice=eth0 netsetup=dhcp lang=en_US textmode=1 modprobe.blacklist=vmwgfx autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse/autoinst-uefi.xml<f10><wait>"] diff --git a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl index ec6471c14..67873935e 100644 --- a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL7/u9/aarch6 iso_checksum = "fd2c1b1e26858576534f6e6c4cf000a15cd81bec010dad5e827b204a14a1750e" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl index dd1c6561d..8656e267d 100644 --- a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/aarch6 iso_checksum = "c732ec9bb4a85349c0f1ca82020a8514341247506d114b8b79ec32bf99d59ea0" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl index f5384427d..2357d748e 100644 --- a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/aarch6 iso_checksum = "7cc50a48f361cb1100a28621ba455edaac3a38182f6dd3fe67588b3eeaf18dc3" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl index a6c26ef33..940473f9a 100644 --- a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "1b8004961150b60f6c5ec3f25139d3217eee55707cf9fa19e826919fc58e328b" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl index 0785f59d0..e5950dceb 100644 --- a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "none" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg<enter><wait>"] diff --git a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl index 345324625..42d86f15d 100644 --- a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "none" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg<enter><wait>"] diff --git a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl index 9a542230e..8f769dde5 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarc iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/packer_templates/amz_seed_iso/user-data b/packer_templates/amz_seed_iso/user-data index 222eb4e59..078342858 100644 --- a/packer_templates/amz_seed_iso/user-data +++ b/packer_templates/amz_seed_iso/user-data @@ -1,29 +1,15 @@ #cloud-config #vim:syntax=yaml -user: vagrant -password: vagrant +users: + - name: vagrant + lock_passwd: false + passwd: $6$TbOu26d1hYO4EC/D$MymO7cTo/tID7tkH8TtAGyAdaK9nHwGQfDD9KwQmql3xP1BPPc67YCmoR8UO3Dw5jacOx3GvnBLqvAmHLHC4H0 + sudo: ALL=(ALL) NOPASSWD:ALL -# install packages for vbox guest additions to complete -packages: - - gcc - - kernel-devel - - kernel-headers - - dkms - - make - - bzip2 - - perl - -# make sure we don't setup the network on every boot +# Enable password authentication for SSH write_files: - - path: /etc/cloud/cloud.cfg.d/80_disable_network_after_firstboot.cfg - content: | - # Disable network configuration after first boot - network: - config: disabled - - path: /etc/cloud/cloud.cfg.d/90_enable_ssh_pwauth.cfg content: | runcmd: - sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/" /etc/ssh/sshd_config - - sed -i "/^HWADDR/d" /etc/sysconfig/network-scripts/ifcfg-eth0 - - systemctl restart network sshd + - systemctl restart sshd diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 4604def93..8111c87e4 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -114,7 +114,7 @@ locals { "${path.root}/scripts/fedora/cleanup_dnf.sh", "${path.root}/scripts/_common/minimize.sh" ] : ( - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "amazonlinux-2" || + "${var.os_name}-${var.os_version}" == "amazonlinux-2" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oracle-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 25f92d8ee..2fe6dbb03 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -54,11 +54,6 @@ locals { var.is_windows ? "attach" : "upload" ) : var.vbox_guest_additions_mode - # virtualbox-ovf - vbox_source = var.vbox_source == null ? ( - var.os_name == "amazonlinux" ? "${path.root}/amz_working_files/amazon2.ovf" : null - ) : var.vbox_source - # vmware-iso vmware_tools_upload_flavor = var.vmware_tools_upload_flavor == null ? ( var.is_windows ? "windows" : "linux" @@ -174,11 +169,17 @@ source "parallels-iso" "vm" { } source "qemu" "vm" { # QEMU specific options - accelerator = var.qemu_accelerator - display = var.headless ? "none" : var.qemu_display - machine_type = local.qemu_machine_type - qemu_binary = local.qemu_binary - qemuargs = local.qemuargs + accelerator = var.qemu_accelerator + display = var.headless ? "none" : var.qemu_display + disk_image = var.qemu_disk_image + efi_boot = var.qemu_efi_boot + efi_firmware_code = var.qemu_efi_firmware_code + efi_firmware_vars = var.qemu_efi_firmware_vars + efi_drop_efivars = var.qemu_efi_drop_efivars + format = var.qemu_format + machine_type = local.qemu_machine_type + qemu_binary = local.qemu_binary + qemuargs = local.qemuargs # Source block common options boot_command = var.boot_command boot_wait = var.qemu_boot_wait == null ? local.default_boot_wait : var.qemu_boot_wait @@ -241,10 +242,11 @@ source "virtualbox-iso" "vm" { winrm_username = var.winrm_username vm_name = local.vm_name } -source "virtualbox-ovf" "amazonlinux" { +source "virtualbox-ovf" "vm" { # Virtualbox specific options guest_additions_path = var.vbox_guest_additions_path - source_path = local.vbox_source + source_path = var.vbox_source_path + checksum = var.vbox_checksum vboxmanage = var.vboxmanage virtualbox_version_file = var.virtualbox_version_file # Source block common options diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 049ca0d6d..a09aca878 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -38,7 +38,6 @@ variable "no_proxy" { variable "sources_enabled" { type = list(string) default = [ - "source.hyperv-iso.vm", "source.parallels-iso.vm", "source.qemu.vm", "source.virtualbox-iso.vm", @@ -119,6 +118,36 @@ variable "qemu_display" { type = string default = "none" } +variable "qemu_disk_image" { + type = bool + default = null + description = "Whether iso_url is a bootable qcow2 disk image" +} +variable "qemu_efi_boot" { + type = bool + default = false + description = "Enable EFI boot" +} +variable "qemu_efi_firmware_code" { + type = string + default = null + description = "EFI firmware code path" +} +variable "qemu_efi_firmware_vars" { + type = string + default = null + description = "EFI firmware vars file path" +} +variable "qemu_efi_drop_efivars" { + type = bool + default = false + description = "Drop EFI vars" +} +variable "qemu_format" { + type = string + default = "qcow2" + description = "Disk format, takes qcow2 or raw" +} variable "qemu_machine_type" { type = string default = null @@ -185,9 +214,15 @@ variable "virtualbox_version_file" { } # virtualbox-ovf -variable "vbox_source" { - type = string - default = null +variable "vbox_source_path" { + type = string + default = null + description = "Path to the OVA/OVF file" +} +variable "vbox_checksum" { + type = string + default = null + description = "Checksum of the OVA/OVF file" } # vmware-iso @@ -220,7 +255,7 @@ variable "vmware_tools_upload_path" { } variable "vmware_version" { type = number - default = 20 + default = 21 } variable "vmware_vmx_data" { type = map(string) diff --git a/packer_templates/scripts/_common/vmware_rhel.sh b/packer_templates/scripts/_common/vmware_rhel.sh index 835230df6..d8f8e7399 100644 --- a/packer_templates/scripts/_common/vmware_rhel.sh +++ b/packer_templates/scripts/_common/vmware_rhel.sh @@ -1,18 +1,20 @@ -#!/bin/sh -eux +#!/bin/bash -eux # set a default HOME_DIR environment variable if not set -HOME_DIR="${HOME_DIR:-/home/vagrant}"; +HOME_DIR="${HOME_DIR:-/home/vagrant}" case "$PACKER_BUILDER_TYPE" in vmware-iso|vmware-vmx) - # determine the major EL version we're runninng - major_version="$(sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release | awk -F. '{print $1}')"; + # determine the major EL version we're runninng + major_version="$(sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release | awk -F. '{print $1}')" - # make sure we use dnf on EL 8+ - if [ "$major_version" -ge 8 ]; then - dnf -y install open-vm-tools - else - yum -y install open-vm-tools - fi - ;; + # make sure we use dnf on EL 8+ + if [ "$major_version" -ge 8 ]; then + dnf install -y open-vm-tools + else + yum install -y open-vm-tools + fi + + systemctl enable vmtoolsd + systemctl start vmtoolsd esac diff --git a/packer_templates/scripts/rhel/cleanup_dnf.sh b/packer_templates/scripts/rhel/cleanup_dnf.sh index 7f8ddd206..2018ca3c4 100644 --- a/packer_templates/scripts/rhel/cleanup_dnf.sh +++ b/packer_templates/scripts/rhel/cleanup_dnf.sh @@ -26,9 +26,9 @@ echo "clean all package cache information" dnf -y clean all --enablerepo=\* # Clean up network interface persistence -rm -f /etc/udev/rules.d/70-persistent-net.rules; +rm -rf /etc/udev/rules.d/70-persistent-net.rules; mkdir -p /etc/udev/rules.d/70-persistent-net.rules; -rm -f /lib/udev/rules.d/75-persistent-net-generator.rules; +rm -rf /lib/udev/rules.d/75-persistent-net-generator.rules; rm -rf /dev/.udev/; if test -f /etc/sysconfig/network-scripts/ifcfg-*; then From 061ca8217a151bea5676fd239691fb1b37fa7dbf Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Thu, 11 Apr 2024 17:34:21 -0500 Subject: [PATCH 14/28] switch to ubuntu-latest runners (#1561) - Add back iso check, packer lint, and amazonlinux builds to build pipeline - Fix amazonlinux 2 build script - Added amazonlinux 2023 build scripts - Migrate Virtualbox and Qemu builds to github hosted runners from self-hosted runners - Added test-kitchen and kitchen-vagrant dependencies to gemspec - Added arg for bento test command to specify a specific build to test - this passes the arg to the kitchen test command - Fix vagrant post-processor to specify custom vagrant file for freebsd builds - Remove gui true from windows custom vagrant file - Fix test to skip removing linux-firmware on oraclelinux - Renamed oracle boxes to oraclelinux for consistency and remove edge cases in code - Removed unused -c flag for specifying a specific config file for bento build - Added --on-error flag to bento build command to pass to packer command - Added cpu architecture support to bento build command, so it'll only test builds that work with the current cpu architecture - Remove additional Ubuntu user-date last-command that may be locking macaddress - Add to test to move failed test boxes to builds/failed_testing directory - Changed ssh_timeout to 15m --- .github/workflows/ci-build.yml | 16 +++- .github/workflows/pkr-bld-amazonlinux-x64.yml | 64 ++++++++------- .github/workflows/pkr-bld-hyperv-x64.yml | 20 ++--- .github/workflows/pkr-bld-parallels-arm64.yml | 35 ++++----- .github/workflows/pkr-bld-parallels-x64.yml | 35 ++++----- .github/workflows/pkr-bld-qemu-arm64.yml | 60 +++++++------- .github/workflows/pkr-bld-qemu-x64.yml | 78 ++++++++++++------- .../workflows/pkr-bld-virtualbox-arm64.yml | 68 ++++++++-------- .github/workflows/pkr-bld-virtualbox-x64.yml | 74 ++++++++++-------- .github/workflows/pkr-bld-vmware-arm64.yml | 35 ++++----- .github/workflows/pkr-bld-vmware-x64.yml | 35 ++++----- .gitignore | 1 + CHANGELOG.md | 27 ++++++- amazonlinux-2-x86_64-virtualbox-build.sh | 19 +++-- amazonlinux-2023-aarch64-virtualbox-build.sh | 19 +++-- amazonlinux-2023-x86_64-virtualbox-build.sh | 19 +++-- bento.gemspec | 2 + builds.yml | 8 +- builds/failed_testing/.gitkeep | 0 builds/iso/.gitkeep | 0 lib/bento/cli.rb | 16 ++-- lib/bento/common.rb | 36 ++------- lib/bento/providermetadata.rb | 2 +- lib/bento/runner.rb | 12 +-- lib/bento/test.rb | 36 +++++++-- lib/bento/version.rb | 2 +- .../amazonlinux-2-x86_64.pkrvars.hcl | 10 +-- .../opensuse-leap-15-aarch64.pkrvars.hcl | 2 +- .../opensuse-leap-15-x86_64.pkrvars.hcl | 2 +- .../oraclelinux-7-aarch64.pkrvars.hcl} | 2 +- .../oraclelinux-7-x86_64.pkrvars.hcl} | 2 +- .../oraclelinux-8-aarch64.pkrvars.hcl} | 2 +- .../oraclelinux-8-x86_64.pkrvars.hcl} | 2 +- .../oraclelinux-9-aarch64.pkrvars.hcl} | 2 +- .../oraclelinux-9-x86_64.pkrvars.hcl} | 2 +- os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl | 2 +- packer_templates/http/ubuntu/user-data | 2 +- packer_templates/pkr-builder.pkr.hcl | 10 ++- packer_templates/pkr-variables.pkr.hcl | 2 +- packer_templates/scripts/rhel/cleanup_yum.sh | 5 +- packer_templates/vagrantfile-windows.template | 1 - 41 files changed, 419 insertions(+), 348 deletions(-) create mode 100644 builds/failed_testing/.gitkeep create mode 100644 builds/iso/.gitkeep rename os_pkrvars/{oracle/oracle-7-aarch64.pkrvars.hcl => oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl} (93%) rename os_pkrvars/{oracle/oracle-7-x86_64.pkrvars.hcl => oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl} (92%) rename os_pkrvars/{oracle/oracle-8-aarch64.pkrvars.hcl => oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl} (93%) rename os_pkrvars/{oracle/oracle-8-x86_64.pkrvars.hcl => oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl} (92%) rename os_pkrvars/{oracle/oracle-9-aarch64.pkrvars.hcl => oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl} (93%) rename os_pkrvars/{oracle/oracle-9-x86_64.pkrvars.hcl => oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl} (92%) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6864185e1..59932627c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -28,9 +28,18 @@ jobs: powershell-lint: uses: chef/github-workflows/.github/workflows/powershell-lint.yml@main -# pkr-bld-amazonlinux-x64: -# uses: ./.github/workflows/pkr-bld-amazonlinux-x64.yml -# secrets: inherit + packer-iso-check: + uses: chef/github-workflows/.github/workflows/packer-iso-url-checker.yml@main + with: + EXCLUDE_REGEX: 'amazonlinux-2.*|rhel.*|sles.*|solaris.*|windows-11-aarch64.*' + + packer-lint: + uses: chef/github-workflows/.github/workflows/packer-lint.yml@main + secrets: inherit + + pkr-bld-amazonlinux-x64: + uses: ./.github/workflows/pkr-bld-amazonlinux-x64.yml + secrets: inherit pkr-bld-hyperv-x64: uses: ./.github/workflows/pkr-bld-hyperv-x64.yml @@ -77,6 +86,7 @@ jobs: - xml-lint - powershell-lint - shellcheck-lint + - packer-lint runs-on: Ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/.github/workflows/pkr-bld-amazonlinux-x64.yml b/.github/workflows/pkr-bld-amazonlinux-x64.yml index 033202112..e12c54d14 100644 --- a/.github/workflows/pkr-bld-amazonlinux-x64.yml +++ b/.github/workflows/pkr-bld-amazonlinux-x64.yml @@ -4,51 +4,61 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, virtualbox] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: os: - amazonlinux-2 + - amazonlinux-2023 steps: + - name: Install Vagrant and VirtualBox + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 qemu-utils genisoimage + VBoxManage --version + vagrant --version + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest - name: Checkout uses: actions/checkout@main -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem - name: Bento build run: | + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ eval "$(chef shell-init bash)" - ./AMZ_build_virtualbox-ovf.sh - bento build --metadata_only os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ./${{ matrix.os }}-x86_64-virtualbox-build.sh ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() - run: | - echo Powering off and deleting any existing VMs named AmazonLinuxBento - VBoxManage controlvm AmazonLinuxBento poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm AmazonLinuxBento --delete 2> /dev/null - sleep 2 + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index fae3953c8..833ce338c 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,20 +38,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') # - name: Setup Packer # uses: hashicorp/setup-packer@main # with: # version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: packer fmt -check -recursive . - - name: Packer Validate - run: packer validate -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build + - name: Bento build run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - name: Remove VM in case of canceled job if: cancelled() @@ -66,4 +58,6 @@ jobs: name: "${{ matrix.os }}-hyperv-x86_64" path: | builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 08ec7d8ab..626841710 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,30 +38,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') # - name: Setup Packer # if: steps.verify-changed-files.outputs.files_changed == 'true' # uses: hashicorp/setup-packer@main # with: # version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -75,6 +63,11 @@ jobs: with: name: "${{ matrix.os }}-parallels-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index 1b9d1d3e2..aa1a55797 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,29 +38,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') # - name: Setup Packer # uses: hashicorp/setup-packer@main # with: # version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -74,6 +62,11 @@ jobs: with: name: "${{ matrix.os }}-parallels-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index 69e50b286..e32c89878 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, qemu] + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,35 +38,40 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') -# - name: Setup Packer -# if: steps.verify-changed-files.outputs.files_changed == 'true' -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var "qemu_accelerator=hvf" -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates + - name: Install Vagrant QEMU + run: | + brew install qemu libvirt + brew tap hashicorp/tap + brew install --cask hashicorp/tap/hashicorp-vagrant + brew services start libvirt + vagrant plugin install vagrant-libvirt vagrant-qemu + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@v3 with: name: "${{ matrix.os }}-qemu-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test libvirt diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index b5fbc75bd..86e2dc5a3 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, qemu] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,36 +38,55 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') - - name: Download virtio-win.iso - run: curl https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win.iso -o packer_templates/win_answer_files/virtio-win.iso -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var "qemu_accelerator=hvf" -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Install Vagrant and kvm + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant qemu-kvm libvirt-daemon-system virtinst libvirt-clients bridge-utils qemu-utils libvirt-dev + vagrant plugin install vagrant-libvirt vagrant-qemu + vagrant --version + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + sudo usermod -aG kvm $USER + sudo usermod -aG libvirt $USER + sudo chmod o+rw /var/run/libvirt/libvirt-sock + sudo systemctl start libvirtd + sudo systemctl status libvirtd + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build + run: | + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=kvm" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-qemu-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test libvirt diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index 5a5057700..f97be204e 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, virtualbox] + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,43 +38,40 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') -# - name: Setup Packer -# if: steps.verify-changed-files.outputs.files_changed == 'true' -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates + - name: Install Vagrant Virtualbox + run: | + brew tap hashicorp/tap + brew install --cask hashicorp/tap/hashicorp-vagrant + wget -q https://www.virtualbox.org/download/testcase/VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg + hdiutil attach VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg + sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target / + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64 - VBoxManage controlvm ${{ matrix.os }}*-aarch64 poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm ${{ matrix.os }}*-aarch64 --delete 2> /dev/null - sleep 2 + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index e3d29389e..7638f9875 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, virtualbox] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,42 +38,47 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Install Vagrant and VirtualBox + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 + VBoxManage --version + vagrant --version + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64 - VBoxManage controlvm ${{ matrix.os }}*-amd64 poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm ${{ matrix.os }}*-amd64 --delete 2> /dev/null - sleep 2 + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index dcfd9e484..ecb3a0c5b 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,30 +38,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') # - name: Setup Packer # if: steps.verify-changed-files.outputs.files_changed == 'true' # uses: hashicorp/setup-packer@main # with: # version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -74,6 +62,11 @@ jobs: with: name: "${{ matrix.os }}-vmware-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 0e8b489d4..8e1bcaa57 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -24,9 +25,9 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 @@ -37,29 +38,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') # - name: Setup Packer # uses: hashicorp/setup-packer@main # with: # version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build -# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -73,6 +61,11 @@ jobs: with: name: "${{ matrix.os }}-vmware-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.gitignore b/.gitignore index 14efcc395..b85965350 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ **/builds/ *.iso *.box +*.ova *.ovf *.vmdk *.vdi diff --git a/CHANGELOG.md b/CHANGELOG.md index 13dcfefa0..04b123644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> |:----------------:|:---:|:-------------------:|:--------------------:|:---:|:---:|:--------------------:|:---:|:-----------------:|:-----------------:| | almalinux-8 | | x | | x | | x | | x | | | almalinux-9 | | x | x | | | x | | x | x | -| amazonlinux-2 | | na | na | | | | na | | na | -| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | +| amazonlinux-2 | | | | | | x | | | | +| amazonlinux-2023 | | | | | | x | | | | | centos-7 | | x | | x | | x | | x | | | centos-stream-8 | | x | | x | | x | | x | | | centos-stream-9 | | | x | | | | | | | @@ -36,7 +36,7 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> | ubuntu-22.04 | | x | | x | | x | | x | | | ubuntu-23.10 | | x | x | | | x | | x | x | | windows-10 | | x | na | | na | x | na | | na | -| windows-11 | | x | na | | na | x | na | | na | +| windows-11 | | x | x | | na | x | na | | | | windows-2016 | | x | na | | na | x | na | | na | | windows-2019 | | x | na | | na | x | na | | na | | windows-2022 | | x | na | | na | x | na | | na | @@ -53,7 +53,26 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> - Create CD pipeline to upload vagrant boxes after PR is merged - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches -## [unreleased] (2024-03-20) +## [unreleased] (2024-04-11) + +## [v4.1.0] (2024-04-11) + +- Add back iso check, packer lint, and amazonlinux builds to build pipeline +- Fix amazonlinux 2 build script +- Added amazonlinux 2023 build scripts +- Migrate Virtualbox and Qemu builds to github hosted runners from self-hosted runners +- Added test-kitchen and kitchen-vagrant dependencies to gemspec +- Added arg for bento test command to specify a specific build to test - this passes the arg to the kitchen test command +- Fix vagrant post-processor to specify custom vagrant file for freebsd builds +- Remove gui true from windows custom vagrant file +- Fix test to skip removing linux-firmware on oraclelinux +- Renamed oracle boxes to oraclelinux for consistency and remove edge cases in code +- Removed unused -c flag for specifying a specific config file for bento build +- Added --on-error flag to bento build command to pass to packer command +- Added cpu architecture support to bento build command, so it'll only test builds that work with the current cpu architecture +- Remove additional Ubuntu user-date last-command that may be locking macaddress +- Add to test to move failed test boxes to builds/failed_testing directory +- Changed ssh_timeout to 15m ## [v4.0.2] (2024-03-20) diff --git a/amazonlinux-2-x86_64-virtualbox-build.sh b/amazonlinux-2-x86_64-virtualbox-build.sh index 8902e9dae..9bddec904 100755 --- a/amazonlinux-2-x86_64-virtualbox-build.sh +++ b/amazonlinux-2-x86_64-virtualbox-build.sh @@ -24,7 +24,16 @@ echo "Cleaning up old files" rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk echo "Creating ISO" -hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +if [ -x "$(command -v genisoimage)" ]; then + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data +elif [ -x "$(command -v hdiutil)" ]; then + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso +else + echo "No tool found to create the seed.iso" + exit 1 +fi VM="AmazonLinuxBento" echo Powering off and deleting any existing VMs named $VM @@ -36,8 +45,8 @@ echo "Creating the VM" # from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html VBoxManage createvm --name $VM --ostype "RedHat_64" --register VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2_x86_64.vdi -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --type hdd --medium "$AMZDIR"/amazon2_x86_64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium "$AMZDIR"/seed.iso VBoxManage modifyvm $VM --memory 2048 VBoxManage modifyvm $VM --cpus 2 VBoxManage modifyvm $VM --audio-driver none @@ -48,7 +57,7 @@ echo Sleeping for 120 seconds to let the system boot and cloud-init to run VBoxManage startvm $VM --type headless sleep 120 VBoxManage controlvm $VM poweroff --type headless -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium none sleep 5 echo Exporting the VM to an OVF file @@ -59,7 +68,7 @@ echo Deleting the VM vboxmanage unregistervm $VM --delete echo starting packer build of amazonlinux -if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2_x86_64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl; then echo "Cleaning up files" rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso else diff --git a/amazonlinux-2023-aarch64-virtualbox-build.sh b/amazonlinux-2023-aarch64-virtualbox-build.sh index 5d0ec7ae8..2bee4bf56 100755 --- a/amazonlinux-2023-aarch64-virtualbox-build.sh +++ b/amazonlinux-2023-aarch64-virtualbox-build.sh @@ -26,7 +26,16 @@ if [ ! -f "$AMZDIR"/amazon2023_arm64.vdi ]; then fi echo "Creating ISO" -hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +if [ -x "$(command -v genisoimage)" ]; then + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data +elif [ -x "$(command -v hdiutil)" ]; then + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso +else + echo "No tool found to create the seed.iso" + exit 1 +fi VM="AmazonLinuxBento" echo Powering off and deleting any existing VMs named $VM @@ -38,8 +47,8 @@ echo "Creating the VM" # from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html VBoxManage createvm --name $VM --ostype "Fedora_64" --register VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium "$AMZDIR"/seed.iso VBoxManage modifyvm $VM --chipset ich9 VBoxManage modifyvm $VM --firmware efi VBoxManage modifyvm $VM --memory 2048 @@ -56,7 +65,7 @@ echo "Sleeping for 120 seconds to let the system boot and cloud-init to run" VBoxManage startvm $VM --type headless sleep 120 VBoxManage controlvm $VM poweroff --type headless -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium none sleep 5 echo "Exporting the VM to an OVF file" @@ -67,7 +76,7 @@ echo "Deleting the VM" vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" -if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_arm64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_arm64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl; then echo "Cleaning up files" rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 else diff --git a/amazonlinux-2023-x86_64-virtualbox-build.sh b/amazonlinux-2023-x86_64-virtualbox-build.sh index f58fb84b6..0591f6a86 100755 --- a/amazonlinux-2023-x86_64-virtualbox-build.sh +++ b/amazonlinux-2023-x86_64-virtualbox-build.sh @@ -26,7 +26,16 @@ if [ ! -f "$AMZDIR"/amazon2023_x86_64.vdi ]; then fi echo "Creating ISO" -hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +if [ -x "$(command -v genisoimage)" ]; then + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data +elif [ -x "$(command -v hdiutil)" ]; then + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso +else + echo "No tool found to create the seed.iso" + exit 1 +fi VM="AmazonLinuxBento" echo Powering off and deleting any existing VMs named $VM @@ -38,8 +47,8 @@ echo "Creating the VM" # from https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html VBoxManage createvm --name $VM --ostype "Fedora_64" --register VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2023_x86_64.vdi -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --type hdd --medium "$AMZDIR"/amazon2023_x86_64.vdi +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium "$AMZDIR"/seed.iso VBoxManage modifyvm $VM --memory 2048 VBoxManage modifyvm $VM --cpus 2 VBoxManage modifyvm $VM --nat-localhostreachable1 on @@ -54,7 +63,7 @@ echo "Sleeping for 120 seconds to let the system boot and cloud-init to run" VBoxManage startvm $VM --type headless sleep 120 VBoxManage controlvm $VM poweroff --type headless -VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none +VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --type dvddrive --medium none sleep 5 echo "Exporting the VM to an OVF file" @@ -65,7 +74,7 @@ echo "Deleting the VM" vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" -if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_x86_64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl; then echo "Cleaning up files" rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 else diff --git a/bento.gemspec b/bento.gemspec index 690638410..51343bad0 100644 --- a/bento.gemspec +++ b/bento.gemspec @@ -14,6 +14,8 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.6' s.add_dependency 'mixlib-shellout', '>= 2.3.2' + s.add_dependency 'test-kitchen' + s.add_dependency 'kitchen-vagrant' s.bindir = 'bin' s.executables = %w(bento) diff --git a/builds.yml b/builds.yml index 6a3567516..873b50a90 100644 --- a/builds.yml +++ b/builds.yml @@ -10,8 +10,6 @@ public: - 'amazonlinux-2023' - 'almalinux-8' - 'almalinux-9' - - 'amazon-2' - - 'amazon-2023' - 'centos-7' - 'centos-stream-8' - 'centos-stream-9' @@ -22,9 +20,9 @@ public: - 'freebsd-13' - 'freebsd-14' - 'opensuse-leap-15' - - 'oracle-7' - - 'oracle-8' - - 'oracle-9' + - 'oraclelinux-7' + - 'oraclelinux-8' + - 'oraclelinux-9' - 'rockylinux-8' - 'rockylinux-9' - 'ubuntu-20.04' diff --git a/builds/failed_testing/.gitkeep b/builds/failed_testing/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/builds/iso/.gitkeep b/builds/iso/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/lib/bento/cli.rb b/lib/bento/cli.rb index 0727465e4..e68ab53c8 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -49,6 +49,10 @@ def self.parse(args) end } + test_argv_proc = proc { |opts| + opts.regx = ARGV[0] + } + md_json_argv_proc = proc { |opts| opts.md_json = ARGV[0] } @@ -81,6 +85,10 @@ def self.parse(args) options.metadata_only = opt end + opts.on('--on-error', '[cleanup|abort|ask|run-cleanup-provisioner] If the build fails do: clean up (default), abort, ask, or run-cleanup-provisioner.') do |opt| + options.on_error = opt + end + opts.on('--vars VARS', 'Comma seperated list of variable names equal values (ex: boot_wait="2s",ssh_timeout="5s")') do |opt| options.vars = opt end @@ -89,10 +97,6 @@ def self.parse(args) options.var_files = opt end - opts.on('-c BUILD_YML', '--config BUILD_YML', 'Use a configuration file') do |opt| - options.config = opt - end - opts.on('-d', '--[no-]debug', 'Run packer with debug output') do |opt| options.debug = opt end @@ -165,7 +169,7 @@ def self.parse(args) options.provisioner = opt end end, - argv: proc {}, + argv: test_argv_proc, }, upload: { class: UploadRunner, @@ -206,7 +210,7 @@ def initialize(opts) end def start - templates.each { |template| puts template } + puts templates.join("\n") end end diff --git a/lib/bento/common.rb b/lib/bento/common.rb index 24aa0b81f..8b3b9a63d 100644 --- a/lib/bento/common.rb +++ b/lib/bento/common.rb @@ -75,40 +75,20 @@ def box_metadata(metadata_file) metadata end - def metadata_files - @metadata_files ||= Dir.glob('builds/*.json') + def metadata_files(arch_support = false) + arch = if RbConfig::CONFIG['host_cpu'] == 'arm64' + 'aarch64' + else + RbConfig::CONFIG['host_cpu'] + end + glob = "builds/*#{"-#{arch}" if arch_support}._metadata.json" + @metadata_files ||= Dir.glob(glob) end def builds_yml YAML.load(File.read('builds.yml')) end - def build_list - arm64 = [] - x86_64 = [] - builds_yml['public'].each do |platform, versions| - versions.each do |version, archs| - archs.each do |arch| - folder = case platform - when 'opensuse-leap' - 'opensuse' - when 'oracle' - 'oraclelinux' - else - platform - end - case arch - when 'aarch64' - arm64 << "#{folder}/#{platform}-#{version}-#{arch}" - else - x86_64 << "#{folder}/#{platform}-#{version}-#{arch}" - end - end - end - end - x86_64 + arm64 - end - def private_box?(boxname) proprietary_os_list = %w(macos windows sles solaris rhel) proprietary_os_list.any? { |p| boxname.include?(p) } diff --git a/lib/bento/providermetadata.rb b/lib/bento/providermetadata.rb index 051b41a9d..7850e4c49 100644 --- a/lib/bento/providermetadata.rb +++ b/lib/bento/providermetadata.rb @@ -93,7 +93,7 @@ def ver_vbox end def ver_libvirt - cmd = Mixlib::ShellOut.new('/usr/local/opt/libvirt/sbin/libvirtd -V') + cmd = Mixlib::ShellOut.new('libvirtd -V') cmd.run_command cmd.stdout.split(' ').last end diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index b59554dcc..7c41b5804 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -8,7 +8,7 @@ class BuildRunner include Common include PackerExec - attr_reader :template_files, :config, :dry_run, :debug, :only, :except, :mirror, :headed, :single, :errors, + attr_reader :template_files, :dry_run, :debug, :only, :except, :mirror, :headed, :single, :errors, :on_error, :override_version, :build_timestamp, :cpus, :mem, :metadata_only, :vars, :var_files, :pkr_cmd def initialize(opts) @@ -17,6 +17,7 @@ def initialize(opts) @dry_run = opts.dry_run @metadata_only = opts.metadata_only @debug = opts.debug + @on_error = opts.on_error ||= nil @only = opts.only ||= nil @except = opts.except @mirror = opts.mirror @@ -33,7 +34,7 @@ def initialize(opts) end def start - templates = config ? build_list : template_files + templates = template_files banner('Starting build for templates:') banner('Installing packer plugins') unless dry_run || metadata_only shellout("packer init -upgrade #{File.dirname(templates.first)}/../../packer_templates") unless dry_run || metadata_only @@ -43,7 +44,7 @@ def start end banner("Build finished in #{duration(time.real)}.") unless errors.empty? - raise("Failed Builds:\n #{errors.join("\n")}\n exited #{$CHILD_STATUS}") + raise("Failed Builds:\n#{errors.join("\n")}\nexited #{$CHILD_STATUS}") end end @@ -95,6 +96,7 @@ def packer_build_cmd(template, _var_file) cmd.insert(4, '-var headless=false') if headed cmd.insert(2, '-parallel=false') if single cmd.insert(2, '-debug') if debug + cmd.insert(2, "-on-error=#{on_error}") if on_error cmd.insert(0, 'echo') if dry_run || metadata_only cmd end @@ -106,8 +108,8 @@ def write_final_metadata(template, buildtime) md[:providers] = ProviderMetadata.new(path, md[:template]).read md[:providers].each do |p| p[:build_time] = buildtime - p[:build_cpus] = cpus unless cpus.nil? - p[:build_mem] = mem unless mem.nil? + p[:build_cpus] = cpus if cpus + p[:build_mem] = mem if mem end if dry_run diff --git a/lib/bento/test.rb b/lib/bento/test.rb index 21c2b684d..0d733aa15 100644 --- a/lib/bento/test.rb +++ b/lib/bento/test.rb @@ -5,19 +5,22 @@ class TestRunner include Common - attr_reader :shared_folder, :boxname, :provider, :box_url, :no_shared, :provisioner, :errors + attr_reader :shared_folder, :boxname, :provider, :box_url, :no_shared, :provisioner, :errors, :regx def initialize(opts) @debug = opts.debug @no_shared = opts.no_shared @provisioner = opts.provisioner.nil? ? 'shell' : opts.provisioner @errors = [] + @regx = opts.regx || nil end def start banner('Starting testing...') + md_files = metadata_files(true) + puts md_files.join("\n") time = Benchmark.measure do - metadata_files.each do |metadata_file| + md_files.each do |metadata_file| destroy_all_bento test_box(metadata_file) destroy_all_bento @@ -25,7 +28,7 @@ def start end banner("Testing finished in #{duration(time.real)}.") unless errors.empty? - raise("Failed Tests:\n #{errors.join("\n")}\n exited #{$CHILD_STATUS}") + raise("Failed Tests:\n#{errors.join("\n")}\nexited #{$CHILD_STATUS}") end end @@ -55,7 +58,7 @@ def test_box(md_json) when 'aarch64', 'arm64' 'arm64' else - raise "Unknown arch #{md_data.inspect}" + raise "Unknown arch #{md['arch'].inspect}" end @boxname = md['name'] @providers = md['providers'] @@ -71,14 +74,33 @@ def test_box(md_json) Dir.chdir(temp_dir) banner("Test kitchen file located in #{temp_dir}") - @providers.each do |k, _v| - test = Mixlib::ShellOut.new("kitchen test #{@boxname}-#{@arch}-#{k.tr('_', '-')}", timeout: 900, live_stream: STDOUT) + if regx + test = Mixlib::ShellOut.new("kitchen test #{regx.tr('.', '').tr('_', '-')}", timeout: 900, live_stream: STDOUT) test.run_command if test.error? - test.stderr + puts test.stderr + errors << "#{regex}" + end + else + @providers.each do |k, v| + banner("Testing #{@boxname.tr('.', '')}-#{@arch}-#{k.tr('_', '-')}") + test = Mixlib::ShellOut.new("kitchen test #{@boxname.tr('.', '')}-#{@arch}-#{k.tr('_', '-')}", timeout: 900, live_stream: STDOUT) + test.run_command + next unless test.error? + puts test.stderr errors << "#{@boxname}-#{@arch}-#{k}" + FileUtils.cp(File.join(bento_dir, md_json), File.join(bento_dir, 'builds', 'failed_testing', File.basename(md_json))) unless File.exist?(File.join(bento_dir, 'builds', 'failed_testing', File.basename(md_json))) + FileUtils.mv(File.join(bento_dir, 'builds', v['file']), File.join(bento_dir, 'builds', 'failed_testing', v['file'])) + @providers.delete(k) + if @providers.empty? + File.delete(File.join(bento_dir, md_json)) if File.exist?(File.join(bento_dir, md_json)) + else + File.binwrite(File.join(bento_dir, md_json), JSON.pretty_generate(md)) + end end end + destroy = Mixlib::ShellOut.new('kitchen destroy', timeout: 900, live_stream: STDOUT) + destroy.run_command Dir.chdir(bento_dir) FileUtils.rm_rf(temp_dir) end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 9cba61623..4cb808c14 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '4.0.2'.freeze + VERSION = '4.1.0'.freeze end diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl index 08baf9a58..812d44045 100644 --- a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl +++ b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ -os_name = "amazonlinux" -os_version = "2" -os_arch = "x86_64" -vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/virtualbox/amzn2-virtualbox-2.0.20240306.2-x86_64.xfs.gpt.vdi" -vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/virtualbox/SHA256SUMS" +os_name = "amazonlinux" +os_version = "2" +os_arch = "x86_64" +vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/virtualbox/amzn2-virtualbox-2.0.20240306.2-x86_64.xfs.gpt.vdi" +vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/virtualbox/SHA256SUMS" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "rhel9-64" diff --git a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl index 29b434d07..754aaebab 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "opensuse" +os_name = "opensuse-leap" os_version = "15.5" os_arch = "aarch64" iso_url = "http://provo-mirror.opensuse.org/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-aarch64-Media.iso" diff --git a/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl index 487b637bf..33202e42f 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "opensuse" +os_name = "opensuse-leap" os_version = "15.5" os_arch = "x86_64" iso_url = "http://sfo-korg-mirror.kernel.org/opensuse/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-x86_64-Media.iso" diff --git a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl index 67873935e..8fbfc33f8 100644 --- a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "7.9" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL7/u9/aarch64/OracleLinux-R7-U9-Server-aarch64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl index 49a1a6f40..6bd8977ad 100644 --- a/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "7.9" os_arch = "x86_64" iso_url = "http://mirrors.dotsrc.org/oracle-linux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl index 8656e267d..c04cf1f0e 100644 --- a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "8.9" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/aarch64/OracleLinux-R8-U9-aarch64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl index af05d8767..499533fd4 100644 --- a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "8.9" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/x86_64/OracleLinux-R8-U9-x86_64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl index 2357d748e..7d64a0a65 100644 --- a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "9.3" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/aarch64/OracleLinux-R9-U3-aarch64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl index b76944965..0aa28f6e1 100644 --- a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "9.3" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/x86_64/OracleLinux-R9-U3-x86_64-dvd.iso" diff --git a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl index 4d9b85d40..bf705c990 100644 --- a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl +++ b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "suse" os_version = "15.5" os_arch = "x86_64" iso_url = "https://updates.suse.com/SUSE/Products/SLE-Product-SLES/15-SP5/x86_64/iso/SLE-15-SP5-Online-x86_64-GM-Media1.iso" -iso_checksum = "" +iso_checksum = "b0920189fd7f2624983a9cf8bc062bbb7a8557658e3feadde77b80e72f66b6ef" parallels_guest_os_type = "suse" vbox_guest_os_type = "SUSE_LE_64" vmware_guest_os_type = "sles15-64" diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index bd5b64355..d9393c65d 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,7 +13,7 @@ autoinstall: install-server: yes allow-pw: yes late-commands: - - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf + # - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 8111c87e4..66c797904 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -64,7 +64,7 @@ locals { "${path.root}/scripts/freebsd/cleanup_freebsd.sh", "${path.root}/scripts/freebsd/minimize_freebsd.sh" ] : ( - var.os_name == "opensuse" || + var.os_name == "opensuse-leap" || var.os_name == "sles" ? [ "${path.root}/scripts/suse/repositories_suse.sh", "${path.root}/scripts/suse/update_suse.sh", @@ -209,8 +209,10 @@ build { # Convert machines to vagrant boxes post-processor "vagrant" { - compression_level = 9 - output = "${path.root}/../builds/${var.os_name}-${var.os_version}-${var.os_arch}.{{ .Provider }}.box" - vagrantfile_template = var.is_windows ? "${path.root}/vagrantfile-windows.template" : null + compression_level = 9 + output = "${path.root}/../builds/${var.os_name}-${var.os_version}-${var.os_arch}.{{ .Provider }}.box" + vagrantfile_template = var.is_windows ? "${path.root}/vagrantfile-windows.template" : ( + var.os_name == "freebsd" ? "${path.root}/vagrantfile-freebsd.template" : null + ) } } diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index a09aca878..16ef20dd8 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -359,7 +359,7 @@ variable "ssh_port" { } variable "ssh_timeout" { type = string - default = "30m" + default = "15m" } variable "ssh_username" { type = string diff --git a/packer_templates/scripts/rhel/cleanup_yum.sh b/packer_templates/scripts/rhel/cleanup_yum.sh index abc88a934..22cf50b4d 100644 --- a/packer_templates/scripts/rhel/cleanup_yum.sh +++ b/packer_templates/scripts/rhel/cleanup_yum.sh @@ -19,9 +19,8 @@ package-cleanup --oldkernels --count=1 -y # Avoid ~200 meg firmware package we don't need # this cannot be done in the KS file so we do it here -if test "$(uname -r)" == -- *el7uek*; then - echo "Skipping firmware removal for Oracle Linux" -else +distro="$(rpm -qf --queryformat '%{NAME}' /etc/redhat-release | cut -f 1 -d '-')" +if [ "$distro" != 'oraclelinux' ]; then echo "Removing extra firmware packages" yum -y remove linux-firmware fi diff --git a/packer_templates/vagrantfile-windows.template b/packer_templates/vagrantfile-windows.template index 4a19e63d7..d6838e0e8 100644 --- a/packer_templates/vagrantfile-windows.template +++ b/packer_templates/vagrantfile-windows.template @@ -9,7 +9,6 @@ Vagrant.configure(2) do |config| config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.vm.provider "virtualbox" do |vb| - vb.gui = true vb.cpus = 2 vb.memory = 4096 end From db7858d0d0a8d58bee5778851162a9560c9cb10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=BCmel?= <blaimi@blaimi.de> Date: Fri, 12 Apr 2024 17:34:57 +0200 Subject: [PATCH 15/28] fix typo in README (#1554) * fix typo in README * fix virtio-win.iso directory in README * fix mount of downloaded iso in qemu * Upgrade Windows 11 to 23H2 --- README.md | 5 +++-- os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl | 4 ++-- packer_templates/pkr-sources.pkr.hcl | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5b074914c..d34eb2a4e 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,14 @@ If the build is successful, your box files will be in the `builds` directory at ### KVM/qemu support for Windows -You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso). You can do this from the command line: `wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O virtio-win.iso` and place it in the packer_templates/win_answer_files/ directory. +You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso) and place it in the builds/iso/ directory. +You can do this from the command line: `mkdir -p builds/iso/; wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O builds/iso/virtio-win.iso` You can use the following sample command to build a KVM/qemu Windows box: ```bash packer init -upgrade ./packer_templates -packer build --only=qemu.vm -var-file=os_pkrvars/windwos/windows-2022-x86_64.pkrvars.hcl ./packer_templates +packer build --only=qemu.vm -var-file=os_pkrvars/windows/windows-2022-x86_64.pkrvars.hcl ./packer_templates ``` ### Proprietary Templates diff --git a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl index 579e5840c..3c059d44a 100644 --- a/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-11-x86_64.pkrvars.hcl @@ -3,8 +3,8 @@ os_version = "11" os_arch = "x86_64" is_windows = true # Windows 11 source requires a prompt to select OS to install. This allows the system time to add reg keys to ignore TPM Check before the install begins. -iso_url = "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66751/22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" -iso_checksum = "ebbc79106715f44f5020f77bd90721b17c5a877cbc15a3535b99155493a1bb3f" +iso_url = "https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" +iso_checksum = "c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c" parallels_guest_os_type = "win-11" vbox_guest_os_type = "Windows11_64" vmware_guest_os_type = "windows9srv-64" diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 2fe6dbb03..2cb1a1d21 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -35,6 +35,7 @@ locals { qemuargs = var.qemuargs == null ? ( var.is_windows ? [ ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], + ["-drive", "file=${var.iso_url},media=cdrom,index=2"], ["-drive", "file=${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [ From b34c9c6b0742d63c694f018dde953258100f03af Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Fri, 26 Apr 2024 16:58:49 -0500 Subject: [PATCH 16/28] add macos build (#1566) - Require ruby >= 3.0.0 - Add parallels-ipsw source - Added MacOS template for parallels-ipsw - Created MacOS scripts - Adjusted build flags to all be lower case for consistency - Removed extra amazonlinux directories to be more consistent with other builds - Added build_files directory for all temp files to be stored in during packer building - Opensuse-leap-15.5 updated to 15.6 - Remove Fedora 38 and add 40 builds - Remove Ubuntu 23.10 and add 24.04 builds --- .github/workflows/ci-build.yml | 2 +- .github/workflows/pkr-bld-hyperv-x64.yml | 2 +- .github/workflows/pkr-bld-parallels-arm64.yml | 4 +- .github/workflows/pkr-bld-parallels-x64.yml | 4 +- .github/workflows/pkr-bld-qemu-arm64.yml | 4 +- .github/workflows/pkr-bld-qemu-x64.yml | 4 +- .../workflows/pkr-bld-virtualbox-arm64.yml | 4 +- .github/workflows/pkr-bld-virtualbox-x64.yml | 4 +- .github/workflows/pkr-bld-vmware-arm64.yml | 4 +- .github/workflows/pkr-bld-vmware-x64.yml | 4 +- CHANGELOG.md | 86 ++++++----- amazonlinux-2-x86_64-virtualbox-build.sh | 15 +- amazonlinux-2023-aarch64-virtualbox-build.sh | 14 +- amazonlinux-2023-x86_64-virtualbox-build.sh | 14 +- bento.gemspec | 2 +- builds.yml | 79 +++++----- builds/build_files/.gitkeep | 0 lib/bento/cli.rb | 10 +- lib/bento/test.rb | 4 +- lib/bento/upload.rb | 4 +- lib/bento/version.rb | 2 +- .../fedora/fedora-39-aarch64.pkrvars.hcl | 3 +- ...vars.hcl => fedora-40-aarch64.pkrvars.hcl} | 6 +- ...rvars.hcl => fedora-40-x86_64.pkrvars.hcl} | 6 +- os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl | 73 +++++++++ .../opensuse-leap-15-aarch64.pkrvars.hcl | 6 +- .../opensuse-leap-15-x86_64.pkrvars.hcl | 6 +- ...s.hcl => ubuntu-24.04-aarch64.pkrvars.hcl} | 6 +- ...rs.hcl => ubuntu-24.04-x86_64.pkrvars.hcl} | 6 +- packer_templates/amz_seed_iso/README.md | 1 - packer_templates/amz_working_files/README.md | 1 - .../{amz_seed_iso => http/amazon}/meta-data | 0 .../{amz_seed_iso => http/amazon}/user-data | 0 packer_templates/http/ubuntu/user-data | 6 +- packer_templates/pkr-builder.pkr.hcl | 146 ++++++++++-------- packer_templates/pkr-sources.pkr.hcl | 61 ++++++-- packer_templates/pkr-variables.pkr.hcl | 27 ++++ packer_templates/scripts/_common/motd.sh | 7 +- packer_templates/scripts/_common/vagrant.sh | 6 +- .../scripts/macos/parallels-tools.sh | 12 ++ packer_templates/scripts/macos/shrink.sh | 37 +++++ .../scripts/macos/system-default.sh | 32 ++++ .../scripts/macos/system-update.sh | 16 ++ packer_templates/scripts/macos/vagrant.sh | 30 ++++ .../scripts/macos/vmware-tools.sh | 48 ++++++ 45 files changed, 579 insertions(+), 229 deletions(-) create mode 100644 builds/build_files/.gitkeep rename os_pkrvars/fedora/{fedora-38-aarch64.pkrvars.hcl => fedora-40-aarch64.pkrvars.hcl} (59%) rename os_pkrvars/fedora/{fedora-38-x86_64.pkrvars.hcl => fedora-40-x86_64.pkrvars.hcl} (59%) create mode 100644 os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl rename os_pkrvars/ubuntu/{ubuntu-23.10-aarch64.pkrvars.hcl => ubuntu-24.04-aarch64.pkrvars.hcl} (69%) rename os_pkrvars/ubuntu/{ubuntu-23.10-x86_64.pkrvars.hcl => ubuntu-24.04-x86_64.pkrvars.hcl} (61%) delete mode 100644 packer_templates/amz_seed_iso/README.md delete mode 100644 packer_templates/amz_working_files/README.md rename packer_templates/{amz_seed_iso => http/amazon}/meta-data (100%) rename packer_templates/{amz_seed_iso => http/amazon}/user-data (100%) create mode 100644 packer_templates/scripts/macos/parallels-tools.sh create mode 100644 packer_templates/scripts/macos/shrink.sh create mode 100644 packer_templates/scripts/macos/system-default.sh create mode 100644 packer_templates/scripts/macos/system-update.sh create mode 100644 packer_templates/scripts/macos/vagrant.sh create mode 100644 packer_templates/scripts/macos/vmware-tools.sh diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 59932627c..4caf23c95 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -31,7 +31,7 @@ jobs: packer-iso-check: uses: chef/github-workflows/.github/workflows/packer-iso-url-checker.yml@main with: - EXCLUDE_REGEX: 'amazonlinux-2.*|rhel.*|sles.*|solaris.*|windows-11-aarch64.*' + EXCLUDE_REGEX: 'amazonlinux-2.*|rhel.*|sles.*|solaris.*|windows-11-aarch64.*,macos-*' packer-lint: uses: chef/github-workflows/.github/workflows/packer-lint.yml@main diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index 833ce338c..7002d7f76 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - hyperv-iso steps: diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 626841710..6934da07f 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - parallels-iso steps: diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index aa1a55797..9af99ba4c 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - parallels-iso steps: diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index e32c89878..944f8c95f 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - qemu steps: diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index 86e2dc5a3..5bb0eee9b 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - qemu steps: diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index f97be204e..d649e759c 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - virtualbox-iso steps: diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 7638f9875..2aafba2ae 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - virtualbox-iso steps: diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index ecb3a0c5b..567e56ccd 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - vmware-iso steps: diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 8e1bcaa57..71a95f361 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -20,8 +20,8 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 @@ -32,7 +32,7 @@ jobs: - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - vmware-iso steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 04b123644..1a3583a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,41 +5,42 @@ ***Note:** Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> -| | hyperv<br>x86_64 | parallels<br>x86_64 | parallels<br>aarch64 | qemu<br>x86_64 | qemu<br>aarch64 | virtualbox<br>x86_64 | virtualbox<br>aarch64 | vmware<br>x86_64 | vmware<br>aarch64 | -|:----------------:|:---:|:-------------------:|:--------------------:|:---:|:---:|:--------------------:|:---:|:-----------------:|:-----------------:| -| almalinux-8 | | x | | x | | x | | x | | -| almalinux-9 | | x | x | | | x | | x | x | -| amazonlinux-2 | | | | | | x | | | | -| amazonlinux-2023 | | | | | | x | | | | -| centos-7 | | x | | x | | x | | x | | -| centos-stream-8 | | x | | x | | x | | x | | -| centos-stream-9 | | | x | | | | | | | -| debian-11 | | x | x | | | x | | x | | -| debian-12 | | x | x | | | x | | x | x | -| fedora-38 | | x | | x | | x | | x | x | -| fedora-39 | | | | | | | | | | -| freebsd-13 | | | | | | x | | x | x | -| freebsd-14 | | | | | | x | | x | | -| opensuse-leap-15 | | x | | x | | x | | x | | -| oraclelinux-7 | | x | | x | | x | | x | | -| oraclelinux-8 | | | | x | | x | | x | | -| oraclelinux-9 | | x | x | | | x | | x | | -| rhel-7 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | -| rhel-8 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | -| rhel-9 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | -| rockylinux-8 | | x | | x | | x | | x | | -| rockylinux-9 | | x | | | | x | | x | x | -| sles-12 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | -| sles-13 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | -| solaris-11 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | -| ubuntu-20.04 | | x | x | | | x | | x | x | -| ubuntu-22.04 | | x | | x | | x | | x | | -| ubuntu-23.10 | | x | x | | | x | | x | x | -| windows-10 | | x | na | | na | x | na | | na | -| windows-11 | | x | x | | na | x | na | | | -| windows-2016 | | x | na | | na | x | na | | na | -| windows-2019 | | x | na | | na | x | na | | na | -| windows-2022 | | x | na | | na | x | na | | na | +| os | hyperv<br>x86_64 | parallels<br>x86_64 | parallels<br>aarch64 | qemu<br>x86_64 | qemu<br>aarch64 | virtualbox<br>x86_64 | virtualbox<br>aarch64 | vmware<br>x86_64 | vmware<br>aarch64 | +|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| almalinux-8 | | x | | | | x | | x | | +| almalinux-9 | | x | | | | x | | x | x | +| amazonlinux-2 | | | | | | x | | | | +| amazonlinux-2023 | | | | | | x | | | | +| centos-7 | | | | | | x | | x | | +| centos-stream-8 | | x | | | | x | | x | | +| centos-stream-9 | | x | | | | x | | x | x | +| debian-11 | | x | x | | | x | | x | | +| debian-12 | | x | x | | | x | | x | x | +| fedora-39 | | x | x | | | x | | x | x | +| fedora-40 | | | | | | | | | | +| freebsd-13 | | | | | | x | | x | x | +| freebsd-14 | | | | | | | | | | +| macos | | | x | | | | | | | +| opensuse-leap-15 | | | | | | x | | x | x | +| oraclelinux-7 | | x | | | | x | | x | | +| oraclelinux-8 | | | | | | x | | x | | +| oraclelinux-9 | | x | x | | | x | | x | x | +| rhel-7 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | +| rhel-8 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | +| rhel-9 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | +| rockylinux-8 | | x | | | | x | | x | | +| rockylinux-9 | | x | | | | x | | x | x | +| sles-12 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | +| sles-15 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | +| solaris-11 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | +| ubuntu-20.04 | | | x | | | x | | x | x | +| ubuntu-22.04 | | x | | | | x | | | | +| ubuntu-24.04 | | x | x | | | x | | x | x | +| windows-10 | | | na | | na | x | na | | na | +| windows-11 | | x | x | | | x | | x | | +| windows-2016 | | x | na | | na | x | na | x | na | +| windows-2019 | | x | na | | na | x | na | x | na | +| windows-2022 | | x | na | | na | x | na | | na | ### Todo @@ -53,7 +54,20 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> - Create CD pipeline to upload vagrant boxes after PR is merged - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches -## [unreleased] (2024-04-11) +## [unreleased] (2024-04-26) + +## [v4.1.1] (2024-04-26) + +- Require ruby >= 3.0.0 +- Add parallels-ipsw source +- Added MacOS template for parallels-ipsw +- Created MacOS scripts +- Adjusted build flags to all be lower case for consistency +- Removed extra amazonlinux directories to be more consistent with other builds +- Added build_files directory for all temp files to be stored in during packer building +- Opensuse-leap-15.5 updated to 15.6 +- Remove Fedora 38 and add 40 builds +- Remove Ubuntu 23.10 and add 24.04 builds ## [v4.1.0] (2024-04-11) diff --git a/amazonlinux-2-x86_64-virtualbox-build.sh b/amazonlinux-2-x86_64-virtualbox-build.sh index 9bddec904..b7d8e0775 100755 --- a/amazonlinux-2-x86_64-virtualbox-build.sh +++ b/amazonlinux-2-x86_64-virtualbox-build.sh @@ -5,8 +5,8 @@ SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") cd "$SCRIPT_RELATIVE_DIR" || exit # set tmp dir for files -AMZDIR="$(pwd)/packer_templates/amz_working_files" - +AMZDIR="$(pwd)/builds/build_files/amazonlinux-2-x86_64-virtualbox" +mkdir -p "$AMZDIR" # Get virtualbox vdi file name with latest version number IMG="$(wget -q https://cdn.amazonlinux.com/os-images/latest/virtualbox/ -O - | grep ".vdi" | cut -d "\"" -f 2)" @@ -24,12 +24,13 @@ echo "Cleaning up old files" rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk echo "Creating ISO" +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" if [ -x "$(command -v genisoimage)" ]; then - genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$SEED_ISO_DIR"/user-data "$SEED_ISO_DIR"/meta-data elif [ -x "$(command -v hdiutil)" ]; then - hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$SEED_ISO_DIR"/ elif [ -x "$(command -v mkisofs)" ]; then - mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ else echo "No tool found to create the seed.iso" exit 1 @@ -68,9 +69,9 @@ echo Deleting the VM vboxmanage unregistervm $VM --delete echo starting packer build of amazonlinux -if bento build --vars vbox_source_path="$AMZDIR"/amazon2_x86_64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2_x86_64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso + rm -f "$AMZDIR" else exit 1 fi diff --git a/amazonlinux-2023-aarch64-virtualbox-build.sh b/amazonlinux-2023-aarch64-virtualbox-build.sh index 2bee4bf56..bdb1a01e0 100755 --- a/amazonlinux-2023-aarch64-virtualbox-build.sh +++ b/amazonlinux-2023-aarch64-virtualbox-build.sh @@ -5,7 +5,8 @@ SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") cd "$SCRIPT_RELATIVE_DIR" || exit # set tmp dir for files -AMZDIR="$(pwd)/packer_templates/amz_working_files" +AMZDIR="$(pwd)/builds/build_files/amazonlinux-2023-aarch64-virtualbox" +mkdir -p "$AMZDIR" echo "Cleaning up old files" rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.vdi @@ -26,12 +27,13 @@ if [ ! -f "$AMZDIR"/amazon2023_arm64.vdi ]; then fi echo "Creating ISO" +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" if [ -x "$(command -v genisoimage)" ]; then - genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$SEED_ISO_DIR"/user-data "$SEED_ISO_DIR"/meta-data elif [ -x "$(command -v hdiutil)" ]; then - hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$SEED_ISO_DIR"/ elif [ -x "$(command -v mkisofs)" ]; then - mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ else echo "No tool found to create the seed.iso" exit 1 @@ -76,9 +78,9 @@ echo "Deleting the VM" vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" -if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_arm64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_arm64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 + rm -f "$AMZDIR" else exit 1 fi diff --git a/amazonlinux-2023-x86_64-virtualbox-build.sh b/amazonlinux-2023-x86_64-virtualbox-build.sh index 0591f6a86..da6d3d097 100755 --- a/amazonlinux-2023-x86_64-virtualbox-build.sh +++ b/amazonlinux-2023-x86_64-virtualbox-build.sh @@ -5,7 +5,8 @@ SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") cd "$SCRIPT_RELATIVE_DIR" || exit # set tmp dir for files -AMZDIR="$(pwd)/packer_templates/amz_working_files" +AMZDIR="$(pwd)/builds/build_files/amazonlinux-2023-x86_64-virtualbox" +mkdir -p "$AMZDIR" echo "Cleaning up old files" rm -f "$AMZDIR"/*.iso "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.vdi @@ -26,12 +27,13 @@ if [ ! -f "$AMZDIR"/amazon2023_x86_64.vdi ]; then fi echo "Creating ISO" +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" if [ -x "$(command -v genisoimage)" ]; then - genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$AMZDIR"/../amz_seed_iso/user-data "$AMZDIR"/../amz_seed_iso/meta-data + genisoimage -output "$AMZDIR"/seed.iso -volid cidata -joliet -rock "$SEED_ISO_DIR"/user-data "$SEED_ISO_DIR"/meta-data elif [ -x "$(command -v hdiutil)" ]; then - hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$AMZDIR"/../amz_seed_iso + hdiutil makehybrid -o "$AMZDIR"/seed.iso -hfs -joliet -iso -default-volume-name cidata "$SEED_ISO_DIR"/ elif [ -x "$(command -v mkisofs)" ]; then - mkfsiso9660 -o "$AMZDIR"/seed.iso "$AMZDIR"/../amz_seed_iso + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ else echo "No tool found to create the seed.iso" exit 1 @@ -74,9 +76,9 @@ echo "Deleting the VM" vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" -if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_x86_64.ovf,vbox_checksum=null "$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl; then +if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_x86_64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2 + rm -f "$AMZDIR" else exit 1 fi diff --git a/bento.gemspec b/bento.gemspec index 51343bad0..23dfd1fd0 100644 --- a/bento.gemspec +++ b/bento.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.email = 'oss@chef.io' s.homepage = 'https://github.com/chef/bento/' - s.required_ruby_version = '>= 2.6' + s.required_ruby_version = '>= 3.0' s.add_dependency 'mixlib-shellout', '>= 2.3.2' s.add_dependency 'test-kitchen' diff --git a/builds.yml b/builds.yml index 873b50a90..373d0b86d 100644 --- a/builds.yml +++ b/builds.yml @@ -2,49 +2,50 @@ vagrant_cloud_account: 'bento' default_architectures: - - 'x86_64' - - 'amd64' + - x86_64 + - amd64 public: - - 'amazonlinux-2' - - 'amazonlinux-2023' - - 'almalinux-8' - - 'almalinux-9' - - 'centos-7' - - 'centos-stream-8' - - 'centos-stream-9' - - 'debian-11' - - 'debian-12' - - 'fedora-38' - - 'fedora-39' - - 'freebsd-13' - - 'freebsd-14' - - 'opensuse-leap-15' - - 'oraclelinux-7' - - 'oraclelinux-8' - - 'oraclelinux-9' - - 'rockylinux-8' - - 'rockylinux-9' - - 'ubuntu-20.04' - - 'ubuntu-22.04' - - 'ubuntu-23.10' + - amazonlinux-2 + - amazonlinux-2023 + - almalinux-8 + - almalinux-9 + - centos-7 + - centos-stream-8 + - centos-stream-9 + - debian-11 + - debian-12 + - fedora-39 + - fedora-40 + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 + - rockylinux-8 + - rockylinux-9 + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 -# slug box name: text string from standard box name to match (generally the same) +# slug box name: text string from standard box name to match slugs: - 'almalinux-8': 'almalinux-8' - 'almalinux-9': 'almalinux-9' - 'centos-7': 'centos-7' - 'debian-12': 'debian-12' - 'debian-11': 'debian-11' - 'fedora-latest': 'fedora-39' - 'freebsd-13': 'freebsd-13' - 'freebsd-14': 'freebsd-14' - 'opensuse-leap-15': 'opensuse-leap-15' - 'oracle-7': 'oracle-7' - 'oracle-8': 'oracle-8' - 'oracle-9': 'oracle-9' - 'rockylinux-8': 'rockylinux-8' - 'rockylinux-9': 'rockylinux-9' + - almalinux-8 + - almalinux-9 + - centos-7 + - debian-12 + - debian-11 + - fedora-latest + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oracle-7 + - oracle-8 + - oracle-9 + - rockylinux-8 + - rockylinux-9 + - macos-14 do_not_build: - amazon diff --git a/builds/build_files/.gitkeep b/builds/build_files/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/lib/bento/cli.rb b/lib/bento/cli.rb index e68ab53c8..696dd5c7d 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -85,7 +85,7 @@ def self.parse(args) options.metadata_only = opt end - opts.on('--on-error', '[cleanup|abort|ask|run-cleanup-provisioner] If the build fails do: clean up (default), abort, ask, or run-cleanup-provisioner.') do |opt| + opts.on('--on-error OPT', '[cleanup|abort|ask|run-cleanup-provisioner] If the build fails do: clean up (default), abort, ask, or run-cleanup-provisioner.') do |opt| options.on_error = opt end @@ -109,15 +109,15 @@ def self.parse(args) options.except = opt end - opts.on('-m MIRROR', '--mirror MIRROR', 'Look for isos at MIRROR') do |opt| + opts.on('-M MIRROR', '--mirror MIRROR', 'Look for isos at MIRROR') do |opt| options.mirror = opt end - opts.on('-C cpus', '--cpus CPUS', '# of CPUs per provider') do |opt| + opts.on('-c CPUS', '--cpus CPUS', '# of CPUs per provider') do |opt| options.cpus = opt end - opts.on('-M MEMORY', '--memory MEMORY', 'Memory (MB) per provider') do |opt| + opts.on('-m MEMORY', '--memory MEMORY', 'Memory (MB) per provider') do |opt| options.mem = opt end @@ -125,7 +125,7 @@ def self.parse(args) options.headed = opt end - opts.on('-S', '--single', 'Disable parallelization of Packer builds') do |opt| + opts.on('-s', '--single', 'Disable parallelization of Packer builds') do |opt| options.single = opt end diff --git a/lib/bento/test.rb b/lib/bento/test.rb index 0d733aa15..5bdbc4952 100644 --- a/lib/bento/test.rb +++ b/lib/bento/test.rb @@ -27,7 +27,9 @@ def start end end banner("Testing finished in #{duration(time.real)}.") - unless errors.empty? + if errors.empty? + banner('All tests passed.') + else raise("Failed Tests:\n#{errors.join("\n")}\nexited #{$CHILD_STATUS}") end end diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index 582cc9d70..078902800 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -74,8 +74,8 @@ def upload_box(md_file) # @return [String, NilClass] The slug name or nil # def lookup_slug(name) - builds_yml['slugs'].each_pair do |slug, match_string| - return slug if name.start_with?(match_string) + builds_yml['slugs'].each do |slug| + return slug if name.start_with?(slug) end nil diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 4cb808c14..30e078423 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '4.1.0'.freeze + VERSION = '4.1.1'.freeze end diff --git a/os_pkrvars/fedora/fedora-39-aarch64.pkrvars.hcl b/os_pkrvars/fedora/fedora-39-aarch64.pkrvars.hcl index 3ad5175de..b6e1b86db 100644 --- a/os_pkrvars/fedora/fedora-39-aarch64.pkrvars.hcl +++ b/os_pkrvars/fedora/fedora-39-aarch64.pkrvars.hcl @@ -1,4 +1,3 @@ - os_name = "fedora" os_version = "39" os_arch = "aarch64" @@ -7,4 +6,4 @@ iso_checksum = "sha256:d19dc2a39758155fa53e6fd555d0d173ccc8175b55dea4 parallels_guest_os_type = "fedora-core" vbox_guest_os_type = "Fedora_64" vmware_guest_os_type = "arm-fedora-64" -boot_command = ["<wait><up><up>e<wait><down><down><end> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/fedora/ks.cfg<F10><wait>"] \ No newline at end of file +boot_command = ["<wait><up><up>e<wait><down><down><end> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/fedora/ks.cfg<F10><wait>"] diff --git a/os_pkrvars/fedora/fedora-38-aarch64.pkrvars.hcl b/os_pkrvars/fedora/fedora-40-aarch64.pkrvars.hcl similarity index 59% rename from os_pkrvars/fedora/fedora-38-aarch64.pkrvars.hcl rename to os_pkrvars/fedora/fedora-40-aarch64.pkrvars.hcl index fe5750727..24c62af3a 100644 --- a/os_pkrvars/fedora/fedora-38-aarch64.pkrvars.hcl +++ b/os_pkrvars/fedora/fedora-40-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "fedora" -os_version = "38" +os_version = "40" os_arch = "aarch64" -iso_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/aarch64/iso/Fedora-Server-dvd-aarch64-38-1.6.iso" -iso_checksum = "sha256:0b40485d74fc60c0a78f071396aba78fafb2f8f3b1ab4cbc3388bda82f764f9b" +iso_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/40/Server/aarch64/iso/Fedora-Server-dvd-aarch64-40-1.14.iso" +iso_checksum = "file:https://download.fedoraproject.org/pub/fedora/linux/releases/40/Server/aarch64/iso/Fedora-Server-40-1.14-aarch64-CHECKSUM" parallels_guest_os_type = "fedora-core" vbox_guest_os_type = "Fedora_64" vmware_guest_os_type = "arm-fedora-64" diff --git a/os_pkrvars/fedora/fedora-38-x86_64.pkrvars.hcl b/os_pkrvars/fedora/fedora-40-x86_64.pkrvars.hcl similarity index 59% rename from os_pkrvars/fedora/fedora-38-x86_64.pkrvars.hcl rename to os_pkrvars/fedora/fedora-40-x86_64.pkrvars.hcl index 2ae962cb3..18aec053c 100644 --- a/os_pkrvars/fedora/fedora-38-x86_64.pkrvars.hcl +++ b/os_pkrvars/fedora/fedora-40-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "fedora" -os_version = "38" +os_version = "40" os_arch = "x86_64" -iso_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Server/x86_64/iso/Fedora-Server-dvd-x86_64-38-1.6.iso" -iso_checksum = "sha256:66b52d7cb39386644cd740930b0bef0a5a2f2be569328fef6b1f9b3679fdc54d" +iso_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/40/Server/x86_64/iso/Fedora-Server-dvd-x86_64-40-1.14.iso" +iso_checksum = "file:https://download.fedoraproject.org/pub/fedora/linux/releases/40/Server/x86_64/iso/Fedora-Server-40-1.14-x86_64-CHECKSUM" parallels_guest_os_type = "fedora-core" vbox_guest_os_type = "Fedora_64" vmware_guest_os_type = "fedora-64" diff --git a/os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl b/os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl new file mode 100644 index 000000000..d488f91bc --- /dev/null +++ b/os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl @@ -0,0 +1,73 @@ +os_name = "macos" +os_version = "14.4.1" +os_arch = "aarch64" +parallels_ipsw_url = "https://updates.cdn-apple.com/2024WinterFCS/fullrestores/052-77579/4569734E-120C-4F31-AD08-FC1FF825D059/UniversalMac_14.4.1_23E224_Restore.ipsw" +parallels_ipsw_checksum = "78b39816521a6eeaf29221a4e59e83dae98ef5f9e8e718b846f8faab540a48c1" +sources_enabled = ["source.parallels-ipsw.vm"] +boot_command = [ + # hello, hola, bonjour, etc. + "<wait><spacebar><wait5s>", + # Select Language English (US) + "<enter><wait10s>", + # Select Your Country and Region + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Written and Spoken Languages + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Accessibility + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Data & Privacy + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Migration Assistant + "<tab><wait><tab><wait><tab><wait><spacebar><wait5s>", + # Sign In with Your Apple ID + "<leftShiftOn><tab><wait><tab><leftShiftOff><wait><spacebar><wait5s>", + # Are you sure you want to skip signing in with an Apple ID? + "<tab><wait><spacebar><wait5s>", + # Terms and Conditions + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # I have read and agree to the macOS Software License Agreement + "<tab><wait><spacebar><wait5s>", + # Create a Computer Account + "vagrant<wait><tab><wait><tab><wait>vagrant<wait><tab><wait>vagrant<wait><tab><wait><tab><wait><tab><wait><spacebar><wait1m>", + # Enable Location Services + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Are you sure you don't want to use Location Services? + "<tab><wait><spacebar><wait5s>", + # Select Your Time Zone + "<tab><wait>UTC<wait><enter><wait><leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Analytics + "<tab><wait><spacebar><wait><leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Screen Time + "<tab><wait><spacebar><wait5s>", + # Siri + "<tab><wait><spacebar><wait><leftShiftOn><tab><leftShiftOff><wait><spacebar><wait5s>", + # Choose Your Look + "<leftShiftOn><tab><leftShiftOff><wait><spacebar><wait30s>", + # Enable keyboard navigation + "<leftCtrlOn><f7><leftCtrlOff><wait2s>", + # Open System Settings + "<leftSuperOn><spacebar><leftSuperOff><wait>System<spacebar>Settings<wait><enter><wait5s>", + # Enable Remote Management + "<up><wait><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait><spacebar><wait5s>", + "<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait><spacebar><wait5s>", + # Enable Remote Login + "<tab><tab><wait><spacebar><wait5s>", + # Close System Preferences + "<leftSuperOn>q<leftSuperOff><wait5s>", + # Disable keyboard navigation + "<leftCtrlOn><f7><leftCtrlOff><wait2s>", + # Open Terminal + "<leftSuperOn><spacebar><leftSuperOff><wait>terminal<wait><enter><wait5s>", + # Add vagrant user to sudoers + "echo 'vagrant' | sudo -S sh -c 'echo \"vagrant ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/vagrant'<wait><enter><wait5s>", + # Set Auto login for vagrant + "sudo sysadminctl -autologin set -userName vagrant -password vagrant<wait><enter><wait5s>", + # Disable screen lock + "sudo sysadminctl -screenLock off -password vagrant<wait><enter><wait5s>", + # Install Parallels Tools + "sudo installer -pkg /Volumes/Parallels\\ Tools/Install.app/Contents/Resources/Install.mpkg -target /<wait><enter><wait5s>", + # Reboot + "sudo shutdown -r +15s<wait><enter><wait5s>", + "exit<enter><wait5s>", + "<leftSuperOn>q<leftSuperOff>" +] diff --git a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl index 754aaebab..fbd8b25d4 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "opensuse-leap" -os_version = "15.5" +os_version = "15.6" os_arch = "aarch64" -iso_url = "http://provo-mirror.opensuse.org/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-aarch64-Media.iso" -iso_checksum = "file:https://provo-mirror.opensuse.org/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-aarch64-Media.iso.sha256" +iso_url = "http://provo-mirror.opensuse.org/distribution/leap/15.6/iso/openSUSE-Leap-15.6-DVD-aarch64-Media.iso" +iso_checksum = "file:https://provo-mirror.opensuse.org/distribution/leap/15.6/iso/openSUSE-Leap-15.6-DVD-aarch64-Media.iso.sha256" parallels_guest_os_type = "opensuse" vbox_guest_os_type = "OpenSUSE_64" vmware_guest_os_type = "arm-other-64" diff --git a/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl index 33202e42f..0daf936b8 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "opensuse-leap" -os_version = "15.5" +os_version = "15.6" os_arch = "x86_64" -iso_url = "http://sfo-korg-mirror.kernel.org/opensuse/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-x86_64-Media.iso" -iso_checksum = "file:http://sfo-korg-mirror.kernel.org/opensuse/distribution/leap/15.5/iso/openSUSE-Leap-15.5-DVD-x86_64-Media.iso.sha256" +iso_url = "http://sfo-korg-mirror.kernel.org/opensuse/distribution/leap/15.6/iso/openSUSE-Leap-15.6-DVD-x86_64-Media.iso" +iso_checksum = "file:http://sfo-korg-mirror.kernel.org/opensuse/distribution/leap/15.6/iso/openSUSE-Leap-15.6-DVD-x86_64-Media.iso.sha256" parallels_guest_os_type = "opensuse" vbox_guest_os_type = "OpenSUSE_64" vmware_guest_os_type = "opensuse-64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl similarity index 69% rename from os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl index 770a5671a..f3625a163 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.10" +os_version = "24.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/mantic/release/ubuntu-23.10-live-server-arm64.iso" -iso_checksum = "file:https://cdimage.ubuntu.com/releases/mantic/release/SHA256SUMS" +iso_url = "https://cdimage.ubuntu.com/releases/noble/release/ubuntu-24.04-live-server-arm64.iso" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/noble/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "arm-ubuntu-64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl similarity index 61% rename from os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl index 43a2a3941..ef40daf4f 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.10" +os_version = "24.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/mantic/ubuntu-23.10-live-server-amd64.iso" -iso_checksum = "file:https://releases.ubuntu.com/mantic/SHA256SUMS" +iso_url = "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso" +iso_checksum = "file:https://releases.ubuntu.com/noble/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "ubuntu-64" diff --git a/packer_templates/amz_seed_iso/README.md b/packer_templates/amz_seed_iso/README.md deleted file mode 100644 index 8ffadfe42..000000000 --- a/packer_templates/amz_seed_iso/README.md +++ /dev/null @@ -1 +0,0 @@ -# Used by Amazon Linux script to convert vdi to packer/vagrant ready ovf diff --git a/packer_templates/amz_working_files/README.md b/packer_templates/amz_working_files/README.md deleted file mode 100644 index 5142457a4..000000000 --- a/packer_templates/amz_working_files/README.md +++ /dev/null @@ -1 +0,0 @@ -# Used to store temp Amazon Linux files for packer build diff --git a/packer_templates/amz_seed_iso/meta-data b/packer_templates/http/amazon/meta-data similarity index 100% rename from packer_templates/amz_seed_iso/meta-data rename to packer_templates/http/amazon/meta-data diff --git a/packer_templates/amz_seed_iso/user-data b/packer_templates/http/amazon/user-data similarity index 100% rename from packer_templates/amz_seed_iso/user-data rename to packer_templates/http/amazon/user-data diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index d9393c65d..5e619f9a5 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,8 +13,10 @@ autoinstall: install-server: yes allow-pw: yes late-commands: - # - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf - - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' + - | + if [ -f /target/etc/netplan/00-installer-config.yaml ]; then + 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' + fi - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 66c797904..6c62ae330 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -6,7 +6,7 @@ packer { source = "github.com/hashicorp/hyperv" } parallels = { - version = ">= 1.0.2" + version = ">= 1.1.6" source = "github.com/parallels/parallels" } qemu = { @@ -49,96 +49,106 @@ locals { "${path.root}/scripts/windows/enable-file-sharing.ps1", "${path.root}/scripts/windows/eject-media.ps1" ] : ( - var.os_name == "solaris" ? [ - "${path.root}/scripts/solaris/update_solaris.sh", - "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/solaris/vmtools_solaris.sh", - "${path.root}/scripts/solaris/minimize_solaris.sh" + var.os_name == "macos" ? [ + "${path.root}/scripts/macos/system-default.sh", + "${path.root}/scripts/macos/system-update.sh", + "${path.root}/scripts/macos/vagrant.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/macos/parallels-tools.sh", + "${path.root}/scripts/macos/vmware-tools.sh", + "${path.root}/scripts/macos/shrink.sh" ] : ( - var.os_name == "freebsd" ? [ - "${path.root}/scripts/freebsd/update_freebsd.sh", - "${path.root}/scripts/freebsd/postinstall_freebsd.sh", - "${path.root}/scripts/freebsd/sudoers_freebsd.sh", + var.os_name == "solaris" ? [ + "${path.root}/scripts/solaris/update_solaris.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/freebsd/vmtools_freebsd.sh", - "${path.root}/scripts/freebsd/cleanup_freebsd.sh", - "${path.root}/scripts/freebsd/minimize_freebsd.sh" + "${path.root}/scripts/solaris/vmtools_solaris.sh", + "${path.root}/scripts/solaris/minimize_solaris.sh" ] : ( - var.os_name == "opensuse-leap" || - var.os_name == "sles" ? [ - "${path.root}/scripts/suse/repositories_suse.sh", - "${path.root}/scripts/suse/update_suse.sh", - "${path.root}/scripts/_common/motd.sh", - "${path.root}/scripts/_common/sshd.sh", + var.os_name == "freebsd" ? [ + "${path.root}/scripts/freebsd/update_freebsd.sh", + "${path.root}/scripts/freebsd/postinstall_freebsd.sh", + "${path.root}/scripts/freebsd/sudoers_freebsd.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/suse/unsupported-modules_suse.sh", - "${path.root}/scripts/_common/virtualbox.sh", - "${path.root}/scripts/_common/vmware_suse.sh", - "${path.root}/scripts/_common/parallels.sh", - "${path.root}/scripts/suse/vagrant_group_suse.sh", - "${path.root}/scripts/suse/sudoers_suse.sh", - "${path.root}/scripts/suse/zypper-locks_suse.sh", - "${path.root}/scripts/suse/remove-dvd-source_suse.sh", - "${path.root}/scripts/suse/cleanup_suse.sh", - "${path.root}/scripts/_common/minimize.sh" + "${path.root}/scripts/freebsd/vmtools_freebsd.sh", + "${path.root}/scripts/freebsd/cleanup_freebsd.sh", + "${path.root}/scripts/freebsd/minimize_freebsd.sh" ] : ( - var.os_name == "ubuntu" || - var.os_name == "debian" ? [ - "${path.root}/scripts/${var.os_name}/update_${var.os_name}.sh", + var.os_name == "opensuse-leap" || + var.os_name == "sles" ? [ + "${path.root}/scripts/suse/repositories_suse.sh", + "${path.root}/scripts/suse/update_suse.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", - "${path.root}/scripts/${var.os_name}/networking_${var.os_name}.sh", - "${path.root}/scripts/${var.os_name}/sudoers_${var.os_name}.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/${var.os_name}/systemd_${var.os_name}.sh", + "${path.root}/scripts/suse/unsupported-modules_suse.sh", "${path.root}/scripts/_common/virtualbox.sh", - "${path.root}/scripts/_common/vmware_debian_ubuntu.sh", + "${path.root}/scripts/_common/vmware_suse.sh", "${path.root}/scripts/_common/parallels.sh", - "${path.root}/scripts/${var.os_name}/hyperv_${var.os_name}.sh", - "${path.root}/scripts/${var.os_name}/cleanup_${var.os_name}.sh", - "${path.root}/scripts/_common/parallels_post_cleanup_debian_ubuntu.sh", + "${path.root}/scripts/suse/vagrant_group_suse.sh", + "${path.root}/scripts/suse/sudoers_suse.sh", + "${path.root}/scripts/suse/zypper-locks_suse.sh", + "${path.root}/scripts/suse/remove-dvd-source_suse.sh", + "${path.root}/scripts/suse/cleanup_suse.sh", "${path.root}/scripts/_common/minimize.sh" ] : ( - var.os_name == "fedora" ? [ - "${path.root}/scripts/fedora/networking_fedora.sh", - "${path.root}/scripts/fedora/update_dnf.sh", - "${path.root}/scripts/fedora/build-tools_fedora.sh", - "${path.root}/scripts/fedora/install-supporting-packages_fedora.sh", + var.os_name == "ubuntu" || + var.os_name == "debian" ? [ + "${path.root}/scripts/${var.os_name}/update_${var.os_name}.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", - "${path.root}/scripts/_common/virtualbox.sh", - "${path.root}/scripts/_common/vmware_fedora.sh", - "${path.root}/scripts/_common/parallels-rhel.sh", + "${path.root}/scripts/${var.os_name}/networking_${var.os_name}.sh", + "${path.root}/scripts/${var.os_name}/sudoers_${var.os_name}.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/fedora/real-tmp_fedora.sh", - "${path.root}/scripts/fedora/cleanup_dnf.sh", + "${path.root}/scripts/${var.os_name}/systemd_${var.os_name}.sh", + "${path.root}/scripts/_common/virtualbox.sh", + "${path.root}/scripts/_common/vmware_debian_ubuntu.sh", + "${path.root}/scripts/_common/parallels.sh", + "${path.root}/scripts/${var.os_name}/hyperv_${var.os_name}.sh", + "${path.root}/scripts/${var.os_name}/cleanup_${var.os_name}.sh", + "${path.root}/scripts/_common/parallels_post_cleanup_debian_ubuntu.sh", "${path.root}/scripts/_common/minimize.sh" ] : ( - "${var.os_name}-${var.os_version}" == "amazonlinux-2" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oracle-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ - "${path.root}/scripts/rhel/update_yum.sh", + var.os_name == "fedora" ? [ + "${path.root}/scripts/fedora/networking_fedora.sh", + "${path.root}/scripts/fedora/update_dnf.sh", + "${path.root}/scripts/fedora/build-tools_fedora.sh", + "${path.root}/scripts/fedora/install-supporting-packages_fedora.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", - "${path.root}/scripts/rhel/networking_rhel7.sh", - "${path.root}/scripts/_common/vagrant.sh", "${path.root}/scripts/_common/virtualbox.sh", - "${path.root}/scripts/_common/vmware_rhel.sh", + "${path.root}/scripts/_common/vmware_fedora.sh", "${path.root}/scripts/_common/parallels-rhel.sh", - "${path.root}/scripts/rhel/cleanup_yum.sh", - "${path.root}/scripts/_common/minimize.sh" - ] : [ - "${path.root}/scripts/rhel/update_dnf.sh", - "${path.root}/scripts/_common/motd.sh", - "${path.root}/scripts/_common/sshd.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/_common/virtualbox.sh", - "${path.root}/scripts/_common/vmware_rhel.sh", - "${path.root}/scripts/_common/parallels-rhel.sh", - "${path.root}/scripts/rhel/cleanup_dnf.sh", + "${path.root}/scripts/fedora/real-tmp_fedora.sh", + "${path.root}/scripts/fedora/cleanup_dnf.sh", "${path.root}/scripts/_common/minimize.sh" - ] + ] : ( + "${var.os_name}-${var.os_version}" == "amazonlinux-2" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oraclelinux-7" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ + "${path.root}/scripts/rhel/update_yum.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/_common/sshd.sh", + "${path.root}/scripts/rhel/networking_rhel7.sh", + "${path.root}/scripts/_common/vagrant.sh", + "${path.root}/scripts/_common/virtualbox.sh", + "${path.root}/scripts/_common/vmware_rhel.sh", + "${path.root}/scripts/_common/parallels-rhel.sh", + "${path.root}/scripts/rhel/cleanup_yum.sh", + "${path.root}/scripts/_common/minimize.sh" + ] : [ + "${path.root}/scripts/rhel/update_dnf.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/_common/sshd.sh", + "${path.root}/scripts/_common/vagrant.sh", + "${path.root}/scripts/_common/virtualbox.sh", + "${path.root}/scripts/_common/vmware_rhel.sh", + "${path.root}/scripts/_common/parallels-rhel.sh", + "${path.root}/scripts/rhel/cleanup_dnf.sh", + "${path.root}/scripts/_common/minimize.sh" + ] + ) ) ) ) diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 2cb1a1d21..1b0e9367c 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -20,11 +20,18 @@ locals { var.is_windows ? "attach" : "upload" ) : var.parallels_tools_mode parallels_prlctl = var.parallels_prlctl == null ? ( - var.is_windows ? [ - ["set", "{{ .Name }}", "--efi-boot", "off"], - ["set", "{{ .Name }}", "--efi-secure-boot", "off"], - ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../builds/iso/unattended.iso", "--connect"], - ] : null + var.is_windows ? ( + var.os_arch == "x86_64" ? [ + ["set", "{{ .Name }}", "--efi-boot", "off"] + ] : [ + ["set", "{{ .Name }}", "--efi-boot", "off"], + ["set", "{{ .Name }}", "--efi-secure-boot", "off"], + ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../builds/iso/unattended.iso", "--connect"], + ] + ) : [ + ["set", "{{ .Name }}", "--3d-accelerate", "off"], + ["set", "{{ .Name }}", "--videosize", "16"] + ] ) : var.parallels_prlctl # qemu @@ -36,7 +43,7 @@ locals { var.is_windows ? [ ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], ["-drive", "file=${var.iso_url},media=cdrom,index=2"], - ["-drive", "file=${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], + ["-drive", "file=${path.root}/../builds/build_files/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [ ["-boot", "strict=off"] @@ -65,7 +72,9 @@ locals { # Source block common default_boot_wait = var.default_boot_wait == null ? ( - var.is_windows ? "60s" : "5s" + var.is_windows ? "60s" : ( + var.os_name == "macos" ? "8m" : "5s" + ) ) : var.default_boot_wait cd_files = var.cd_files == null ? ( var.is_windows ? ( @@ -92,12 +101,16 @@ locals { ] ) : null ) : var.floppy_files - http_directory = var.http_directory == null ? "${path.root}/http" : var.http_directory - memory = var.memory == null ? (var.is_windows ? 4096 : 2048) : var.memory - output_directory = var.output_directory == null ? "${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}" : var.output_directory + http_directory = var.http_directory == null ? "${path.root}/http" : var.http_directory + memory = var.memory == null ? ( + var.is_windows || var.os_name == "macos" ? 4096 : 2048 + ) : var.memory + output_directory = var.output_directory == null ? "${path.root}/../builds/build_files/packer-${var.os_name}-${var.os_version}-${var.os_arch}" : var.output_directory shutdown_command = var.shutdown_command == null ? ( var.is_windows ? "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"" : ( - var.os_name == "freebsd" ? "echo 'vagrant' | su -m root -c 'shutdown -p now'" : "echo 'vagrant' | sudo -S /sbin/halt -h -p" + var.os_name == "macos" ? "echo 'vagrant' | sudo -S shutdown -h now" : ( + var.os_name == "freebsd" ? "echo 'vagrant' | su -m root -c 'shutdown -p now'" : "echo 'vagrant' | sudo -S /sbin/halt -h -p" + ) ) ) : var.shutdown_command vm_name = var.vm_name == null ? ( @@ -138,6 +151,32 @@ source "hyperv-iso" "vm" { winrm_username = var.winrm_username vm_name = local.vm_name } +source "parallels-ipsw" "vm" { + # Parallels specific options + host_interfaces = var.parallels_host_interfaces + ipsw_url = var.parallels_ipsw_url + ipsw_checksum = var.parallels_ipsw_checksum + prlctl = local.parallels_prlctl + prlctl_post = var.parallels_prlctl_post + prlctl_version_file = var.parallels_prlctl_version_file + # Source block common options + boot_command = var.boot_command + boot_wait = var.parallels_boot_wait == null ? local.default_boot_wait : var.parallels_boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + http_directory = local.http_directory + http_content = var.http_content + memory = local.memory + output_directory = "${local.output_directory}-parallels" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + vm_name = local.vm_name +} source "parallels-iso" "vm" { # Parallels specific options guest_os_type = var.parallels_guest_os_type diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 16ef20dd8..5b0c027fd 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -74,6 +74,33 @@ variable "hyperv_switch_name" { default = "bento" } +# parallels-ipsw +variable "parallels_host_interfaces" { + type = list(string) + default = null + description = "Host interfaces to use for the parallels-ipsw builder" +} +variable "parallels_ipsw_url" { + type = string + default = null + description = "URL to download the IPSW file" +} +variable "parallels_ipsw_checksum" { + type = string + default = null + description = "Checksum of the IPSW file" +} +variable "parallels_prlctl_post" { + type = list(list(string)) + default = null + description = "Commands to run after the VM is created" +} +variable "http_content" { + type = map(string) + default = null + description = "Content to be served by the http server" +} + # parallels-iso variable "parallels_boot_wait" { type = string diff --git a/packer_templates/scripts/_common/motd.sh b/packer_templates/scripts/_common/motd.sh index 2a82b9b70..e3eb4334d 100644 --- a/packer_templates/scripts/_common/motd.sh +++ b/packer_templates/scripts/_common/motd.sh @@ -2,7 +2,9 @@ bento=' This system is built by the Bento project by Chef Software -More information can be found at https://github.com/chef/bento' +More information can be found at https://github.com/chef/bento + +Use of this system is acceptance of the OS vendor EULA and License Agreements.' if [ -d /etc/update-motd.d ]; then MOTD_CONFIG='/etc/update-motd.d/99-bento' @@ -17,5 +19,8 @@ BENTO chmod 0755 "$MOTD_CONFIG" else + touch /etc/motd + chmod 0777 /etc/motd echo "$bento" >> /etc/motd + chmod 0755 /etc/motd fi diff --git a/packer_templates/scripts/_common/vagrant.sh b/packer_templates/scripts/_common/vagrant.sh index 9dfbc090e..37e74bf52 100644 --- a/packer_templates/scripts/_common/vagrant.sh +++ b/packer_templates/scripts/_common/vagrant.sh @@ -5,10 +5,10 @@ HOME_DIR="${HOME_DIR:-/home/vagrant}"; pubkey_url="https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub"; mkdir -p "$HOME_DIR"/.ssh; -if command -v wget >/dev/null 2>&1; then - wget --no-check-certificate "$pubkey_url" -O "$HOME_DIR"/.ssh/authorized_keys; -elif command -v curl >/dev/null 2>&1; then +if command -v curl >/dev/null 2>&1; then curl --insecure --location "$pubkey_url" > "$HOME_DIR"/.ssh/authorized_keys; +elif command -v wget >/dev/null 2>&1; then + wget --no-check-certificate "$pubkey_url" -O "$HOME_DIR"/.ssh/authorized_keys; elif command -v fetch >/dev/null 2>&1; then fetch -am -o "$HOME_DIR"/.ssh/authorized_keys "$pubkey_url"; else diff --git a/packer_templates/scripts/macos/parallels-tools.sh b/packer_templates/scripts/macos/parallels-tools.sh new file mode 100644 index 000000000..4eea703a6 --- /dev/null +++ b/packer_templates/scripts/macos/parallels-tools.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ -e .PACKER_BUILDER_TYPE ] || echo "$PACKER_BUILDER_TYPE" | grep -q '^parallels'; then + echo "Installing Parallels Tools..." + installer -pkg /Volumes/Parallels\ Tools/Install.app/Contents/Resources/Install.mpkg -target / + + # This usually works but gives a failed to eject error + hdiutil detach /Volumes/Parallels\ Tools || echo "exit code $? is suppressed"; + + # Reboot is needed for tools install + reboot +fi diff --git a/packer_templates/scripts/macos/shrink.sh b/packer_templates/scripts/macos/shrink.sh new file mode 100644 index 000000000..14301079a --- /dev/null +++ b/packer_templates/scripts/macos/shrink.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# 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 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. + +echo 'Disable spotlight...' +mdutil -a -i off + +echo 'Turn off hibernation and get rid of the sleepimage' +pmset hibernatemode 0 +rm -f /var/vm/sleepimage + +echo 'Remove Screensaver video files' +rm -rf /Library/Application Support/com.apple.idleassetsd/Customer/* || echo "rm screensaver videos exit code $? is suppressed" + +echo 'Remove logs' +rm -rf /Library/Logs/* || echo "rm library logs exit code $? is suppressed" + +echo 'Remove swap file' +rm -rf /System/Volumes/VM/swapfile* || echo "rm swapfile exit code $? is suppressed" + +if [ -e .vmfusion_version ] || [[ "$PACKER_BUILDER_TYPE" == vmware* ]]; then + echo 'VMware Fusion specific items' + echo 'Shrink the disk' + /Library/Application\ Support/VMware\ Tools/vmware-tools-cli disk shrink / +fi diff --git a/packer_templates/scripts/macos/system-default.sh b/packer_templates/scripts/macos/system-default.sh new file mode 100644 index 000000000..36a56e923 --- /dev/null +++ b/packer_templates/scripts/macos/system-default.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# 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 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. + +PlistBuddy="/usr/libexec/PlistBuddy" + +echo 'Disable loginwindow screensaver to save CPU cycles' +$PlistBuddy -c 'Add :loginWindowIdleTime integer 0' "/Library/Preferences/com.apple.screensaver.plist" +defaults -currentHost write com.apple.screensaver idleTime 0 + +echo 'Prevent the VM from sleeping' +systemsetup -setdisplaysleep Off 2>/dev/null +systemsetup -setsleep Off 2>/dev/null +systemsetup -setcomputersleep Off 2>/dev/null + +echo "Enabling automatic GUI login for the 'Vagrant' user." +sysadminctl -autologin set -userName vagrant -password vagrant + +echo 'Disable screen lock' +sysadminctl -screenLock off -password vagrant diff --git a/packer_templates/scripts/macos/system-update.sh b/packer_templates/scripts/macos/system-update.sh new file mode 100644 index 000000000..b6112915d --- /dev/null +++ b/packer_templates/scripts/macos/system-update.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo "Downloading and installing system updates..." +softwareupdate -i -a -R + +echo 'Disable automatic updates' +# TOGGLE ALL OFF (auto checking is on to show other prefs are toggled off) +# before setting values quit system preferences & stop software update - stops defaults cache breaking 'AutomaticCheckEnabled' +osascript -e "tell application \"System Preferences\" to quit" +softwareupdate --schedule off +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool No +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool NO +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool NO +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool NO +defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdateRestartRequired -bool NO +defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool NO diff --git a/packer_templates/scripts/macos/vagrant.sh b/packer_templates/scripts/macos/vagrant.sh new file mode 100644 index 000000000..108c289d5 --- /dev/null +++ b/packer_templates/scripts/macos/vagrant.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# 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 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. + +date > /etc/box_build_time +OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $1}') + +# Set computer/hostname +COMPNAME=macos-${OSX_VERS} +scutil --set ComputerName "${COMPNAME}" +scutil --set HostName "${COMPNAME}".vagrantup.com + +echo "Installing vagrant keys for vagrant user" +mkdir "/Users/vagrant/.ssh" +chmod 700 "/Users/vagrant/.ssh" +curl -L 'https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub' > "/Users/vagrant/.ssh/authorized_keys" +chmod 600 "/Users/vagrant/.ssh/authorized_keys" +chown -R "vagrant" "/Users/vagrant/.ssh" diff --git a/packer_templates/scripts/macos/vmware-tools.sh b/packer_templates/scripts/macos/vmware-tools.sh new file mode 100644 index 000000000..08218ba56 --- /dev/null +++ b/packer_templates/scripts/macos/vmware-tools.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# 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 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. + +echo 'VMware Fusion specific items' +if [ -e .vmfusion_version ] || echo "$PACKER_BUILDER_TYPE" | grep -q '^vmware'; then + # Globbing here: VMware Fusion >= 8.5.4 includes a second + # 'darwinPre15.iso' for any OS X guests pre-10.11 + TOOLS_PATH=$(find "/Users/vagrant/" -name '*darwin*.iso' -print) + if [ ! -e "$TOOLS_PATH" ]; then + echo "Couldn't locate uploaded tools iso at $TOOLS_PATH!" + exit 1 + fi + + TMPMOUNT=$(/usr/bin/mktemp -d /tmp/vmware-tools.XXXX) + hdiutil attach "$TOOLS_PATH" -mountpoint "$TMPMOUNT" + + INSTALLER_PKG="$TMPMOUNT/Install VMware Tools.app/Contents/Resources/VMware Tools.pkg" + if [ ! -e "$INSTALLER_PKG" ]; then + echo "Couldn't locate VMware installer pkg at $INSTALLER_PKG!" + exit 1 + fi + + echo "Installing VMware tools.." + installer -pkg "$TMPMOUNT/Install VMware Tools.app/Contents/Resources/VMware Tools.pkg" -target / + + # This usually fails + hdiutil detach "$TMPMOUNT" || echo "exit code $? is suppressed"; + rm -rf "$TMPMOUNT" + rm -f "$TOOLS_PATH" + + # Point Linux shared folder root to that used by OS X guests, + # useful for the Hashicorp vmware_fusion Vagrant provider plugin + mkdir /mnt + ln -sf /Volumes/VMware\ Shared\ Folders /mnt/hgfs +fi From 036e8d1cd3e71c2086adbc1e9207fdab49d06d85 Mon Sep 17 00:00:00 2001 From: Daniel Widerin <daniel@widerin.net> Date: Thu, 23 May 2024 16:35:23 +0200 Subject: [PATCH 17/28] Fix qemu_format="raw" causing wrong format for qemu (#1568) --- packer_templates/pkr-sources.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 1b0e9367c..58e48758a 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -43,7 +43,7 @@ locals { var.is_windows ? [ ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], ["-drive", "file=${var.iso_url},media=cdrom,index=2"], - ["-drive", "file=${path.root}/../builds/build_files/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], + ["-drive", "file=${path.root}/../builds/build_files/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=${var.qemu_format},index=1"], ] : ( var.os_arch == "aarch64" ? [ ["-boot", "strict=off"] From 2b80f1c13b8cf50a6b98341062d36a3a900c10a9 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Thu, 23 May 2024 11:56:02 -0500 Subject: [PATCH 18/28] setup workflow for hosted runners (#1547) * setup workflow for hosted runners --- .github/workflows/ci-build.yml | 4 + .github/workflows/pkr-bld-amazonlinux-x64.yml | 6 +- .github/workflows/pkr-bld-hyperv-x64.yml | 48 +++--- .github/workflows/pkr-bld-parallels-arm64.yml | 5 +- .github/workflows/pkr-bld-parallels-x64.yml | 5 +- .github/workflows/pkr-bld-qemu-arm64.yml | 11 +- .github/workflows/pkr-bld-qemu-x64.yml | 10 +- .../workflows/pkr-bld-virtualbox-arm64.yml | 14 +- .github/workflows/pkr-bld-virtualbox-x64.yml | 15 +- .github/workflows/pkr-bld-vmware-arm64.yml | 147 +++++++++++++++--- .github/workflows/pkr-bld-vmware-x64.yml | 146 +++++++++++++++-- .github/workflows/test-pkr-bld-parallels.yml | 145 +++++++++++++++++ CHANGELOG.md | 42 +++-- README.md | 1 + amazonlinux-2-x86_64-virtualbox-build.sh | 2 +- amazonlinux-2023-aarch64-virtualbox-build.sh | 2 +- amazonlinux-2023-x86_64-virtualbox-build.sh | 2 +- bento.gemspec | 2 - builds.yml | 8 +- lib/bento/runner.rb | 2 +- lib/bento/upload.rb | 9 ++ lib/bento/version.rb | 2 +- .../almalinux/almalinux-9-aarch64.pkrvars.hcl | 4 +- .../almalinux/almalinux-9-x86_64.pkrvars.hcl | 4 +- .../centos/centos-7-aarch64.pkrvars.hcl | 9 -- os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl | 9 -- .../centos-stream-8-aarch64.pkrvars.hcl | 9 -- .../centos/centos-stream-8-x86_64.pkrvars.hcl | 9 -- .../oraclelinux-7-aarch64.pkrvars.hcl | 9 -- .../oraclelinux-7-x86_64.pkrvars.hcl | 9 -- .../oraclelinux-9-aarch64.pkrvars.hcl | 6 +- .../oraclelinux-9-x86_64.pkrvars.hcl | 6 +- os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl | 9 -- os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl | 9 -- os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl | 2 +- .../rockylinux-9-aarch64.pkrvars.hcl | 4 +- .../rockylinux-9-x86_64.pkrvars.hcl | 4 +- packer_templates/http/ubuntu/user-data | 9 +- packer_templates/pkr-builder.pkr.hcl | 5 +- packer_templates/pkr-sources.pkr.hcl | 31 ++-- packer_templates/pkr-variables.pkr.hcl | 18 ++- 42 files changed, 567 insertions(+), 228 deletions(-) create mode 100644 .github/workflows/test-pkr-bld-parallels.yml delete mode 100644 os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/centos/centos-stream-8-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl delete mode 100644 os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4caf23c95..783a4d1ed 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -95,3 +95,7 @@ jobs: allowed-failures: allowed-skips: ${{ toJSON(needs) }} jobs: ${{ toJSON(needs) }} + +# pkr-bld-parallels-test: +# uses: ./.github/workflows/test-pkr-bld-parallels.yml +# secrets: inherit diff --git a/.github/workflows/pkr-bld-amazonlinux-x64.yml b/.github/workflows/pkr-bld-amazonlinux-x64.yml index e12c54d14..111cbeb33 100644 --- a/.github/workflows/pkr-bld-amazonlinux-x64.yml +++ b/.github/workflows/pkr-bld-amazonlinux-x64.yml @@ -4,7 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: x86_64: @@ -28,6 +28,8 @@ jobs: vagrant --version - name: Install Chef uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 - name: Setup Packer uses: hashicorp/setup-packer@main with: @@ -46,6 +48,7 @@ jobs: sudo chmod -R 777 /mnt/builds sudo ln -s /mnt/builds ./ eval "$(chef shell-init bash)" + export LOGNAME=$USER ./${{ matrix.os }}-x86_64-virtualbox-build.sh ls -alh builds cat builds/${{ matrix.os }}*-x86_64._metadata.json @@ -61,4 +64,5 @@ jobs: - name: Bento Test run: | eval "$(chef shell-init bash)" + export LOGNAME=$USER bento test diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index 7002d7f76..4c2121d7c 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -4,28 +4,25 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, hyperv] + runs-on: windows-latest strategy: fail-fast: false matrix: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -38,20 +35,29 @@ jobs: steps: - name: Checkout uses: actions/checkout@main -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Bento build - run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Remove VM in case of canceled job - if: cancelled() + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64 - Stop-VM -Force ${{ matrix.os }}*-amd64 - sleep 1 - Remove-VM -Force ${{ matrix.os }}*-amd64 - sleep 2 + chef shell-init powershell + gem build bento.gemspec + gem install bento-*.gem + - name: Create VM Switch for Hyper-V + shell: pwsh + run: | + Get-PsDrive -PsProvider FileSystem + pwd + New-VMSwitch -Name "bento" -NetAdapterName "Ethernet" -AllowManagementOS $true + - name: Packer Init + run: packer init -upgrade packer_templates + - name: Packer build + run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var 'sources_enabled=["hyperv-iso.vm"]' -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - name: Upload build artifact uses: actions/upload-artifact@main with: @@ -61,3 +67,7 @@ jobs: builds/*.json retention-days: 10 compression-level: 0 # no compression + - name: Bento Test + run: | + chef shell-init powershell + bento test diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 6934da07f..be31c1e6c 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -4,7 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: aarch64: @@ -15,8 +15,6 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index 9af99ba4c..a2836e92b 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -4,7 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: x86_64: @@ -15,8 +15,6 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index 944f8c95f..0213abdd6 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -8,15 +8,13 @@ env: jobs: aarch64: - runs-on: macos-14 + runs-on: macos-latest strategy: fail-fast: false matrix: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -40,13 +37,17 @@ jobs: uses: actions/checkout@main - name: Install Vagrant QEMU run: | - brew install qemu libvirt brew tap hashicorp/tap + brew update + brew install qemu + brew install libvirt brew install --cask hashicorp/tap/hashicorp-vagrant brew services start libvirt vagrant plugin install vagrant-libvirt vagrant-qemu - name: Install Chef uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 - name: Setup Packer uses: hashicorp/setup-packer@main with: diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index 5bb0eee9b..729343d38 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -4,7 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: x86_64: @@ -15,8 +15,6 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -38,14 +35,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: Install Vagrant and kvm + - name: Install Vagrant QEMU run: | wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt-get update sudo apt-get install -y software-properties-common vagrant qemu-kvm libvirt-daemon-system virtinst libvirt-clients bridge-utils qemu-utils libvirt-dev vagrant plugin install vagrant-libvirt vagrant-qemu - vagrant --version - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules @@ -58,6 +54,8 @@ jobs: sudo systemctl status libvirtd - name: Install Chef uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 - name: Setup Packer uses: hashicorp/setup-packer@main with: diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index d649e759c..f1e9450d9 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -4,19 +4,17 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: aarch64: - runs-on: macos-14 + runs-on: macos-latest strategy: fail-fast: false matrix: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -41,12 +38,13 @@ jobs: - name: Install Vagrant Virtualbox run: | brew tap hashicorp/tap + brew update brew install --cask hashicorp/tap/hashicorp-vagrant - wget -q https://www.virtualbox.org/download/testcase/VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg - hdiutil attach VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg - sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target / + brew install --cask virtualbox@beta - name: Install Chef uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 - name: Setup Packer uses: hashicorp/setup-packer@main with: diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 2aafba2ae..e1d52132a 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -3,8 +3,8 @@ on: workflow_call: env: - PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PACKER_LOG: 1 jobs: x86_64: @@ -15,8 +15,6 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -38,7 +35,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: Install Vagrant and VirtualBox + - name: Install Vagrant VirtualBox run: | wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg @@ -46,10 +43,10 @@ jobs: echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list sudo apt-get update sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 - VBoxManage --version - vagrant --version - name: Install Chef uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 - name: Setup Packer uses: hashicorp/setup-packer@main with: @@ -66,6 +63,7 @@ jobs: sudo chmod -R 777 /mnt/builds sudo ln -s /mnt/builds ./ eval "$(chef shell-init bash)" + export LOGNAME=$USER bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" ls -alh builds/ cat builds/${{ matrix.os }}*-x86_64._metadata.json @@ -81,4 +79,5 @@ jobs: - name: Bento Test run: | eval "$(chef shell-init bash)" + export LOGNAME=$USER bento test diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index 567e56ccd..e4f0a66fa 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -4,19 +4,17 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, vmware-fusion] + runs-on: macos-latest strategy: fail-fast: false matrix: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -38,25 +35,139 @@ jobs: steps: - name: Checkout uses: actions/checkout@main -# - name: Setup Packer -# if: steps.verify-changed-files.outputs.files_changed == 'true' -# uses: hashicorp/setup-packer@main -# with: -# version: latest + - name: Install Vagrant VMware-fusion + run: | + brew tap hashicorp/tap + brew update + brew install --cask hashicorp/tap/hashicorp-vagrant + brew install --cask vmware-fusion + brew install --cask vagrant-vmware-utility + vagrant plugin install vagrant-vmware-desktop + sudo mkdir -p /Library/Preferences/VMware\ Fusion/vmnet8 + NETWORKING_CONF="/Library/Preferences/VMware Fusion/networking" + DHCPD_CONF="/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf" + NAT_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.conf" + NAT_MAC_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.mac" + DHCPD_CONFIG=' + # Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8. + + ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" ##### + # Modification Instructions: This section of the configuration file contains + # information generated by the configuration program. Do not modify this + # section. + + # Written at: 05/20/2024 11:50:44 + allow unknown-clients; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours + + subnet 172.16.38.0 netmask 255.255.255.0 { + range 172.16.38.128 172.16.38.254; + option broadcast-address 172.16.38.255; + option domain-name-servers 172.16.38.2; + option domain-name localdomain; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours + option netbios-name-servers 172.16.38.2; + option routers 172.16.38.2; + } + host vmnet8 { + hardware ethernet 00:50:56:C0:00:08; + fixed-address 172.16.38.1; + option domain-name-servers 0.0.0.0; + option domain-name ""; + option routers 0.0.0.0; + } + ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### + ' + NAT_CONFIG=" + # VMware NAT configuration file + [host] + # Use MacOS network virtualization API + useMacosVmnetVirtApi = 1 + # NAT gateway address + ip = 172.16.38.2 + netmask = 255.255.255.0 + # VMnet device if not specified on command line + device = vmnet8 + # Allow PORT/EPRT FTP commands (they need incoming TCP stream ...) + activeFTP = 1 + # Allows the source to have any OUI. Turn this on if you change the OUI in the MAC address of your virtual machines. + allowAnyOUI = 1 + # VMnet host IP address + hostIp = 172.16.38.1 + # Controls if (TCP) connections should be reset when the adapter they are bound to goes down + resetConnectionOnLinkDown = 1 + # Controls if (TCP) connection should be reset when guest packet's destination is NAT's IP address + resetConnectionOnDestLocalHost = 1 + # Controls if enable nat ipv6 + natIp6Enable = 0 + # Controls if enable nat ipv6 + natIp6Prefix = fd15:4ba5:5a2b:1008::/64 + [tcp] + # Value of timeout in TCP TIME_WAIT state, in seconds + timeWaitTimeout = 30 + [udp] + # Timeout in seconds. Dynamically-created UDP mappings will purged if idle for this duration of time 0 = no timeout, default = 60; real value might be up to 100% longer + timeout = 60 + [netbios] + # Timeout for NBNS queries. + nbnsTimeout = 2 + # Number of retries for each NBNS query. + nbnsRetries = 3 + # Timeout for NBDS queries. + nbdsTimeout = 3 + [incomingtcp] + # Use these with care - anyone can enter into your VM through these... + # The format and example are as follows: + #<external port number> = <VM's IP address>:<VM's port number> + #8080 = 172.16.3.128:80 + [incomingudp] + # UDP port forwarding example + #6000 = 172.16.3.0:6001 + " + NAT_MAC_CONFIG="00:50:56:F2:C7:28" + NETWORKING_CONFIG=" + VERSION=1,0 + answer VNET_1_DHCP yes + answer VNET_1_DHCP_CFG_HASH 97D56988968565698E051056ADEDEEACF00F5981 + answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 + answer VNET_1_HOSTONLY_SUBNET 172.16.252.0 + answer VNET_1_HOSTONLY_UUID 74A7B7F5-AB8E-41CF-9E0F-595F9C9FA1C5 + answer VNET_1_VIRTUAL_ADAPTER yes + answer VNET_8_DHCP yes + answer VNET_8_DHCP_CFG_HASH 2040265D0F7053A921FB3F6EDE944490D9E687D6 + answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 + answer VNET_8_HOSTONLY_SUBNET 172.16.38.0 + answer VNET_8_HOSTONLY_UUID 3CBAC6B3-6A71-4182-8BC6-849058A947B8 + answer VNET_8_NAT yes + answer VNET_8_VIRTUAL_ADAPTER yes + " + # Write the network configuration to the file + echo "$NETWORKING_CONFIG" | sudo tee "$NETWORKING_CONF" > /dev/null + echo "$DHCPD_CONFIG" | sudo tee "$DHCPD_CONF" > /dev/null + echo "$NAT_CONFIG" | sudo tee "$NAT_CONF" > /dev/null + echo "$NAT_MAC_CONFIG" | sudo tee "$NAT_MAC_CONF" > /dev/null + echo "VMware Fusion networking configuration updated." + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" ls -alh builds/ cat builds/${{ matrix.os }}*-aarch64._metadata.json - - name: Remove VM in case of canceled job - if: cancelled() - run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64 - vmrun -T fusion stop builds/packer-${{ matrix.os }}*-x86_64-vmware/${{ matrix.os }}*-aarch64.vmx hard 2> /dev/null - sleep 1 - vmrun -T fusion deleteVM builds/packer-${{ matrix.os }}*-x86_64-vmware/${{ matrix.os }}*-aarch64.vmx 2> /dev/null - sleep 2 - name: Upload build artifact uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 71a95f361..97dc27ff3 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -4,19 +4,17 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PACKER_LOG: "1" + # PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, vmware-fusion] + runs-on: macos-13 strategy: fail-fast: false matrix: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -25,7 +23,6 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -38,24 +35,139 @@ jobs: steps: - name: Checkout uses: actions/checkout@main -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest + - name: Install Vagrant VMware-fusion + run: | + brew tap hashicorp/tap + brew update + brew install --cask hashicorp/tap/hashicorp-vagrant + brew install --cask vmware-fusion + brew install --cask vagrant-vmware-utility + vagrant plugin install vagrant-vmware-desktop + sudo mkdir -p /Library/Preferences/VMware\ Fusion/vmnet8 + NETWORKING_CONF="/Library/Preferences/VMware Fusion/networking" + DHCPD_CONF="/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf" + NAT_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.conf" + NAT_MAC_CONF="/Library/Preferences/VMware Fusion/vmnet8/nat.mac" + DHCPD_CONFIG=' + # Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8. + + ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" ##### + # Modification Instructions: This section of the configuration file contains + # information generated by the configuration program. Do not modify this + # section. + + # Written at: 05/20/2024 11:50:44 + allow unknown-clients; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours + + subnet 172.16.38.0 netmask 255.255.255.0 { + range 172.16.38.128 172.16.38.254; + option broadcast-address 172.16.38.255; + option domain-name-servers 172.16.38.2; + option domain-name localdomain; + default-lease-time 1800; # default is 30 minutes + max-lease-time 7200; # default is 2 hours + option netbios-name-servers 172.16.38.2; + option routers 172.16.38.2; + } + host vmnet8 { + hardware ethernet 00:50:56:C0:00:08; + fixed-address 172.16.38.1; + option domain-name-servers 0.0.0.0; + option domain-name ""; + option routers 0.0.0.0; + } + ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### + ' + NAT_CONFIG=" + # VMware NAT configuration file + [host] + # Use MacOS network virtualization API + useMacosVmnetVirtApi = 1 + # NAT gateway address + ip = 172.16.38.2 + netmask = 255.255.255.0 + # VMnet device if not specified on command line + device = vmnet8 + # Allow PORT/EPRT FTP commands (they need incoming TCP stream ...) + activeFTP = 1 + # Allows the source to have any OUI. Turn this on if you change the OUI in the MAC address of your virtual machines. + allowAnyOUI = 1 + # VMnet host IP address + hostIp = 172.16.38.1 + # Controls if (TCP) connections should be reset when the adapter they are bound to goes down + resetConnectionOnLinkDown = 1 + # Controls if (TCP) connection should be reset when guest packet's destination is NAT's IP address + resetConnectionOnDestLocalHost = 1 + # Controls if enable nat ipv6 + natIp6Enable = 0 + # Controls if enable nat ipv6 + natIp6Prefix = fd15:4ba5:5a2b:1008::/64 + [tcp] + # Value of timeout in TCP TIME_WAIT state, in seconds + timeWaitTimeout = 30 + [udp] + # Timeout in seconds. Dynamically-created UDP mappings will purged if idle for this duration of time 0 = no timeout, default = 60; real value might be up to 100% longer + timeout = 60 + [netbios] + # Timeout for NBNS queries. + nbnsTimeout = 2 + # Number of retries for each NBNS query. + nbnsRetries = 3 + # Timeout for NBDS queries. + nbdsTimeout = 3 + [incomingtcp] + # Use these with care - anyone can enter into your VM through these... + # The format and example are as follows: + #<external port number> = <VM's IP address>:<VM's port number> + #8080 = 172.16.3.128:80 + [incomingudp] + # UDP port forwarding example + #6000 = 172.16.3.0:6001 + " + NAT_MAC_CONFIG="00:50:56:F2:C7:28" + NETWORKING_CONFIG=" + VERSION=1,0 + answer VNET_1_DHCP yes + answer VNET_1_DHCP_CFG_HASH 97D56988968565698E051056ADEDEEACF00F5981 + answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 + answer VNET_1_HOSTONLY_SUBNET 172.16.252.0 + answer VNET_1_HOSTONLY_UUID 74A7B7F5-AB8E-41CF-9E0F-595F9C9FA1C5 + answer VNET_1_VIRTUAL_ADAPTER yes + answer VNET_8_DHCP yes + answer VNET_8_DHCP_CFG_HASH 2040265D0F7053A921FB3F6EDE944490D9E687D6 + answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 + answer VNET_8_HOSTONLY_SUBNET 172.16.38.0 + answer VNET_8_HOSTONLY_UUID 3CBAC6B3-6A71-4182-8BC6-849058A947B8 + answer VNET_8_NAT yes + answer VNET_8_VIRTUAL_ADAPTER yes + " + # Write the network configuration to the file + echo "$NETWORKING_CONFIG" | sudo tee "$NETWORKING_CONF" > /dev/null + echo "$DHCPD_CONFIG" | sudo tee "$DHCPD_CONF" > /dev/null + echo "$NAT_CONFIG" | sudo tee "$NAT_CONF" > /dev/null + echo "$NAT_MAC_CONFIG" | sudo tee "$NAT_MAC_CONF" > /dev/null + echo "VMware Fusion networking configuration updated." + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" ls -alh builds/ cat builds/${{ matrix.os }}*-x86_64._metadata.json - - name: Remove VM in case of canceled job - if: cancelled() - run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64 - vmrun -T fusion stop builds/packer-${{ matrix.os }}*-x86_64-vmware/${{ matrix.os }}*-amd64.vmx hard 2> /dev/null - sleep 1 - vmrun -T fusion deleteVM builds/packer-${{ matrix.os }}*-x86_64-vmware/${{ matrix.os }}*-amd64.vmx 2> /dev/null - sleep 2 - name: Upload build artifact uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/test-pkr-bld-parallels.yml b/.github/workflows/test-pkr-bld-parallels.yml new file mode 100644 index 000000000..53ae3a969 --- /dev/null +++ b/.github/workflows/test-pkr-bld-parallels.yml @@ -0,0 +1,145 @@ +--- +on: + workflow_call: + +env: + PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + +jobs: + x86_64: + runs-on: macos-13 + strategy: + fail-fast: false + matrix: + os: + - almalinux-8 + - almalinux-9 + - centos-stream-9 + - debian-11 + - debian-12 + - fedora-39 + - fedora-40 + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oraclelinux-8 + - oraclelinux-9 + - rockylinux-8 + - rockylinux-9 + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 + provider: + - parallels-iso + steps: + - name: Checkout + uses: actions/checkout@main + - name: Install Vagrant Parallels + run: | + brew tap hashicorp/tap + brew update + brew install --cask hashicorp/tap/hashicorp-vagrant + brew install --cask parallels + brew install --cask parallels-virtualization-sdk + vagrant plugin install vagrant-parallels + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build + run: | + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: "${{ matrix.os }}-parallels-x86_64" + path: | + builds/*.box + builds/*.json + retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test + + aarch64: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + os: + - almalinux-8 + - almalinux-9 + - centos-stream-9 + - debian-11 + - debian-12 + - fedora-39 + - fedora-40 + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oraclelinux-8 + - oraclelinux-9 + - rockylinux-8 + - rockylinux-9 + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 + provider: + - parallels-iso + steps: + - name: Checkout + uses: actions/checkout@main + - name: Install Vagrant Parallels + run: | + brew tap hashicorp/tap + brew update + brew install --cask hashicorp/tap/hashicorp-vagrant + brew install --cask parallels + brew install --cask parallels-virtualization-sdk + vagrant plugin install vagrant-parallels + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + with: + version: 24.2.1058 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build + run: | + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: "${{ matrix.os }}-parallels-aarch64" + path: | + builds/*.box + builds/*.json + retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a3583a05..b8a2f9fe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,35 +7,31 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> | os | hyperv<br>x86_64 | parallels<br>x86_64 | parallels<br>aarch64 | qemu<br>x86_64 | qemu<br>aarch64 | virtualbox<br>x86_64 | virtualbox<br>aarch64 | vmware<br>x86_64 | vmware<br>aarch64 | |:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| almalinux-8 | | x | | | | x | | x | | -| almalinux-9 | | x | | | | x | | x | x | +| almalinux-8 | | x | | x | | x | | x | | +| almalinux-9 | | x | x | | | x | | x | x | | amazonlinux-2 | | | | | | x | | | | | amazonlinux-2023 | | | | | | x | | | | -| centos-7 | | | | | | x | | x | | -| centos-stream-8 | | x | | | | x | | x | | | centos-stream-9 | | x | | | | x | | x | x | | debian-11 | | x | x | | | x | | x | | | debian-12 | | x | x | | | x | | x | x | -| fedora-39 | | x | x | | | x | | x | x | -| fedora-40 | | | | | | | | | | +| fedora-39 | | x | x | x | | x | | x | x | +| fedora-40 | | x | | x | | x | | x | x | | freebsd-13 | | | | | | x | | x | x | | freebsd-14 | | | | | | | | | | | macos | | | x | | | | | | | -| opensuse-leap-15 | | | | | | x | | x | x | -| oraclelinux-7 | | x | | | | x | | x | | +| opensuse-leap-15 | | | | x | | x | | x | x | | oraclelinux-8 | | | | | | x | | x | | | oraclelinux-9 | | x | x | | | x | | x | x | -| rhel-7 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | | rhel-8 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | | rhel-9 | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | license<br>needed | -| rockylinux-8 | | x | | | | x | | x | | +| rockylinux-8 | | x | | x | | x | | x | | | rockylinux-9 | | x | | | | x | | x | x | | sles-12 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | | sles-15 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | | solaris-11 | license<br>needed | license<br>needed | na | license<br>needed | na | license<br>needed | na | license<br>needed | na | | ubuntu-20.04 | | | x | | | x | | x | x | | ubuntu-22.04 | | x | | | | x | | | | -| ubuntu-24.04 | | x | x | | | x | | x | x | +| ubuntu-24.04 | | x | x | x | | x | | x | x | | windows-10 | | | na | | na | x | na | | na | | windows-11 | | x | x | | | x | | x | | | windows-2016 | | x | na | | na | x | na | x | na | @@ -45,16 +41,30 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> ### Todo - Fix failing builds -- migrate from http directory for hosting files to floppy_files or cd_files in source templates +- migrate from http directory for hosting files to cd_files in source templates - This makes all builds compatible with hyper-v gen 2 which removes floppy disk capability - - This also makes things universal for Virtualbox 6.1 to 7.x due to latter requiring extra config for guests on NAT to be able to connect to host - - Also eliminates any potential networking issues + - Eliminates any potential networking issues - Update pipelines to only run on updated pkrvars files -- Look into making all build uefi default builds +- Look into making all builds uefi default builds - Create CD pipeline to upload vagrant boxes after PR is merged - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches -## [unreleased] (2024-04-26) +## [unreleased] (2024-05-23) + +## [v4.1.2] (2024-05-23) + +- Fix for hyper-v build option +- Remove test-kitchen and kitchen-vagrant dependencies from gemspec to fix gem compile error on windows +- Updated hyper-v builds to use github actions hosted runners +- Updated VMware builds to use github actions hosted runners +- Better handle bento uploads of slugs ending in 'latest' +- Fix oraclelinux slug names +- Update almalinux 9.3 to 9.4 +- Update rhel 9.3 to 94 +- Update oraclelinux 9.3 to 9.4 +- Update rockylinux 9.3 to 9.4 +- Remove Centos 7, Centos Stream 8, RHEL 7, Oraclelinux 7 builds due to EOL +- Fix windows qemu args to match disk format when variable is specified ## [v4.1.1] (2024-04-26) diff --git a/README.md b/README.md index d34eb2a4e..5d25ec903 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Bento is a project that encapsulates [Packer](https://www.packer.io/) templates ***NOTE:** - Vagrant 2.4.0+ is required for new cpu architecture support +- For `bento test` command to work test-kitchen and kitchen-vagrant gems must be installed - Virutalbox 6.x requires disabling nat config that allows vbox 7.x guests to connect to the host. To use comment out lines #161 and #162 in bento/packer_templates/pkr-variables.pkr.hcl or add variable `vboxmanage = []` to os_pkrvars files. - When running packer build command the output directory is relative to the working directory the command is currently running in. Suggest running packer build commands from bento root directory for build working files to be placed in bento/builds/(build_name) directory by default. If the output_directory variable isn't overwritten a directory called builds/(build_name) will be created in the current working directory that you are running the command from diff --git a/amazonlinux-2-x86_64-virtualbox-build.sh b/amazonlinux-2-x86_64-virtualbox-build.sh index b7d8e0775..213346346 100755 --- a/amazonlinux-2-x86_64-virtualbox-build.sh +++ b/amazonlinux-2-x86_64-virtualbox-build.sh @@ -71,7 +71,7 @@ vboxmanage unregistervm $VM --delete echo starting packer build of amazonlinux if bento build --vars vbox_source_path="$AMZDIR"/amazon2_x86_64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR" + rm -rf "$AMZDIR" else exit 1 fi diff --git a/amazonlinux-2023-aarch64-virtualbox-build.sh b/amazonlinux-2023-aarch64-virtualbox-build.sh index bdb1a01e0..0fcc85a1e 100755 --- a/amazonlinux-2023-aarch64-virtualbox-build.sh +++ b/amazonlinux-2023-aarch64-virtualbox-build.sh @@ -80,7 +80,7 @@ vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_arm64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR" + rm -rf "$AMZDIR" else exit 1 fi diff --git a/amazonlinux-2023-x86_64-virtualbox-build.sh b/amazonlinux-2023-x86_64-virtualbox-build.sh index da6d3d097..ae3f612c1 100755 --- a/amazonlinux-2023-x86_64-virtualbox-build.sh +++ b/amazonlinux-2023-x86_64-virtualbox-build.sh @@ -78,7 +78,7 @@ vboxmanage unregistervm $VM --delete echo "starting packer build of amazonlinux" if bento build --vars vbox_source_path="$AMZDIR"/amazon2023_x86_64.ovf,vbox_checksum=null "$(pwd)"/os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl; then echo "Cleaning up files" - rm -f "$AMZDIR" + rm -rf "$AMZDIR" else exit 1 fi diff --git a/bento.gemspec b/bento.gemspec index 23dfd1fd0..e90d43c4f 100644 --- a/bento.gemspec +++ b/bento.gemspec @@ -14,8 +14,6 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 3.0' s.add_dependency 'mixlib-shellout', '>= 2.3.2' - s.add_dependency 'test-kitchen' - s.add_dependency 'kitchen-vagrant' s.bindir = 'bin' s.executables = %w(bento) diff --git a/builds.yml b/builds.yml index 373d0b86d..665696e27 100644 --- a/builds.yml +++ b/builds.yml @@ -10,8 +10,6 @@ public: - amazonlinux-2023 - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 @@ -20,7 +18,6 @@ public: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 - rockylinux-8 @@ -40,9 +37,8 @@ slugs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - macos-14 diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index 7c41b5804..b705918d9 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -90,7 +90,7 @@ def packer_build_cmd(template, _var_file) end if var_files cmd.insert(4, "-only=#{only}") if only cmd.insert(4, "-except=#{except}") if except - # Build the command line in the correct order and without spaces as future input for the splat operator. + cmd.insert(4, "-var 'sources_enabled=#{only.split(',').inspect}'") if only cmd.insert(4, "-var cpus=#{cpus}") if cpus cmd.insert(4, "-var memory=#{mem}") if mem cmd.insert(4, '-var headless=false') if headed diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index 078902800..7a79d6dcb 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -76,6 +76,15 @@ def upload_box(md_file) def lookup_slug(name) builds_yml['slugs'].each do |slug| return slug if name.start_with?(slug) + if slug.end_with?('latest') + box_name = slug.split('-').first + box_version = [] + Dir.glob("os_pkrvars/#{box_name}/**/*.pkrvars.hcl").each do |boxes| + box_version << File.basename(boxes).split('-')[1].to_i + end + latest = box_version.uniq!.max { |a, b| a <=> b } + return slug if name.start_with?("#{box_name}-#{latest}") + end end nil diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 30e078423..cb7e9b360 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '4.1.1'.freeze + VERSION = '4.1.2'.freeze end diff --git a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl index 9a0c45b7b..a36a2f5b2 100644 --- a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "9.3" +os_version = "9.4" os_arch = "aarch64" -iso_url = "https://repo.almalinux.org/almalinux/9/isos/aarch64/AlmaLinux-9.3-aarch64-dvd.iso" +iso_url = "https://repo.almalinux.org/almalinux/9/isos/aarch64/AlmaLinux-9.4-aarch64-dvd.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/9/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl index 7a6a8456b..ac64fbf20 100644 --- a/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-9-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "9.3" +os_version = "9.4" os_arch = "x86_64" -iso_url = "https://repo.almalinux.org/almalinux/9/isos/x86_64/AlmaLinux-9.3-x86_64-dvd.iso" +iso_url = "https://repo.almalinux.org/almalinux/9/isos/x86_64/AlmaLinux-9.4-x86_64-dvd.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/9/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl deleted file mode 100644 index 1d5b199f2..000000000 --- a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "centos" -os_version = "7.9" -os_arch = "aarch64" -iso_url = "https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/CentOS-7-aarch64-Minimal-2009.iso" -iso_checksum = "file:https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/sha256sum.txt" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-other-64" -boot_command = ["<wait><up>e<wait><down><down><end><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl deleted file mode 100644 index b78910cf8..000000000 --- a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "centos" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "http://mirrors.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso" -iso_checksum = "file:https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/sha256sum.txt" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl deleted file mode 100644 index 08d946e6b..000000000 --- a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "centos-stream" -os_version = "8" -os_arch = "aarch64" -iso_url = "https://mirrors.edge.kernel.org/centos/8-stream/isos/aarch64/CentOS-Stream-8-aarch64-latest-boot.iso" -iso_checksum = "file:https://mirrors.edge.kernel.org/centos/8-stream/isos/aarch64/CHECKSUM" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-other-64" -boot_command = ["<wait><up>e<wait><down><down><end><wait> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/centos/centos-stream-8-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-8-x86_64.pkrvars.hcl deleted file mode 100644 index c2bfab5e4..000000000 --- a/os_pkrvars/centos/centos-stream-8-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "centos-stream" -os_version = "8" -os_arch = "x86_64" -iso_url = "http://mirrors.kernel.org/centos/8-stream/isos/x86_64/CentOS-Stream-8-x86_64-latest-dvd1.iso" -iso_checksum = "file:https://mirrors.edge.kernel.org/centos/8-stream/isos/x86_64/CHECKSUM" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg<enter><wait>"] diff --git a/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl deleted file mode 100644 index 8fbfc33f8..000000000 --- a/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "oraclelinux" -os_version = "7.9" -os_arch = "aarch64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL7/u9/aarch64/OracleLinux-R7-U9-Server-aarch64-dvd.iso" -iso_checksum = "fd2c1b1e26858576534f6e6c4cf000a15cd81bec010dad5e827b204a14a1750e" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-other-64" -boot_command = ["<wait><up>e<wait><down><down><end><wait> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg <leftCtrlOn>x<leftCtrlOff>"] diff --git a/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl deleted file mode 100644 index 6bd8977ad..000000000 --- a/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "oraclelinux" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "http://mirrors.dotsrc.org/oracle-linux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd.iso" -iso_checksum = "dc2782bfd92b4c060cf8006fbc6e18036c27f599eebf3584a1a2ac54f008bf2f" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl index 7d64a0a65..0325a8108 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oraclelinux" -os_version = "9.3" +os_version = "9.4" os_arch = "aarch64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/aarch64/OracleLinux-R9-U3-aarch64-dvd.iso" -iso_checksum = "7cc50a48f361cb1100a28621ba455edaac3a38182f6dd3fe67588b3eeaf18dc3" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u4/aarch64/OracleLinux-R9-U4-aarch64-dvd.iso" +iso_checksum = "file:https://linux.oracle.com/security/gpg/checksum/OracleLinux-R9-U4-Server-aarch64.checksum" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "arm-rhel9-64" diff --git a/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl index 0aa28f6e1..221a8564d 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oraclelinux" -os_version = "9.3" +os_version = "9.4" os_arch = "x86_64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/x86_64/OracleLinux-R9-U3-x86_64-dvd.iso" -iso_checksum = "242f0ecc37417995137507862cb170215c0b5bd512c47badd16b623686ef39e2" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u4/x86_64/OracleLinux-R9-U4-x86_64-dvd.iso" +iso_checksum = "file:https://linux.oracle.com/security/gpg/checksum/OracleLinux-R9-U4-Server-x86_64.checksum" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "centos-64" diff --git a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl deleted file mode 100644 index 940473f9a..000000000 --- a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "rhel" -os_version = "7.9" -os_arch = "aarch64" -iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" -iso_checksum = "1b8004961150b60f6c5ec3f25139d3217eee55707cf9fa19e826919fc58e328b" -parallels_guest_os_type = "rhel" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-other-64" -boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl deleted file mode 100644 index d3f3d5372..000000000 --- a/os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "rhel" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" -iso_checksum = "1b8004961150b60f6c5ec3f25139d3217eee55707cf9fa19e826919fc58e328b" -parallels_guest_os_type = "rhel" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl index 42d86f15d..cde337d59 100644 --- a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "9.3" +os_version = "9.4" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl index aac6e2b5d..25909fb92 100644 --- a/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "9.3" +os_version = "9.4" os_arch = "x86_64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl index f3d975df4..838bc2d50 100644 --- a/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "9.3" +os_version = "9.4" os_arch = "aarch64" -iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.3-aarch64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.4-aarch64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/9/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl index 19438d23a..73aa82e53 100644 --- a/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-9-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "9.3" +os_version = "9.4" os_arch = "x86_64" -iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.3-x86_64-dvd.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.4-x86_64-dvd.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/9/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 5e619f9a5..f1b517f1b 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -19,4 +19,11 @@ autoinstall: fi - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi + - | + if [ $(virt-what) == "hyperv" ]; then + apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils + systemctl enable hypervvssd + systemctl enable hypervkvpd + systemctl start hypervvssd + systemctl start hypervkvpd + fi diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 6c62ae330..519fb889d 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -123,10 +123,7 @@ locals { "${path.root}/scripts/fedora/cleanup_dnf.sh", "${path.root}/scripts/_common/minimize.sh" ] : ( - "${var.os_name}-${var.os_version}" == "amazonlinux-2" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oraclelinux-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ + "${var.os_name}-${var.os_version}" == "amazonlinux-2" ? [ "${path.root}/scripts/rhel/update_yum.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 58e48758a..4c31488e3 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -35,7 +35,11 @@ locals { ) : var.parallels_prlctl # qemu - qemu_binary = var.qemu_binary == null ? "qemu-system-${var.os_arch}" : var.qemu_binary + qemu_binary = var.qemu_binary == null ? "qemu-system-${var.os_arch}" : var.qemu_binary + qemu_display = var.qemu_display == null ? "none" : var.qemu_display + qemu_use_default_display = var.qemu_use_default_display == null ? ( + var.os_arch == "aarch64" ? true : false + ) : var.qemu_use_default_display qemu_machine_type = var.qemu_machine_type == null ? ( var.os_arch == "aarch64" ? "virt" : "q35" ) : var.qemu_machine_type @@ -47,6 +51,8 @@ locals { ] : ( var.os_arch == "aarch64" ? [ ["-boot", "strict=off"] + # ["-cpu", "host"], + # ["-monitor", "stdio"] ] : null ) ) : var.qemuargs @@ -209,17 +215,18 @@ source "parallels-iso" "vm" { } source "qemu" "vm" { # QEMU specific options - accelerator = var.qemu_accelerator - display = var.headless ? "none" : var.qemu_display - disk_image = var.qemu_disk_image - efi_boot = var.qemu_efi_boot - efi_firmware_code = var.qemu_efi_firmware_code - efi_firmware_vars = var.qemu_efi_firmware_vars - efi_drop_efivars = var.qemu_efi_drop_efivars - format = var.qemu_format - machine_type = local.qemu_machine_type - qemu_binary = local.qemu_binary - qemuargs = local.qemuargs + accelerator = var.qemu_accelerator + display = local.qemu_display + use_default_display = local.qemu_use_default_display + disk_image = var.qemu_disk_image + efi_boot = var.qemu_efi_boot + efi_firmware_code = var.qemu_efi_firmware_code + efi_firmware_vars = var.qemu_efi_firmware_vars + efi_drop_efivars = var.qemu_efi_drop_efivars + format = var.qemu_format + machine_type = local.qemu_machine_type + qemu_binary = local.qemu_binary + qemuargs = local.qemuargs # Source block common options boot_command = var.boot_command boot_wait = var.qemu_boot_wait == null ? local.default_boot_wait : var.qemu_boot_wait diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 5b0c027fd..5a6354105 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -142,8 +142,14 @@ variable "qemu_boot_wait" { default = null } variable "qemu_display" { - type = string - default = "none" + type = string + default = null + description = "What QEMU -display option to use. Defaults to gtk, use none to not pass the -display option allowing QEMU to choose the default" +} +variable "qemu_use_default_display" { + type = bool + default = null + description = "If true, do not pass a -display option to qemu, allowing it to choose the default" } variable "qemu_disk_image" { type = bool @@ -171,8 +177,12 @@ variable "qemu_efi_drop_efivars" { description = "Drop EFI vars" } variable "qemu_format" { - type = string - default = "qcow2" + type = string + default = "qcow2" + validation { + condition = var.qemu_format == "qcow2" || var.qemu_format == "raw" + error_message = "Disk format, takes qcow2 or raw." + } description = "Disk format, takes qcow2 or raw" } variable "qemu_machine_type" { From b72e88533d37280babd6678fe39d6ad394b99eb9 Mon Sep 17 00:00:00 2001 From: Shawn Kelly O'Shea <shawn@eth0.net> Date: Thu, 30 May 2024 13:07:09 -0400 Subject: [PATCH 19/28] bump AlmaLinux 8 version to 8.10 (#1569) --- os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl | 4 ++-- os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl index 56b364127..275c9f6b7 100644 --- a/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "8.9" +os_version = "8.10" os_arch = "aarch64" -iso_url = "https://repo.almalinux.org/almalinux/8/isos/aarch64/AlmaLinux-8.9-aarch64-minimal.iso" +iso_url = "https://repo.almalinux.org/almalinux/8/isos/aarch64/AlmaLinux-8.10-aarch64-minimal.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl index 494183e16..31fbb83af 100644 --- a/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/almalinux/almalinux-8-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "almalinux" -os_version = "8.9" +os_version = "8.10" os_arch = "x86_64" -iso_url = "https://repo.almalinux.org/almalinux/8/isos/x86_64/AlmaLinux-8.9-x86_64-minimal.iso" +iso_url = "https://repo.almalinux.org/almalinux/8/isos/x86_64/AlmaLinux-8.10-x86_64-minimal.iso" iso_checksum = "file:https://repo.almalinux.org/almalinux/8/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" From 6fe9fa20d1f37e916a7babdee87c89ba38ce54a4 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Wed, 5 Jun 2024 09:30:40 -0500 Subject: [PATCH 20/28] update OS versions (#1570) * update OS versions --------- Signed-off-by: Corey Hemminger <hemminger@hotmail.com> --- CHANGELOG.md | 6 ++++++ os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl | 6 +++--- os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl | 6 +++--- os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl | 6 +++--- os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl | 6 +++--- os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl | 2 +- os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl | 4 ++-- os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl | 4 ++-- 9 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8a2f9fe8..3fd6532b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,12 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> ## [unreleased] (2024-05-23) +- Update almalinux 8 to 8.10 +- Update rockylinux 8 to 8.10 +- Update oraclelinux 8 to 8.10 +- Update rhel 8 to 8.10 +- Update freebsd 14 to 14.1 + ## [v4.1.2] (2024-05-23) - Fix for hyper-v build option diff --git a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl index f2dfcfdb6..d09fcb69a 100644 --- a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "freebsd" -os_version = "14.0" +os_version = "14.1" os_arch = "aarch64" -iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-arm64-aarch64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-arm64-aarch64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.1/CHECKSUM.SHA256-FreeBSD-14.1-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" vmware_guest_os_type = "arm-freebsd14-64" diff --git a/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl index 3e2c2138e..d01d5138b 100644 --- a/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "freebsd" -os_version = "14.0" +os_version = "14.1" os_arch = "x86_64" -iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-amd64" +iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-amd64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.1/CHECKSUM.SHA256-FreeBSD-14.1-RELEASE-amd64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" vmware_guest_os_type = "freebsd-64" diff --git a/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl index c04cf1f0e..5ca97bd82 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oraclelinux" -os_version = "8.9" +os_version = "8.10" os_arch = "aarch64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/aarch64/OracleLinux-R8-U9-aarch64-dvd.iso" -iso_checksum = "c732ec9bb4a85349c0f1ca82020a8514341247506d114b8b79ec32bf99d59ea0" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u10/aarch64/OracleLinux-R8-U10-aarch64-dvd.iso" +iso_checksum = "file:https://linux.oracle.com/security/gpg/checksum/OracleLinux-R8-U10-Server-aarch64.checksum" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "arm-other-64" diff --git a/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl index 499533fd4..7fa3b597f 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "oraclelinux" -os_version = "8.9" +os_version = "8.10" os_arch = "x86_64" -iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/x86_64/OracleLinux-R8-U9-x86_64-dvd.iso" -iso_checksum = "ce90b598be2e9889fa880128fc53b3e9c1f95d9e31859759e5e180602312c181" +iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u10/x86_64/OracleLinux-R8-U10-x86_64-dvd.iso" +iso_checksum = "file:https://linux.oracle.com/security/gpg/checksum/OracleLinux-R8-U10-Server-x86_64.checksum" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" vmware_guest_os_type = "centos-64" diff --git a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl index e5950dceb..273648ca3 100644 --- a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "8.9" +os_version = "8.10" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl index 0d939441b..061431f40 100644 --- a/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl @@ -1,5 +1,5 @@ os_name = "rhel" -os_version = "8.9" +os_version = "8.10" os_arch = "x86_64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" iso_checksum = "none" diff --git a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl index 8f769dde5..157d97c79 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "8.9" +os_version = "8.10" os_arch = "aarch64" -iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarch64/Rocky-8.9-aarch64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarch64/Rocky-8.10-aarch64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" diff --git a/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl index e64db8fcd..19ae2b407 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "rockylinux" -os_version = "8.9" +os_version = "8.10" os_arch = "x86_64" -iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.9-x86_64-minimal.iso" +iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.10-x86_64-minimal.iso" iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/x86_64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" From 7baa403ae131f2a0f8d3f31c1ae8f7d9adcaa123 Mon Sep 17 00:00:00 2001 From: ls-2018 <m202140037@xs.ustb.edu.cn> Date: Tue, 23 Jul 2024 02:15:50 +0800 Subject: [PATCH 21/28] :bug: fix shell exec err (#1572) Signed-off-by: acejilam <acejilam@gmail.com> --- packer_templates/http/ubuntu/user-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index f1b517f1b..c8d22760d 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -15,7 +15,7 @@ autoinstall: late-commands: - | if [ -f /target/etc/netplan/00-installer-config.yaml ]; then - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' + sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml fi - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization From 4496079764dcc3719a49753f766a0b2c02e9bc94 Mon Sep 17 00:00:00 2001 From: Anton Alekseev <anton@alekseev.cc> Date: Tue, 23 Jul 2024 01:19:10 +0700 Subject: [PATCH 22/28] Fix a bug in freebsd-14.x due to changes in bsdinstall (#1573) Since FreeBSD 14.0, bsdinstall creates ZFS dataset for `home` rather than `/usr/home`, see https://github.com/freebsd/freebsd-src/commit/3bb92304b4fe79babd19ba0d9c74d29af9117a22. This way, the previous workaround was broken, preventing the normal provisioning of the default Vagrant public keys. Signed-off-by: Anton Alekseev <anton@alekseev.cc> Co-authored-by: Corey Hemminger <hemminger@hotmail.com> --- packer_templates/http/freebsd/installerconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packer_templates/http/freebsd/installerconfig b/packer_templates/http/freebsd/installerconfig index 02045660c..726c8130d 100644 --- a/packer_templates/http/freebsd/installerconfig +++ b/packer_templates/http/freebsd/installerconfig @@ -44,12 +44,22 @@ EOT # zfs doesn't use an fstab, but some rc scripts expect one touch /etc/fstab +# Since FreeBSD 14.0 bsdinstall again creates dataset for /home rather then /usr/home +# Thus on versions prior to 14.0 we have to create /home -> /usr/home symlink, +# otherwise just use /home as the base for vagrant's home +version=$(freebsd-version -u) +if [ "${version%%.*}" -lt "14" ]; then + home_base="/usr/home" + ln -s $home_base /home +else + home_base="/home" +fi + # Set up user accounts -echo "vagrant" | pw -V /etc useradd vagrant -h 0 -s /bin/sh -G wheel -d /usr/home/vagrant -c "Vagrant User" +echo "vagrant" | pw -V /etc useradd vagrant -h 0 -s /bin/sh -G wheel -d ${home_base}/vagrant -c "Vagrant User" echo "vagrant" | pw -V /etc usermod root -mkdir -p /usr/home/vagrant -chown 1001:1001 /usr/home/vagrant -ln -s /usr/home /home +mkdir -p ${home_base}/vagrant +chown 1001:1001 ${home_base}/vagrant reboot From 1fb7b9e796cc384fd6baaeea5072261f2e3f330d Mon Sep 17 00:00:00 2001 From: fgierlinger <2966031+fgierlinger@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:27:02 +0200 Subject: [PATCH 23/28] Fix arm64 builds for debian 11 (#1571) * fix open-vm-tools installation in debian11 Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com> * prevent "unknown ioctl 1976" log spam Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com> --------- Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com> Co-authored-by: Corey Hemminger <hemminger@hotmail.com> --- .../scripts/_common/vmware_debian_ubuntu.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packer_templates/scripts/_common/vmware_debian_ubuntu.sh b/packer_templates/scripts/_common/vmware_debian_ubuntu.sh index 1409a8bd6..981bb6894 100644 --- a/packer_templates/scripts/_common/vmware_debian_ubuntu.sh +++ b/packer_templates/scripts/_common/vmware_debian_ubuntu.sh @@ -2,7 +2,20 @@ case "$PACKER_BUILDER_TYPE" in vmware-iso|vmware-vmx) + # determine the major Debian version we're runninng + major_version="$(grep VERSION_ID /etc/os-release | awk -F= '{print $2}' | tr -d '"')" + architecture="$(uname -m)" + + # open-vm-tools for amd64 are only available in bullseye-backports repo echo "install open-vm-tools" + if [ "$major_version" -eq 11 ] && [ "$architecture" = "aarch64" ]; then + echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list + apt-get update + cat > /etc/modprobe.d/blacklist.conf <<EOF +blacklist vsock_loopback +blacklist vmw_vsock_virtio_transport_common +EOF + fi apt-get install -y open-vm-tools; mkdir /mnt/hgfs; systemctl enable open-vm-tools From 9f6671c4d78dfead41c6a5a59377d0da09a8b121 Mon Sep 17 00:00:00 2001 From: Phillip Ross <phillipross@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:58:40 -0400 Subject: [PATCH 24/28] Update ubuntu-24.04 to latest ISO urls (24.04 to 24.04.1) (#1577) Signed-off-by: Phillip Ross <phillip.w.g.ross@gmail.com> --- os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl | 2 +- os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl index f3625a163..370ecaf15 100644 --- a/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "24.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/noble/release/ubuntu-24.04-live-server-arm64.iso" +iso_url = "https://cdimage.ubuntu.com/releases/noble/release/ubuntu-24.04.1-live-server-arm64.iso" iso_checksum = "file:https://cdimage.ubuntu.com/releases/noble/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" diff --git a/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl index ef40daf4f..57924fc2c 100644 --- a/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "24.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso" +iso_url = "https://releases.ubuntu.com/noble/ubuntu-24.04.1-live-server-amd64.iso" iso_checksum = "file:https://releases.ubuntu.com/noble/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" From 18751d784d0593986813f011250fc8546c297c97 Mon Sep 17 00:00:00 2001 From: Seth Grover <13872653+mmguero@users.noreply.github.com> Date: Sun, 29 Sep 2024 22:42:46 -0600 Subject: [PATCH 25/28] update hashicorp/qemu packer plugin to fix QEMU build, supporting efi_drop_efivars variable (#1580) --- packer_templates/pkr-builder.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 519fb889d..7e0754510 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -10,7 +10,7 @@ packer { source = "github.com/parallels/parallels" } qemu = { - version = ">= 1.0.8" + version = ">= 1.1.0" source = "github.com/hashicorp/qemu" } vagrant = { From 6d94d75c98c666bca49e366d14cedfaa480f9c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= <konstruktoid@users.noreply.github.com> Date: Mon, 30 Sep 2024 07:06:57 +0200 Subject: [PATCH 26/28] update Ubuntu Jammy releases (#1578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update Ubuntu releases Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com> * 23.10 removed Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com> --------- Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com> Co-authored-by: Corey Hemminger <hemminger@hotmail.com> --- os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl | 2 +- os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl index e49428e2b..783648773 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso" +iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.5-live-server-arm64.iso" iso_checksum = "file:https://cdimage.ubuntu.com/releases/jammy/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl index c4f1bb6fe..21077f3bd 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso" +iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.5-live-server-amd64.iso" iso_checksum = "file:https://releases.ubuntu.com/jammy/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" From 88b34f92342f855c50c127203763eaadaedac93a Mon Sep 17 00:00:00 2001 From: Seth Grover <13872653+mmguero@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:08:04 -0600 Subject: [PATCH 27/28] Bump Debian from 12.5 to 12.7 (#1579) Signed-off-by: Seth Grover <seth.d.grover@gmail.com> --- os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl | 6 +++--- os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index a1f98a930..40280c58e 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.5" +os_version = "12.7" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/debian-12.5.0-arm64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.7.0/arm64/iso-dvd/debian-12.7.0-arm64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.7.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian12-64" diff --git a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl index 6ad4b3f04..997b38f99 100644 --- a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.5" +os_version = "12.7" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.7.0/amd64/iso-dvd/debian-12.7.0-amd64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.7.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" From 12fbc3461cdb767927a05bf50e8b5e0a616bb5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= <konstruktoid@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:01:00 +0200 Subject: [PATCH 28/28] add Ubuntu 24.10 (Oracular Oriole) (#1583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com> --- os_pkrvars/ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl | 9 +++++++++ os_pkrvars/ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 os_pkrvars/ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl create mode 100644 os_pkrvars/ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl diff --git a/os_pkrvars/ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl new file mode 100644 index 000000000..329d4c474 --- /dev/null +++ b/os_pkrvars/ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "ubuntu" +os_version = "24.10" +os_arch = "aarch64" +iso_url = "https://cdimage.ubuntu.com/releases/oracular/release/ubuntu-24.10-live-server-arm64.iso" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/oracular/release/SHA256SUMS" +parallels_guest_os_type = "ubuntu" +vbox_guest_os_type = "Ubuntu_64" +vmware_guest_os_type = "arm-ubuntu-64" +boot_command = ["<wait>e<wait><down><down><down><end> autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/<wait><f10><wait>"] diff --git a/os_pkrvars/ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl new file mode 100644 index 000000000..f77c1d40b --- /dev/null +++ b/os_pkrvars/ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "ubuntu" +os_version = "24.10" +os_arch = "x86_64" +iso_url = "https://releases.ubuntu.com/oracular/ubuntu-24.10-live-server-amd64.iso" +iso_checksum = "file:https://releases.ubuntu.com/oracular/SHA256SUMS" +parallels_guest_os_type = "ubuntu" +vbox_guest_os_type = "Ubuntu_64" +vmware_guest_os_type = "ubuntu-64" +boot_command = ["<wait>e<wait><down><down><down><end> autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/<wait><f10><wait>"]