From 8e0fe63415eb42a776be06def040ce8ab8903dbd Mon Sep 17 00:00:00 2001 From: devmuppet Date: Thu, 24 Oct 2024 10:36:46 +0100 Subject: [PATCH] main merge (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add FreeBSD 14.0-RELEASE (#1538) Signed-off-by: Li-Wen Hsu * Fix os_arch of freebsd-13-aarch64 config (#1539) Signed-off-by: Li-Wen Hsu * Bump almalinux minor versions (#1540) * - update to rockylinux 9.3 (#1542) * Bump Debian to v12.4, released December 10th, 2023 (#1541) * Update latest OS versions and fix arm64 build list command (#1543) * Update latest OS versions and fix arm64 build list command --------- * 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 * vagrant cloud cpu architecture support added (#1546) * vagrant cloud cpu architecture support added * fix metadata basename (#1548) fixed metadata base_boxname updated debian 11 to 11.9 updated debian 12 to 12.5 * Fix waiting for ssh - ubuntu netplan dhcp-identifer format error (#1550) * bumped iso url versions (#1553) * Update to FreeBSD 13.3 (#1556) * Update (#1559) Add amz Linux 2023 and update testing scripts * 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 * 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 * 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 * Fix qemu_format="raw" causing wrong format for qemu (#1568) * setup workflow for hosted runners (#1547) * setup workflow for hosted runners * bump AlmaLinux 8 version to 8.10 (#1569) * update OS versions (#1570) * update OS versions --------- Signed-off-by: Corey Hemminger * :bug: fix shell exec err (#1572) Signed-off-by: acejilam * 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 Co-authored-by: Corey Hemminger * 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 * Update ubuntu-24.04 to latest ISO urls (24.04 to 24.04.1) (#1577) Signed-off-by: Phillip Ross * update hashicorp/qemu packer plugin to fix QEMU build, supporting efi_drop_efivars variable (#1580) * update Ubuntu Jammy releases (#1578) * update Ubuntu releases Signed-off-by: Thomas Sjögren * 23.10 removed Signed-off-by: Thomas Sjögren --------- Signed-off-by: Thomas Sjögren Co-authored-by: Corey Hemminger * Bump Debian from 12.5 to 12.7 (#1579) Signed-off-by: Seth Grover * add Ubuntu 24.10 (Oracular Oriole) (#1583) Signed-off-by: Thomas Sjögren --------- Signed-off-by: Li-Wen Hsu Signed-off-by: Corey Hemminger Signed-off-by: acejilam Signed-off-by: Anton Alekseev Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com> Signed-off-by: Phillip Ross Signed-off-by: Thomas Sjögren Signed-off-by: Seth Grover Co-authored-by: Li-Wen Hsu Co-authored-by: Shawn Kelly O'Shea Co-authored-by: Phillip Ross Co-authored-by: Seth Grover <13872653+mmguero@users.noreply.github.com> Co-authored-by: Corey Hemminger Co-authored-by: Theo Dickinson Co-authored-by: Jimmy Huang Co-authored-by: Matthias Blümel Co-authored-by: Daniel Widerin Co-authored-by: ls-2018 Co-authored-by: Anton Alekseev Co-authored-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com> Co-authored-by: Thomas Sjögren --- .github/workflows/ci-build.yml | 20 +- .github/workflows/pkr-bld-amazonlinux-x64.yml | 68 +- .github/workflows/pkr-bld-hyperv-x64.yml | 64 +- .github/workflows/pkr-bld-parallels-arm64.yml | 42 +- .github/workflows/pkr-bld-parallels-x64.yml | 46 +- .github/workflows/pkr-bld-qemu-arm64.yml | 71 +- .github/workflows/pkr-bld-qemu-x64.yml | 90 ++- .../workflows/pkr-bld-virtualbox-arm64.yml | 76 +- .github/workflows/pkr-bld-virtualbox-x64.yml | 89 +-- .github/workflows/pkr-bld-vmware-arm64.yml | 184 ++++- .github/workflows/pkr-bld-vmware-x64.yml | 187 +++-- .github/workflows/test-pkr-bld-parallels.yml | 145 ++++ .gitignore | 2 + AMZ_README_FIRST.md | 12 +- CHANGELOG.md | 160 +++- README.md | 35 +- ...> amazonlinux-2-x86_64-virtualbox-build.sh | 34 +- amazonlinux-2023-aarch64-virtualbox-build.sh | 86 +++ amazonlinux-2023-x86_64-virtualbox-build.sh | 84 ++ bento.gemspec | 2 +- builds.yml | 122 +-- builds/build_files/.gitkeep | 0 builds/failed_testing/.gitkeep | 0 builds/iso/.gitkeep | 0 lib/bento/buildmetadata.rb | 14 +- lib/bento/cli.rb | 42 +- lib/bento/common.rb | 37 +- lib/bento/providermetadata.rb | 2 +- lib/bento/runner.rb | 22 +- lib/bento/test.rb | 52 +- lib/bento/test_templates/kitchen.yml.erb | 3 +- lib/bento/upload.rb | 53 +- lib/bento/version.rb | 2 +- .../almalinux/almalinux-8-aarch64.pkrvars.hcl | 4 +- .../almalinux/almalinux-8-x86_64.pkrvars.hcl | 4 +- .../almalinux/almalinux-9-aarch64.pkrvars.hcl | 4 +- .../almalinux/almalinux-9-x86_64.pkrvars.hcl | 4 +- .../amazonlinux-2-aarch64.pkrvars.hcl | 11 + .../amazonlinux-2-x86_64.pkrvars.hcl | 28 +- .../amazonlinux-2023-aarch64.pkrvars.hcl | 11 + .../amazonlinux-2023-x86_64.pkrvars.hcl | 28 +- .../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 - .../centos-stream-9-aarch64.pkrvars.hcl | 2 +- .../debian/debian-11-aarch64.pkrvars.hcl | 6 +- .../debian/debian-11-x86_64.pkrvars.hcl | 4 +- .../debian/debian-12-aarch64.pkrvars.hcl | 8 +- .../debian/debian-12-x86_64.pkrvars.hcl | 6 +- .../fedora/fedora-39-aarch64.pkrvars.hcl | 3 +- ...vars.hcl => fedora-40-aarch64.pkrvars.hcl} | 6 +- ...rvars.hcl => fedora-40-x86_64.pkrvars.hcl} | 6 +- .../freebsd/freebsd-12-x86_64.pkrvars.hcl | 9 - .../freebsd/freebsd-13-aarch64.pkrvars.hcl | 10 +- .../freebsd/freebsd-13-x86_64.pkrvars.hcl | 6 +- ...ars.hcl => freebsd-14-aarch64.pkrvars.hcl} | 10 +- .../freebsd/freebsd-14-x86_64.pkrvars.hcl | 9 + os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl | 73 ++ .../opensuse-leap-15-aarch64.pkrvars.hcl | 10 +- .../opensuse-leap-15-x86_64.pkrvars.hcl | 8 +- .../oracle/oracle-7-aarch64.pkrvars.hcl | 9 - os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl | 9 - .../oraclelinux-8-aarch64.pkrvars.hcl} | 10 +- .../oraclelinux-8-x86_64.pkrvars.hcl} | 8 +- .../oraclelinux-9-aarch64.pkrvars.hcl} | 10 +- .../oraclelinux-9-x86_64.pkrvars.hcl} | 8 +- os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl | 9 - os_pkrvars/rhel/rhel-7-x86_64.pkrvars.hcl | 9 - os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl | 4 +- os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl | 2 +- os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl | 4 +- os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl | 2 +- .../rockylinux-8-aarch64.pkrvars.hcl | 6 +- .../rockylinux-8-x86_64.pkrvars.hcl | 4 +- .../rockylinux-9-aarch64.pkrvars.hcl | 4 +- .../rockylinux-9-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 +- .../ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl | 2 +- .../ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl | 2 +- ...s.hcl => ubuntu-24.04-aarch64.pkrvars.hcl} | 6 +- ...rs.hcl => ubuntu-24.04-x86_64.pkrvars.hcl} | 6 +- .../ubuntu/ubuntu-24.10-aarch64.pkrvars.hcl | 9 + .../ubuntu/ubuntu-24.10-x86_64.pkrvars.hcl | 9 + .../windows/windows-10-x86_64.pkrvars.hcl | 1 - .../windows/windows-11-aarch64.pkrvars.hcl | 9 + .../windows/windows-11-x86_64.pkrvars.hcl | 4 +- packer_templates/amz_seed_iso/README.md | 1 - packer_templates/amz_seed_iso/user-data | 29 - packer_templates/amz_working_files/README.md | 1 - .../{amz_seed_iso => http/amazon}/meta-data | 0 packer_templates/http/amazon/user-data | 15 + packer_templates/http/freebsd/installerconfig | 18 +- 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 | 18 +- packer_templates/pkr-builder.pkr.hcl | 155 ++-- packer_templates/pkr-sources.pkr.hcl | 123 ++- packer_templates/pkr-variables.pkr.hcl | 87 ++- packer_templates/scripts/_common/motd.sh | 7 +- packer_templates/scripts/_common/vagrant.sh | 6 +- .../scripts/_common/vmware_debian_ubuntu.sh | 13 + .../scripts/_common/vmware_rhel.sh | 24 +- .../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 ++ packer_templates/scripts/rhel/cleanup_dnf.sh | 4 +- packer_templates/scripts/rhel/cleanup_yum.sh | 7 +- .../scripts/ubuntu/cleanup_ubuntu.sh | 3 +- packer_templates/vagrantfile-windows.template | 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 +- 130 files changed, 2741 insertions(+), 1279 deletions(-) create mode 100644 .github/workflows/test-pkr-bld-parallels.yml rename AMZ_build_virtualbox-ovf.sh => amazonlinux-2-x86_64-virtualbox-build.sh (59%) create mode 100755 amazonlinux-2023-aarch64-virtualbox-build.sh create mode 100755 amazonlinux-2023-x86_64-virtualbox-build.sh create mode 100644 builds/build_files/.gitkeep create mode 100644 builds/failed_testing/.gitkeep create mode 100644 builds/iso/.gitkeep create mode 100644 os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl create mode 100644 os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl 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 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%) delete mode 100644 os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl rename os_pkrvars/freebsd/{freebsd-12-aarch64.pkrvars.hcl => freebsd-14-aarch64.pkrvars.hcl} (54%) create mode 100644 os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl create mode 100644 os_pkrvars/macos/macos-14-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl rename os_pkrvars/{oracle/oracle-8-aarch64.pkrvars.hcl => oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl} (53%) rename os_pkrvars/{oracle/oracle-8-x86_64.pkrvars.hcl => oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl} (58%) rename os_pkrvars/{oracle/oracle-9-aarch64.pkrvars.hcl => oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl} (54%) rename os_pkrvars/{oracle/oracle-9-x86_64.pkrvars.hcl => oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl} (58%) delete mode 100644 os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl delete mode 100644 os_pkrvars/rhel/rhel-7-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-24.04-aarch64.pkrvars.hcl} (69%) rename os_pkrvars/ubuntu/{ubuntu-23.04-x86_64.pkrvars.hcl => ubuntu-24.04-x86_64.pkrvars.hcl} (61%) 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 create mode 100644 os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl delete mode 100644 packer_templates/amz_seed_iso/README.md delete mode 100644 packer_templates/amz_seed_iso/user-data delete mode 100644 packer_templates/amz_working_files/README.md rename packer_templates/{amz_seed_iso => http/amazon}/meta-data (100%) create mode 100644 packer_templates/http/amazon/user-data 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 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 create mode 100644 packer_templates/win_answer_files/11/arm64/Autounattend.xml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6864185e1..783a4d1ed 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.*,macos-*' + + 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 @@ -85,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 033202112..111cbeb33 100644 --- a/.github/workflows/pkr-bld-amazonlinux-x64.yml +++ b/.github/workflows/pkr-bld-amazonlinux-x64.yml @@ -4,51 +4,65 @@ 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 + with: + version: 24.2.1058 + - 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" + export LOGNAME=$USER + ./${{ 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)" + export LOGNAME=$USER + bento test diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index bfb2cb1d5..4c2121d7c 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -4,70 +4,70 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + # 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 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - hyperv-iso steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability + - 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: | + chef shell-init powershell + gem build bento.gemspec + gem install bento-*.gem + - name: Create VM Switch for Hyper-V 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 + 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 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 - 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() - 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 + 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: name: "${{ matrix.os }}-hyperv-x86_64" path: | builds/*.box + 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 475684809..be31c1e6c 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: @@ -14,53 +15,37 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - parallels-iso 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 +60,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 ad314d708..a2836e92b 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: @@ -14,56 +15,36 @@ jobs: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - parallels-iso 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: | @@ -78,6 +59,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 84f662037..0213abdd6 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -4,68 +4,75 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, qemu] + 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 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - qemu 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 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: + 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 81939a74b..729343d38 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -4,73 +4,87 @@ 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: os: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - qemu 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 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 + - 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 + 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)" - 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 4388429b6..f1e9450d9 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -4,76 +4,72 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + # PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, virtualbox] + 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 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - virtualbox-iso 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 update + brew install --cask hashicorp/tap/hashicorp-vagrant + 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: + 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 173c381b8..e1d52132a 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -3,80 +3,81 @@ on: workflow_call: env: - PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + 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: - almalinux-8 - almalinux-9 - - centos-7 - - centos-stream-8 - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - virtualbox-iso 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 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 + - 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)" - 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)" + 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 - 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)" + export LOGNAME=$USER + bento test diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index f5cedfc32..e4f0a66fa 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -4,76 +4,180 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + # 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 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - vmware-iso 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 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: + # = : + #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)" - 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 - 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 + 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 }}-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 1b37b9abc..97dc27ff3 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -4,79 +4,180 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + # 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 - - fedora-38 - fedora-39 - - freebsd-12 + - fedora-40 - freebsd-13 + - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - - scientificlinux-7 - - springdalelinux-7 - - springdalelinux-8 - - springdalelinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.04 + - ubuntu-24.04 provider: - vmware-iso 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 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: + # = : + #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)" - 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 - 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 + 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 }}-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/.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/.gitignore b/.gitignore index 175b1f75c..b85965350 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,11 @@ **/builds/ *.iso *.box +*.ova *.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 . 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 and . +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 395fa9c4d..3fd6532b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,60 +5,153 @@ ***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 | +| os | 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 | | | | | | | +| amazonlinux-2 | | | | | | x | | | | +| amazonlinux-2023 | | | | | | x | | | | +| centos-stream-9 | | x | | | | x | | x | 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 | +| 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 | x | +| oraclelinux-8 | | | | | | x | | x | | +| oraclelinux-9 | | x | x | | | x | | x | x | | 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 | +| sles-15 | 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 | +| ubuntu-20.04 | | | x | | | x | | x | x | +| ubuntu-22.04 | | 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 | +| windows-2019 | | x | na | | na | x | na | x | na | | windows-2022 | | x | na | | na | x | na | | na | ### 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 -- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2023-09-15) +## [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 +- 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) + +- 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) + +- 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) + +- 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) + +- 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) + +- 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) + +- 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 +- 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) @@ -76,6 +169,7 @@ Markdown table generated at - 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 da579c5c5..5d25ec903 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ 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 @@ -23,21 +25,31 @@ Vagrant.configure("2") do |config| end ``` +### Installing Bento + +1. install ruby environment +1. clone repo +1. cd /bento +1. gem build bento.gemspec +1. gem install bento-*.gem + ### Building Boxes #### 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](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/) * + - [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. -***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 @@ -133,13 +145,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 @@ -195,7 +208,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/AMZ_build_virtualbox-ovf.sh b/amazonlinux-2-x86_64-virtualbox-build.sh similarity index 59% rename from AMZ_build_virtualbox-ovf.sh rename to amazonlinux-2-x86_64-virtualbox-build.sh index d935dc3c9..213346346 100755 --- a/AMZ_build_virtualbox-ovf.sh +++ b/amazonlinux-2-x86_64-virtualbox-build.sh @@ -5,17 +5,17 @@ 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)" # 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 @@ -24,7 +24,17 @@ 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 +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" +if [ -x "$(command -v genisoimage)" ]; then + 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 "$SEED_ISO_DIR"/ +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ +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 +46,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 --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,20 +58,20 @@ 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 --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 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 -rf "$AMZDIR" else exit 1 fi diff --git a/amazonlinux-2023-aarch64-virtualbox-build.sh b/amazonlinux-2023-aarch64-virtualbox-build.sh new file mode 100755 index 000000000..0fcc85a1e --- /dev/null +++ b/amazonlinux-2023-aarch64-virtualbox-build.sh @@ -0,0 +1,86 @@ +#!/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)/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 + +# 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" +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" +if [ -x "$(command -v genisoimage)" ]; then + 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 "$SEED_ISO_DIR"/ +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ +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 +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 --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 +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 --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 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 -rf "$AMZDIR" +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..ae3f612c1 --- /dev/null +++ b/amazonlinux-2023-x86_64-virtualbox-build.sh @@ -0,0 +1,84 @@ +#!/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)/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 + +# 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" +SEED_ISO_DIR="$(pwd)/packer_templates/http/amazon" +if [ -x "$(command -v genisoimage)" ]; then + 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 "$SEED_ISO_DIR"/ +elif [ -x "$(command -v mkisofs)" ]; then + mkfsiso9660 -o "$AMZDIR"/seed.iso "$SEED_ISO_DIR"/ +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 +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 --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 +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 --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 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 -rf "$AMZDIR" +else + exit 1 +fi diff --git a/bento.gemspec b/bento.gemspec index 690638410..e90d43c4f 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' diff --git a/builds.yml b/builds.yml index 34ba53df2..665696e27 100644 --- a/builds.yml +++ b/builds.yml @@ -1,91 +1,47 @@ --- vagrant_cloud_account: 'bento' +default_architectures: + - x86_64 + - amd64 + public: - - 'almalinux-8' - - 'almalinux-9' - - 'amazon-2' - - 'amazon-2023' - - 'centos-7' - - 'centos-stream-8' - - 'centos-stream-9' - - 'debian-11' - - 'debian-12' - - 'fedora-38' - - 'fedora-39' - - 'freebsd-12' - - 'freebsd-13' - - 'opensuse-leap-15' - - 'oracle-7' - - 'oracle-8' - - 'oracle-9' - - 'rockylinux-8' - - 'rockylinux-9' - - 'scientific-7' - - 'springdalelinux-7' - - 'springdalelinux-8' - - 'springdalelinux-9' - - 'ubuntu-20.04' - - 'ubuntu-22.04' - - 'ubuntu-23.04' - - '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-12-arm64' - - 'freebsd-13-arm64' - - 'opensuse-leap-15-arm64' - - 'oracle-7-arm64' - - 'oracle-8-arm64' - - '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' + - amazonlinux-2 + - amazonlinux-2023 + - 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 -# 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-38' - 'freebsd-12': 'freebsd-12' - 'freebsd-13': 'freebsd-13' - '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' - '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' - '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' + - almalinux-8 + - almalinux-9 + - centos-7 + - debian-12 + - debian-11 + - fedora-latest + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oraclelinux-8 + - oraclelinux-9 + - rockylinux-8 + - rockylinux-9 + - macos-14 do_not_build: - amazon @@ -102,6 +58,4 @@ do_not_build: # - opensuse-leap # - oracle # - rockylinux -# - scientificlinux -# - springdalelinux # - ubuntu diff --git a/builds/build_files/.gitkeep b/builds/build_files/.gitkeep new file mode 100644 index 000000000..e69de29bb 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/buildmetadata.rb b/lib/bento/buildmetadata.rb index ecbba79d5..5b9c61341 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('-').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 bd3301287..696dd5c7d 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -6,14 +6,20 @@ require 'bento/normalize' require 'bento/test' require 'bento/upload' +require 'bento/version' 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 @@ -28,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 @@ -42,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] } @@ -54,6 +65,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| @@ -67,6 +85,10 @@ def self.parse(args) options.metadata_only = opt end + 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 + 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 @@ -75,15 +97,11 @@ 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 - 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 @@ -91,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 @@ -107,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 @@ -151,7 +169,7 @@ def self.parse(args) options.provisioner = opt end end, - argv: proc {}, + argv: test_argv_proc, }, upload: { class: UploadRunner, @@ -192,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 a6c6ddf8c..8b3b9a63d 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'] @@ -74,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 f1f170046..b705918d9 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,7 +17,8 @@ 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' + @on_error = opts.on_error ||= nil + @only = opts.only ||= nil @except = opts.except @mirror = opts.mirror @headed = opts.headed ||= false @@ -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 @@ -64,8 +65,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 @@ -87,14 +88,15 @@ 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 '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 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 b4a572f56..5bdbc4952 100644 --- a/lib/bento/test.rb +++ b/lib/bento/test.rb @@ -5,24 +5,33 @@ 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, :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 end end banner("Testing finished in #{duration(time.real)}.") + if errors.empty? + banner('All tests passed.') + else + raise("Failed Tests:\n#{errors.join("\n")}\nexited #{$CHILD_STATUS}") + end end private @@ -45,8 +54,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['arch'].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 +76,33 @@ 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! + if regx + test = Mixlib::ShellOut.new("kitchen test #{regx.tr('.', '').tr('_', '-')}", timeout: 900, live_stream: STDOUT) + test.run_command + if test.error? + 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/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 b78c228db..7a79d6dcb 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'])}" + 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}...") - 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'])}" + 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 @@ -68,11 +74,16 @@ 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| - 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') + 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 @@ -81,22 +92,24 @@ def lookup_slug(name) def public_private_box(name) builds_yml['public'].each do |public| - if name.include?('arm64') - 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 - return '--private' + def default_arch(architecture) + builds_yml['default_architectures'].each do |arch| + return '--default-architecture' if architecture.eql?(arch) end + '--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) @@ -115,6 +128,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 Progress Chef. Built with: #{tool_versions.join(', ')}" end end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 643cd2b80..cb7e9b360 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.2.0'.freeze + VERSION = '4.1.2'.freeze end diff --git a/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-8-aarch64.pkrvars.hcl index 1e576d376..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.8" +os_version = "8.10" 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.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 3ca1bb569..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.8" +os_version = "8.10" 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.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" diff --git a/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl b/os_pkrvars/almalinux/almalinux-9-aarch64.pkrvars.hcl index 1052b8951..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.2" +os_version = "9.4" 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.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 722d23ee1..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.2" +os_version = "9.4" 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.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/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..812d44045 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" +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" 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 deleted file mode 100644 index 2c4fbc7eb..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 = "1bef71329e51f9bed12349aa026b3fe0c4bb27db729399a3f9addae22848da9b" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" -boot_command = ["e text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg x"] 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 867d24baf..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 = "07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a" -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/centos/centos-stream-8-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl deleted file mode 100644 index 20fb10372..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-centos-64" -boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg x"] 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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg"] 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 = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg x"] diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index cf5dfbab2..e06e354f1 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "debian" -os_version = "11.7" +os_version = "11.9" 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.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" -vmware_guest_os_type = "arm-debian-64" +vmware_guest_os_type = "arm-debian11-64" boot_command = ["einstall preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg debian-installer=en_US.UTF-8 auto locale=en_US.UTF-8 kbd-chooser/method=us keyboard-configuration/xkb-keymap=us netcfg/get_hostname={{ .Name }} netcfg/get_domain=vagrantup.com fb=false debconf/frontend=noninteractive console-setup/ask_detect=false console-keymaps-at/keymap=us grub-installer/bootdev=/dev/sda "] diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index 989e2875e..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.7" +os_version = "11.9" 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.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 a09a8ca52..40280c58e 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "debian" -os_version = "12.1" +os_version = "12.7" 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.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-debian-64" +vmware_guest_os_type = "arm-debian12-64" boot_command = ["einstall preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg debian-installer=en_US.UTF-8 auto locale=en_US.UTF-8 kbd-chooser/method=us keyboard-configuration/xkb-keymap=us netcfg/get_hostname={{ .Name }} netcfg/get_domain=vagrantup.com fb=false debconf/frontend=noninteractive console-setup/ask_detect=false console-keymaps-at/keymap=us grub-installer/bootdev=/dev/sda "] diff --git a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl index 27a47e5d1..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.1" +os_version = "12.7" 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.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" 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 = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/fedora/ks.cfg"] \ No newline at end of file +boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/fedora/ks.cfg"] 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/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/freebsd/freebsd-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl index 6c8ec883a..d981c6986 100644 --- a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "freebsd" -os_version = "13.2" -os_arch = "x86_64" -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" +os_version = "13.3" +os_arch = "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" +vmware_guest_os_type = "arm-freebsd13-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-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" diff --git a/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl similarity index 54% rename from os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl rename to os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl index b79ee2f48..d09fcb69a 100644 --- a/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "freebsd" -os_version = "12.4" +os_version = "14.1" 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" +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-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"] +vmware_guest_os_type = "arm-freebsd14-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..d01d5138b --- /dev/null +++ b/os_pkrvars/freebsd/freebsd-14-x86_64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "freebsd" +os_version = "14.1" +os_arch = "x86_64" +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" +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/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. + "", + # Select Language English (US) + "", + # Select Your Country and Region + "", + # Written and Spoken Languages + "", + # Accessibility + "", + # Data & Privacy + "", + # Migration Assistant + "", + # Sign In with Your Apple ID + "", + # Are you sure you want to skip signing in with an Apple ID? + "", + # Terms and Conditions + "", + # I have read and agree to the macOS Software License Agreement + "", + # Create a Computer Account + "vagrantvagrantvagrant", + # Enable Location Services + "", + # Are you sure you don't want to use Location Services? + "", + # Select Your Time Zone + "UTC", + # Analytics + "", + # Screen Time + "", + # Siri + "", + # Choose Your Look + "", + # Enable keyboard navigation + "", + # Open System Settings + "SystemSettings", + # Enable Remote Management + "", + "", + # Enable Remote Login + "", + # Close System Preferences + "q", + # Disable keyboard navigation + "", + # Open Terminal + "terminal", + # Add vagrant user to sudoers + "echo 'vagrant' | sudo -S sh -c 'echo \"vagrant ALL=(ALL) NOPASSWD: ALL\" > /etc/sudoers.d/vagrant'", + # Set Auto login for vagrant + "sudo sysadminctl -autologin set -userName vagrant -password vagrant", + # Disable screen lock + "sudo sysadminctl -screenLock off -password vagrant", + # Install Parallels Tools + "sudo installer -pkg /Volumes/Parallels\\ Tools/Install.app/Contents/Resources/Install.mpkg -target /", + # Reboot + "sudo shutdown -r +15s", + "exit", + "q" +] diff --git a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl index ae1d00738..fbd8b25d4 100644 --- a/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl +++ b/os_pkrvars/opensuse/opensuse-leap-15-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ -os_name = "opensuse" -os_version = "15.5" +os_name = "opensuse-leap" +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-opensuse-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e 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"] 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..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" -os_version = "15.5" +os_name = "opensuse-leap" +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/oracle/oracle-7-aarch64.pkrvars.hcl b/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl deleted file mode 100644 index ec6471c14..000000000 --- a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "oracle" -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-centos-64" -boot_command = ["e text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg x"] diff --git a/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl b/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl deleted file mode 100644 index 49a1a6f40..000000000 --- a/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl +++ /dev/null @@ -1,9 +0,0 @@ -os_name = "oracle" -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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg"] diff --git a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl similarity index 53% rename from os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl index f95e9f8f7..5ca97bd82 100644 --- a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ -os_name = "oracle" -os_version = "8.8" +os_name = "oraclelinux" +os_version = "8.10" 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/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-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg x"] diff --git a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl similarity index 58% rename from os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl index 3768bb278..7fa3b597f 100644 --- a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ -os_name = "oracle" -os_version = "8.8" +os_name = "oraclelinux" +os_version = "8.10" 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/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/oracle/oracle-9-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl similarity index 54% rename from os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl index 606a8d3cf..0325a8108 100644 --- a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ -os_name = "oracle" -os_version = "9.2" +os_name = "oraclelinux" +os_version = "9.4" 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/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-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg x"] diff --git a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl similarity index 58% rename from os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl index 9bb6e5078..221a8564d 100644 --- a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ -os_name = "oracle" -os_version = "9.2" +os_name = "oraclelinux" +os_version = "9.4" 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/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 a6c26ef33..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-centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg"] 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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg"] diff --git a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl index 03b29e385..273648ca3 100644 --- a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "rhel" -os_version = "8.8" +os_version = "8.10" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" 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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg"] diff --git a/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-8-x86_64.pkrvars.hcl index 29168e5db..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.8" +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/rhel/rhel-9-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl index 7223a554a..cde337d59 100644 --- a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "rhel" -os_version = "9.2" +os_version = "9.4" os_arch = "aarch64" iso_url = "https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux" 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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg"] diff --git a/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-x86_64.pkrvars.hcl index 434e0c5f8..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.2" +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-8-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl index 5a8e84ba1..157d97c79 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "rockylinux" -os_version = "8.8" +os_version = "8.10" 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.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" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg x"] diff --git a/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-x86_64.pkrvars.hcl index 97dbf6978..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.8" +os_version = "8.10" 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.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" diff --git a/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-9-aarch64.pkrvars.hcl index 016152923..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.2" +os_version = "9.4" 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.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 c2080690f..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.2" +os_version = "9.4" 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.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/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..bf705c990 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 = "b0920189fd7f2624983a9cf8bc062bbb7a8557658e3feadde77b80e72f66b6ef" 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-22.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl index 35e379886..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.3-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 7475a60a4..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.3-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" diff --git a/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl similarity index 69% rename from os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl index a4d080aeb..370ecaf15 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.04" +os_version = "24.04" 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/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" 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-24.04-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-24.04-x86_64.pkrvars.hcl index b63e4dd21..57924fc2c 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.04-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.04" +os_version = "24.04" 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/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" vmware_guest_os_type = "ubuntu-64" 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 = ["e autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/"] 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 = ["e autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/"] 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/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/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_seed_iso/user-data b/packer_templates/amz_seed_iso/user-data deleted file mode 100644 index 222eb4e59..000000000 --- a/packer_templates/amz_seed_iso/user-data +++ /dev/null @@ -1,29 +0,0 @@ -#cloud-config -#vim:syntax=yaml -user: vagrant -password: vagrant - -# 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 -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 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/http/amazon/user-data b/packer_templates/http/amazon/user-data new file mode 100644 index 000000000..078342858 --- /dev/null +++ b/packer_templates/http/amazon/user-data @@ -0,0 +1,15 @@ +#cloud-config +#vim:syntax=yaml +users: + - name: vagrant + lock_passwd: false + passwd: $6$TbOu26d1hYO4EC/D$MymO7cTo/tID7tkH8TtAGyAdaK9nHwGQfDD9KwQmql3xP1BPPc67YCmoR8UO3Dw5jacOx3GvnBLqvAmHLHC4H0 + sudo: ALL=(ALL) NOPASSWD:ALL + +# Enable password authentication for SSH +write_files: + - path: /etc/cloud/cloud.cfg.d/90_enable_ssh_pwauth.cfg + content: | + runcmd: + - sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/" /etc/ssh/sshd_config + - systemctl restart sshd 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 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 df9c1b033..c8d22760d 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,7 +13,17 @@ 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 + - | + 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 74165e7c6..95961e14a 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -6,11 +6,11 @@ packer { source = "github.com/hashicorp/hyperv" } parallels = { - version = ">= 1.0.2" + version = ">= 1.1.6" source = "github.com/parallels/parallels" } qemu = { - version = ">= 1.0.8" + version = ">= 1.1.0" source = "github.com/hashicorp/qemu" } vagrant = { @@ -68,98 +68,103 @@ locals { "${path.root}/scripts/solaris/vmtools_solaris.sh", "${path.root}/scripts/solaris/minimize_solaris.sh" ] : ( - 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" || - 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}-${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" ? [ - "${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" ? [ + "${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" + ] + ) ) ) ) @@ -239,8 +244,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-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 9dafa9856..4c31488e3 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 @@ -20,26 +20,39 @@ locals { var.is_windows ? "attach" : "upload" ) : var.parallels_tools_mode parallels_prlctl = var.parallels_prlctl == null ? ( - var.is_windows ? [ - ["set", "{{ .Name }}", "--efi-boot", "off"] - ] : [ + 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 - 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 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/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/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=${var.qemu_format},index=1"], ] : ( var.os_arch == "aarch64" ? [ ["-boot", "strict=off"] + # ["-cpu", "host"], + # ["-monitor", "stdio"] ] : null ) ) : var.qemuargs @@ -55,11 +68,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" @@ -70,35 +78,45 @@ 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 ? ( 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 - 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 ? ( @@ -139,6 +157,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 @@ -171,11 +215,18 @@ 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 = 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 @@ -203,6 +254,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 @@ -237,10 +289,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 1ba744623..5a6354105 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", @@ -75,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 @@ -116,8 +142,48 @@ variable "qemu_boot_wait" { default = null } variable "qemu_display" { + 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 + 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 = "none" + 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" { type = string @@ -185,9 +251,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,11 +292,12 @@ variable "vmware_tools_upload_path" { } variable "vmware_version" { type = number - default = 20 + default = 21 } variable "vmware_vmx_data" { type = map(string) default = { + # "firmware" = "efi" "cpuid.coresPerSocket" = "2" "ethernet0.pciSlotNumber" = "32" "svga.autodetect" = true @@ -323,7 +396,7 @@ variable "ssh_port" { } variable "ssh_timeout" { type = string - default = "30m" + default = "15m" } variable "ssh_username" { 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/_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 </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 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 diff --git a/packer_templates/scripts/rhel/cleanup_yum.sh b/packer_templates/scripts/rhel/cleanup_yum.sh index 077319234..22cf50b4d 100644 --- a/packer_templates/scripts/rhel/cleanup_yum.sh +++ b/packer_templates/scripts/rhel/cleanup_yum.sh @@ -19,8 +19,11 @@ 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 +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 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 \ 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 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>