diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 10a648f83..3d16bdca9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -27,14 +27,16 @@ jobs: # # powershell-lint: # uses: chef/github-workflows/.github/workflows/powershell-lint.yml@main - - pkr-bld-hyper-v-x64: - uses: ./.github/workflows/test-pkr-bld-hyperv-x64.yml - secrets: inherit - pkr-bld-parallels-x64: - uses: ./.github/workflows/test-pkr-bld-parallels-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 @@ -84,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 @@ -92,3 +95,10 @@ jobs: # allowed-failures: # allowed-skips: ${{ toJSON(needs) }} # jobs: ${{ toJSON(needs) }} + + pkr-bld-hyper-v-x64: + uses: ./.github/workflows/test-pkr-bld-hyperv-x64.yml + secrets: inherit + pkr-bld-parallels-x64: + uses: ./.github/workflows/test-pkr-bld-parallels-x64.yml + secrets: inherit diff --git a/.github/workflows/old/pkr-bld-amazonlinux-x64.yml b/.github/workflows/old/pkr-bld-amazonlinux-x64.yml index 033202112..e12c54d14 100644 --- a/.github/workflows/old/pkr-bld-amazonlinux-x64.yml +++ b/.github/workflows/old/pkr-bld-amazonlinux-x64.yml @@ -4,51 +4,61 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, virtualbox] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: os: - amazonlinux-2 + - amazonlinux-2023 steps: + - name: Install Vagrant and VirtualBox + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 qemu-utils genisoimage + VBoxManage --version + vagrant --version + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest - name: Checkout uses: actions/checkout@main -# - name: Setup Packer -# uses: hashicorp/setup-packer@main -# with: -# version: latest - - name: Packer Init - run: packer init -upgrade packer_templates - - name: Packer FMT - run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi - - name: Packer Validate - run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem - name: Bento build run: | + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ eval "$(chef shell-init bash)" - ./AMZ_build_virtualbox-ovf.sh - bento build --metadata_only os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ./${{ matrix.os }}-x86_64-virtualbox-build.sh ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() - run: | - echo Powering off and deleting any existing VMs named AmazonLinuxBento - VBoxManage controlvm AmazonLinuxBento poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm AmazonLinuxBento --delete 2> /dev/null - sleep 2 + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-hyperv-x64.yml b/.github/workflows/old/pkr-bld-hyperv-x64.yml index fae3953c8..7002d7f76 100644 --- a/.github/workflows/old/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/old/pkr-bld-hyperv-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -24,33 +25,24 @@ jobs: - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - ubuntu-24.04 provider: - hyperv-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: packer fmt -check -recursive . - - name: Packer Validate - run: packer validate -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - - name: Packer build + - name: Bento build run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates - name: Remove VM in case of canceled job if: cancelled() @@ -66,4 +58,6 @@ jobs: name: "${{ matrix.os }}-hyperv-x86_64" path: | builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression diff --git a/.github/workflows/old/pkr-bld-parallels-arm64.yml b/.github/workflows/old/pkr-bld-parallels-arm64.yml index 08ec7d8ab..6934da07f 100644 --- a/.github/workflows/old/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/old/pkr-bld-parallels-arm64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: @@ -19,48 +20,35 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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 +63,11 @@ jobs: with: name: "${{ matrix.os }}-parallels-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-parallels-x64.yml b/.github/workflows/old/pkr-bld-parallels-x64.yml index 1b9d1d3e2..9af99ba4c 100644 --- a/.github/workflows/old/pkr-bld-parallels-x64.yml +++ b/.github/workflows/old/pkr-bld-parallels-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -19,47 +20,34 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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: | @@ -74,6 +62,11 @@ jobs: with: name: "${{ matrix.os }}-parallels-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-qemu-arm64.yml b/.github/workflows/old/pkr-bld-qemu-arm64.yml index 69e50b286..944f8c95f 100644 --- a/.github/workflows/old/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/old/pkr-bld-qemu-arm64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, qemu] + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -19,53 +20,58 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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 install qemu libvirt + brew tap hashicorp/tap + brew install --cask hashicorp/tap/hashicorp-vagrant + brew services start libvirt + vagrant plugin install vagrant-libvirt vagrant-qemu + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento + run: | + eval "$(chef shell-init bash)" + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@v3 with: name: "${{ matrix.os }}-qemu-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test libvirt diff --git a/.github/workflows/old/pkr-bld-qemu-x64.yml b/.github/workflows/old/pkr-bld-qemu-x64.yml index b5fbc75bd..5bb0eee9b 100644 --- a/.github/workflows/old/pkr-bld-qemu-x64.yml +++ b/.github/workflows/old/pkr-bld-qemu-x64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, qemu] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -19,54 +20,73 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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 and kvm + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant qemu-kvm libvirt-daemon-system virtinst libvirt-clients bridge-utils qemu-utils libvirt-dev + vagrant plugin install vagrant-libvirt vagrant-qemu + vagrant --version + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + sudo usermod -aG kvm $USER + sudo usermod -aG libvirt $USER + sudo chmod o+rw /var/run/libvirt/libvirt-sock + sudo systemctl start libvirtd + sudo systemctl status libvirtd + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build + run: | + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=kvm" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-qemu-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test libvirt diff --git a/.github/workflows/old/pkr-bld-virtualbox-arm64.yml b/.github/workflows/old/pkr-bld-virtualbox-arm64.yml index 5a5057700..d649e759c 100644 --- a/.github/workflows/old/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/old/pkr-bld-virtualbox-arm64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: - runs-on: [self-hosted, ARM64, virtualbox] + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -19,61 +20,58 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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 install --cask hashicorp/tap/hashicorp-vagrant + wget -q https://www.virtualbox.org/download/testcase/VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg + hdiutil attach VirtualBox-7.0.15_BETA4-162549-macOSArm64.dmg + sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target / + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64 - VBoxManage controlvm ${{ matrix.os }}*-aarch64 poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm ${{ matrix.os }}*-aarch64 --delete 2> /dev/null - sleep 2 + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-virtualbox-x64.yml b/.github/workflows/old/pkr-bld-virtualbox-x64.yml index e3d29389e..2aafba2ae 100644 --- a/.github/workflows/old/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/old/pkr-bld-virtualbox-x64.yml @@ -4,10 +4,11 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: - runs-on: [self-hosted, X64, virtualbox] + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -19,60 +20,65 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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 and VirtualBox + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt-get update + sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 + VBoxManage --version + vagrant --version + - name: Install Chef + uses: actionshub/chef-install@3.0.0 + - name: Setup Packer + uses: hashicorp/setup-packer@main + with: + version: latest + - name: Install Bento run: | eval "$(chef shell-init bash)" - bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test - - name: Remove VM in case of canceled job - if: cancelled() + gem build bento.gemspec + gem install bento-*.gem + - name: Bento build run: | - echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64 - VBoxManage controlvm ${{ matrix.os }}*-amd64 poweroff --type headless 2> /dev/null - sleep 1 - VBoxManage unregistervm ${{ matrix.os }}*-amd64 --delete 2> /dev/null - sleep 2 + rm -rf builds + sudo mkdir -p /mnt/builds/iso + sudo chmod -R 777 /mnt/builds + sudo ln -s /mnt/builds ./ + eval "$(chef shell-init bash)" + bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Upload build artifact uses: actions/upload-artifact@main with: name: "${{ matrix.os }}-virtualbox-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-vmware-arm64.yml b/.github/workflows/old/pkr-bld-vmware-arm64.yml index dcfd9e484..567e56ccd 100644 --- a/.github/workflows/old/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/old/pkr-bld-vmware-arm64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: aarch64: @@ -19,48 +20,35 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-aarch64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -74,6 +62,11 @@ jobs: with: name: "${{ matrix.os }}-vmware-aarch64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/old/pkr-bld-vmware-x64.yml b/.github/workflows/old/pkr-bld-vmware-x64.yml index 0e8b489d4..71a95f361 100644 --- a/.github/workflows/old/pkr-bld-vmware-x64.yml +++ b/.github/workflows/old/pkr-bld-vmware-x64.yml @@ -4,6 +4,7 @@ on: env: PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PACKER_LOG: "1" jobs: x86_64: @@ -19,47 +20,34 @@ jobs: - centos-stream-9 - debian-11 - debian-12 - - fedora-38 - fedora-39 + - fedora-40 - freebsd-13 - freebsd-14 - opensuse-leap-15 - - oracle-7 - - oracle-8 - - oracle-9 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 - rockylinux-8 - rockylinux-9 - ubuntu-20.04 - ubuntu-22.04 - - ubuntu-23.10 + - 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: Bento build run: | eval "$(chef shell-init bash)" bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" - ls -alh builds -# - name: Bento Test -# run: | -# eval "$(chef shell-init bash)" -# bento test + ls -alh builds/ + cat builds/${{ matrix.os }}*-x86_64._metadata.json - name: Remove VM in case of canceled job if: cancelled() run: | @@ -73,6 +61,11 @@ jobs: with: name: "${{ matrix.os }}-vmware-x86_64" path: | - builds - !builds/uploaded/* + builds/*.box + builds/*.json retention-days: 10 + compression-level: 0 # no compression + - name: Bento Test + run: | + eval "$(chef shell-init bash)" + bento test diff --git a/.github/workflows/test-pkr-bld-parallels-x64.yml b/.github/workflows/test-pkr-bld-parallels-x64.yml index 38916a5db..01f5fd069 100644 --- a/.github/workflows/test-pkr-bld-parallels-x64.yml +++ b/.github/workflows/test-pkr-bld-parallels-x64.yml @@ -7,7 +7,7 @@ env: jobs: x86_64: - runs-on: ubuntu-latest + runs-on: macos-13 strategy: fail-fast: false matrix: @@ -38,9 +38,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@main - - name: iso-availability - shell: pwsh - run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"') - name: Install Virtualization Software run: | brew install qemu libvirt 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 da48662fa..1a3583a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,41 +5,42 @@ ***Note:** Markdown table generated at -| | hyperv
x86_64 | parallels
x86_64 | parallels
aarch64 | qemu
x86_64 | qemu
aarch64 | virtualbox
x86_64 | virtualbox
aarch64 | vmware
x86_64 | vmware
aarch64 | -|:-----------------:|:---:|:---:|:--------------------:|:---:|:---:|:---:|:---:|:---:|:---:| -| almalinux-8 | | x | | x | | x | | x | | -| almalinux-9 | | x | x | | | x | | x | x | -| amazonlinux-2 | | na | na | | | | na | | na | -| amazonlinux-2023 | na | na | na | na | na | na | na | na | na | -| centos-7 | | x | | x | | x | | x | | -| centos-stream-8 | | x | | x | | x | | x | | -| centos-stream-9 | | | x | | | | | | | -| debian-11 | | x | x | | | x | | x | | -| debian-12 | | x | x | | | x | | x | x | -| fedora-38 | | x | | x | | x | | x | x | -| fedora-39 | | | | | | | | | | -| freebsd-12 | | | | | | x | | x | | -| freebsd-13 | | | | | | x | | x | | -| opensuse-leap-15 | | x | | x | | x | | x | | -| oraclelinux-7 | | x | | x | | x | | x | | -| oraclelinux-8 | | | | x | | x | | x | | -| oraclelinux-9 | | x | x | | | x | | x | | -| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | -| rockylinux-8 | | x | | x | | x | | x | | -| rockylinux-9 | | x | | | | x | | x | x | -| sles-12 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| sles-13 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| solaris-11 | license
needed | license
needed | na | license
needed | na | license
needed | na | license
needed | na | -| ubuntu-20.04 | | x | x | | | x | | x | x | -| ubuntu-22.04 | | x | | x | | x | | x | | -| ubuntu-23.10 | | | | | | | | | | -| windows-10 | | x | na | | na | x | na | | na | -| windows-11 | | x | na | | na | x | na | | na | -| windows-2016 | | x | na | | na | x | na | | na | -| windows-2019 | | x | na | | na | x | na | | na | -| windows-2022 | | x | na | | na | x | na | | na | +| 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 | | +| almalinux-9 | | x | | | | x | | x | x | +| amazonlinux-2 | | | | | | x | | | | +| amazonlinux-2023 | | | | | | x | | | | +| centos-7 | | | | | | x | | x | | +| centos-stream-8 | | x | | | | x | | x | | +| centos-stream-9 | | x | | | | x | | x | x | +| debian-11 | | x | x | | | x | | x | | +| debian-12 | | x | x | | | x | | x | x | +| fedora-39 | | x | x | | | x | | x | x | +| fedora-40 | | | | | | | | | | +| freebsd-13 | | | | | | x | | x | x | +| freebsd-14 | | | | | | | | | | +| macos | | | x | | | | | | | +| opensuse-leap-15 | | | | | | x | | x | x | +| oraclelinux-7 | | x | | | | x | | x | | +| oraclelinux-8 | | | | | | x | | x | | +| oraclelinux-9 | | x | x | | | x | | x | x | +| rhel-7 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-8 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rhel-9 | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | license
needed | +| rockylinux-8 | | x | | | | x | | x | | +| rockylinux-9 | | x | | | | x | | x | x | +| sles-12 | 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 | +| ubuntu-20.04 | | | x | | | x | | x | x | +| ubuntu-22.04 | | x | | | | x | | | | +| ubuntu-24.04 | | x | x | | | x | | x | x | +| windows-10 | | | na | | na | x | na | | na | +| windows-11 | | x | x | | | x | | x | | +| windows-2016 | | x | na | | na | x | na | x | na | +| windows-2019 | | x | na | | na | x | na | x | na | +| windows-2022 | | x | na | | na | x | na | | na | ### Todo @@ -52,9 +53,67 @@ Markdown table generated at - Look into making all build uefi default builds - Create CD pipeline to upload vagrant boxes after PR is merged - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches -- Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-02-01) +## [unreleased] (2024-04-26) + +## [v4.1.1] (2024-04-26) + +- Require ruby >= 3.0.0 +- Add parallels-ipsw source +- Added MacOS template for parallels-ipsw +- Created MacOS scripts +- Adjusted build flags to all be lower case for consistency +- Removed extra amazonlinux directories to be more consistent with other builds +- Added build_files directory for all temp files to be stored in during packer building +- Opensuse-leap-15.5 updated to 15.6 +- Remove Fedora 38 and add 40 builds +- Remove Ubuntu 23.10 and add 24.04 builds + +## [v4.1.0] (2024-04-11) + +- 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) @@ -94,6 +153,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 5daaa8919..d34eb2a4e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Bento is a project that encapsulates [Packer](https://www.packer.io/) templates ***NOTE:** +- Vagrant 2.4.0+ is required for new cpu architecture support - Virutalbox 6.x requires disabling nat config that allows vbox 7.x guests to connect to the host. To use comment out lines #161 and #162 in bento/packer_templates/pkr-variables.pkr.hcl or add variable `vboxmanage = []` to os_pkrvars files. - When running packer build command the output directory is relative to the working directory the command is currently running in. Suggest running packer build commands from bento root directory for build working files to be placed in bento/builds/(build_name) directory by default. If the output_directory variable isn't overwritten a directory called builds/(build_name) will be created in the current working directory that you are running the command from @@ -23,22 +24,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 Pro](https://www.parallels.com/products/desktop/)*2 also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versions < 19.x - - [qemu](https://www.qemu.org/) *1 - - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) *1 + - [VirtualBox](https://www.virtualbox.org/)*2 + - [VMware Fusion](https://www.vmware.com/products/fusion.html)*2 + - [VMware Workstation](https://www.vmware.com/products/workstation-pro.html)*2 + - [Parallels Desktop Pro](https://www.parallels.com/products/desktop/) also requires [Parallels Virtualization SDK](https://www.parallels.com/products/desktop/download/) for versions < 19.x + - [qemu](https://www.qemu.org/) *1 *2 + - [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/) *1 *2 + +*1 **NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. -*1**NOTE:** support for these providers is considered experimental and corresponding Vagrant Cloud images may or may not exist. -*2**NOTE:** AARCH64 or ARM64 support is only guaranteed through parallels provider. +*2 **NOTE:** AARCH64 or ARM64 support is a work in progress only guaranteed through parallels and vmware provider. ### Using `bento` executable @@ -134,13 +144,14 @@ If the build is successful, your box files will be in the `builds` directory at ### KVM/qemu support for Windows -You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso). You can do this from the command line: `wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O virtio-win.iso` and place it in the packer_templates/win_answer_files/ directory. +You must download [the iso image with the Windows drivers for paravirtualized KVM/qemu hardware](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso) and place it in the builds/iso/ directory. +You can do this from the command line: `mkdir -p builds/iso/; wget -nv -nc https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso -O builds/iso/virtio-win.iso` You can use the following sample command to build a KVM/qemu Windows box: ```bash packer init -upgrade ./packer_templates -packer build --only=qemu.vm -var-file=os_pkrvars/windwos/windows-2022-x86_64.pkrvars.hcl ./packer_templates +packer build --only=qemu.vm -var-file=os_pkrvars/windows/windows-2022-x86_64.pkrvars.hcl ./packer_templates ``` ### Proprietary Templates @@ -196,7 +207,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 60% rename from AMZ_build_virtualbox-ovf.sh rename to amazonlinux-2-x86_64-virtualbox-build.sh index d935dc3c9..b7d8e0775 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 -f "$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..bdb1a01e0 --- /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 -f "$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..da6d3d097 --- /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 -f "$AMZDIR" +else + exit 1 +fi diff --git a/bento.gemspec b/bento.gemspec index 690638410..23dfd1fd0 100644 --- a/bento.gemspec +++ b/bento.gemspec @@ -11,9 +11,11 @@ Gem::Specification.new do |s| s.email = 'oss@chef.io' s.homepage = 'https://github.com/chef/bento/' - s.required_ruby_version = '>= 2.6' + s.required_ruby_version = '>= 3.0' s.add_dependency 'mixlib-shellout', '>= 2.3.2' + s.add_dependency 'test-kitchen' + s.add_dependency 'kitchen-vagrant' s.bindir = 'bin' s.executables = %w(bento) diff --git a/builds.yml b/builds.yml index a429f96e8..373d0b86d 100644 --- a/builds.yml +++ b/builds.yml @@ -1,79 +1,51 @@ --- 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-13' - - 'freebsd-14' - - 'opensuse-leap-15' - - 'oracle-7' - - 'oracle-8' - - 'oracle-9' - - 'rockylinux-8' - - 'rockylinux-9' - - 'ubuntu-20.04' - - 'ubuntu-22.04' - - 'ubuntu-23.10' - - 'almalinux-8-arm64' - - 'almalinux-9-arm64' - - 'amazon-2-arm64' - - 'amazon-2023-arm64' - - 'centos-7-arm64' - - 'centos-stream-8-arm64' - - 'centos-stream-9-arm64' - - 'debian-11-arm64' - - 'debian-12-arm64' - - 'fedora-38-arm64' - - 'fedora-39-arm64' - - 'freebsd-13-arm64' - - 'freebsd-14-arm64' - - 'opensuse-leap-15-arm64' - - 'oracle-7-arm64' - - 'oracle-8-arm64' - - 'oracle-9-arm64' - - 'rockylinux-8-arm64' - - 'rockylinux-9-arm64' - - 'ubuntu-20.04-arm64' - - 'ubuntu-22.04-arm64' - - 'ubuntu-23.10-arm64' + - amazonlinux-2 + - amazonlinux-2023 + - almalinux-8 + - almalinux-9 + - centos-7 + - centos-stream-8 + - centos-stream-9 + - debian-11 + - debian-12 + - fedora-39 + - fedora-40 + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oraclelinux-7 + - oraclelinux-8 + - oraclelinux-9 + - rockylinux-8 + - rockylinux-9 + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 -# slug box name: text string from standard box name to match (generally the same) +# slug box name: text string from standard box name to match slugs: - 'almalinux-8': 'almalinux-8' - 'almalinux-9': 'almalinux-9' - 'centos-7': 'centos-7' - 'debian-12': 'debian-12' - 'debian-11': 'debian-11' - 'fedora-latest': 'fedora-39' - 'freebsd-13': 'freebsd-13' - 'freebsd-14': 'freebsd-14' - 'opensuse-leap-15': 'opensuse-leap-15' - 'oracle-7': 'oracle-7' - 'oracle-8': 'oracle-8' - 'oracle-9': 'oracle-9' - 'rockylinux-8': 'rockylinux-8' - 'rockylinux-9': 'rockylinux-9' - 'almalinux-8-arm64': 'almalinux-8' - 'almalinux-9-arm64': 'almalinux-9' - 'centos-7-arm64': 'centos-7' - 'debian-12-arm64': 'debian-12' - 'debian-11-arm64': 'debian-11' - 'fedora-latest-arm64': 'fedora-39' - 'oracle-7-arm64': 'oracle-7' - 'oracle-8-arm64': 'oracle-8' - 'oracle-9-arm64': 'oracle-9' - 'rockylinux-8-arm64': 'rockylinux-8' - 'rockylinux-9-arm64': 'rockylinux-9' + - almalinux-8 + - almalinux-9 + - centos-7 + - debian-12 + - debian-11 + - fedora-latest + - freebsd-13 + - freebsd-14 + - opensuse-leap-15 + - oracle-7 + - oracle-8 + - oracle-9 + - rockylinux-8 + - rockylinux-9 + - macos-14 do_not_build: - amazon diff --git a/builds/build_files/.gitkeep b/builds/build_files/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/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 5b44ae3ce..696dd5c7d 100644 --- a/lib/bento/cli.rb +++ b/lib/bento/cli.rb @@ -6,6 +6,7 @@ require 'bento/normalize' require 'bento/test' require 'bento/upload' +require 'bento/version' class Options NAME = File.basename($PROGRAM_NAME).freeze @@ -33,6 +34,7 @@ def self.parse(args) normalize : normalize one or more templates test : test one or more builds with kitchen upload : upload and release one or more builds to Vagrant Cloud + version : prints the version of #{NAME} COMMANDS end @@ -47,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] } @@ -59,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| @@ -72,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 @@ -80,10 +97,6 @@ def self.parse(args) options.var_files = opt end - opts.on('-c BUILD_YML', '--config BUILD_YML', 'Use a configuration file') do |opt| - options.config = opt - end - opts.on('-d', '--[no-]debug', 'Run packer with debug output') do |opt| options.debug = opt end @@ -96,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 @@ -112,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 @@ -156,7 +169,7 @@ def self.parse(args) options.provisioner = opt end end, - argv: proc {}, + argv: test_argv_proc, }, upload: { class: UploadRunner, @@ -197,7 +210,7 @@ def initialize(opts) end def start - templates.each { |template| puts template } + puts templates.join("\n") end end diff --git a/lib/bento/common.rb b/lib/bento/common.rb index 24aa0b81f..8b3b9a63d 100644 --- a/lib/bento/common.rb +++ b/lib/bento/common.rb @@ -75,40 +75,20 @@ def box_metadata(metadata_file) metadata end - def metadata_files - @metadata_files ||= Dir.glob('builds/*.json') + def metadata_files(arch_support = false) + arch = if RbConfig::CONFIG['host_cpu'] == 'arm64' + 'aarch64' + else + RbConfig::CONFIG['host_cpu'] + end + glob = "builds/*#{"-#{arch}" if arch_support}._metadata.json" + @metadata_files ||= Dir.glob(glob) end def builds_yml YAML.load(File.read('builds.yml')) end - def build_list - arm64 = [] - x86_64 = [] - builds_yml['public'].each do |platform, versions| - versions.each do |version, archs| - archs.each do |arch| - folder = case platform - when 'opensuse-leap' - 'opensuse' - when 'oracle' - 'oraclelinux' - else - platform - end - case arch - when 'aarch64' - arm64 << "#{folder}/#{platform}-#{version}-#{arch}" - else - x86_64 << "#{folder}/#{platform}-#{version}-#{arch}" - end - end - end - end - x86_64 + arm64 - end - def private_box?(boxname) proprietary_os_list = %w(macos windows sles solaris rhel) proprietary_os_list.any? { |p| boxname.include?(p) } diff --git a/lib/bento/providermetadata.rb b/lib/bento/providermetadata.rb index 051b41a9d..7850e4c49 100644 --- a/lib/bento/providermetadata.rb +++ b/lib/bento/providermetadata.rb @@ -93,7 +93,7 @@ def ver_vbox end def ver_libvirt - cmd = Mixlib::ShellOut.new('/usr/local/opt/libvirt/sbin/libvirtd -V') + cmd = Mixlib::ShellOut.new('libvirtd -V') cmd.run_command cmd.stdout.split(' ').last end diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index f1f170046..7c41b5804 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -8,7 +8,7 @@ class BuildRunner include Common include PackerExec - attr_reader :template_files, :config, :dry_run, :debug, :only, :except, :mirror, :headed, :single, :errors, + attr_reader :template_files, :dry_run, :debug, :only, :except, :mirror, :headed, :single, :errors, :on_error, :override_version, :build_timestamp, :cpus, :mem, :metadata_only, :vars, :var_files, :pkr_cmd def initialize(opts) @@ -17,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,7 +88,7 @@ def packer_build_cmd(template, _var_file) var_files.each do |var_file| cmd.insert(5, "-var-file=#{var_file}") if File.exist?(var_file) end if var_files - cmd.insert(4, "-only=#{only}") + cmd.insert(4, "-only=#{only}") if only cmd.insert(4, "-except=#{except}") if except # Build the command line in the correct order and without spaces as future input for the splat operator. cmd.insert(4, "-var cpus=#{cpus}") if cpus @@ -95,6 +96,7 @@ def packer_build_cmd(template, _var_file) cmd.insert(4, '-var headless=false') if headed cmd.insert(2, '-parallel=false') if single cmd.insert(2, '-debug') if debug + cmd.insert(2, "-on-error=#{on_error}") if on_error cmd.insert(0, 'echo') if dry_run || metadata_only cmd end @@ -106,8 +108,8 @@ def write_final_metadata(template, buildtime) md[:providers] = ProviderMetadata.new(path, md[:template]).read md[:providers].each do |p| p[:build_time] = buildtime - p[:build_cpus] = cpus unless cpus.nil? - p[:build_mem] = mem unless mem.nil? + p[:build_cpus] = cpus if cpus + p[:build_mem] = mem if mem end if dry_run diff --git a/lib/bento/test.rb b/lib/bento/test.rb index 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 56863406b..078902800 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -45,14 +45,14 @@ def upload_box(md_file) md_data['providers'].each_pair do |prov, prov_data| if File.exist?(File.join('builds', prov_data['file'])) puts '' - banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") - upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" + banner("Uploading #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} version:#{md_data['version']} provider:#{prov} arch:#{arch}...") + upload_cmd = "vagrant cloud publish --architecture #{arch} #{default_arch(arch)} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{md_data['box_basename']} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{box_desc(md_data['box_basename'])}' --short-description '#{box_desc(md_data['box_basename'])}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) slug_name = lookup_slug(md_data['name']) if slug_name puts '' - banner("Uploading slug #{builds_yml['vagrant_cloud_account']}/#{slug_name} from #{md_data['box_basename']} version:#{md_data['version']} provider:#{prov}...") + banner("Uploading slug #{builds_yml['vagrant_cloud_account']}/#{slug_name} from #{md_data['box_basename']} version:#{md_data['version']} provider:#{prov} arch:#{arch}...") upload_cmd = "vagrant cloud publish --architecture #{arch} --no-direct-upload #{builds_yml['vagrant_cloud_account']}/#{slug_name} #{md_data['version']} #{prov} builds/#{prov_data['file']} --description '#{slug_desc(slug_name)}' --short-description '#{slug_desc(slug_name)}' --version-description '#{ver_desc(md_data)}' --force --release #{public_private_box(md_data['box_basename'])}" shellout(upload_cmd) end @@ -74,12 +74,8 @@ def upload_box(md_file) # @return [String, NilClass] The slug name or nil # def lookup_slug(name) - builds_yml['slugs'].each_pair do |slug, match_string| - if name.include?('arm64') - return slug if name.start_with?(match_string) && slug.include?('arm64') - else - return slug if name.start_with?(match_string) && !slug.include?('arm64') - end + builds_yml['slugs'].each do |slug| + return slug if name.start_with?(slug) end nil @@ -87,21 +83,24 @@ def lookup_slug(name) def public_private_box(name) builds_yml['public'].each do |public| - if name.include?('arm64') || name.include?('aarch64') - return '--no-private' if name.start_with?(public) && public.include?('arm64') - else - return '--no-private' if name.start_with?(public) && !public.include?('arm64') - end + return '--no-private' if name.start_with?(public) + end + '--private' + end + + def default_arch(architecture) + builds_yml['default_architectures'].each do |arch| + return '--default-architecture' if architecture.eql?(arch) end - return '--private' + '--no-default-architecture' end def box_desc(name) - "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Chef" + "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Progress Chef" end def slug_desc(name) - "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" + "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Progress Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" end def ver_desc(md_data) @@ -120,6 +119,6 @@ def ver_desc(md_data) tool_versions.sort! tool_versions << "packer: #{md_data['packer']}" - "#{md_data['box_basename'].capitalize.tr('-', ' ')} Vagrant box version #{md_data['version']} created with Bento by Chef. Built with: #{tool_versions.join(', ')}" + "#{md_data['box_basename'].capitalize.tr('-', ' ')} Vagrant box version #{md_data['version']} created with Bento by Progress Chef. Built with: #{tool_versions.join(', ')}" end end diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 40b214786..30e078423 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.2.2'.freeze + VERSION = '4.1.1'.freeze end diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl new file mode 100644 index 000000000..0895fcfd9 --- /dev/null +++ b/os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl @@ -0,0 +1,11 @@ +os_name = "amazonlinux" +os_version = "2" +os_arch = "aarch64" +vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/amzn2-kvm-2.0.20240306.2-arm64.xfs.gpt.qcow2" +vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/SHA256SUMS" +parallels_guest_os_type = "fedora-core" +vbox_guest_os_type = "Fedora_64" +vmware_guest_os_type = "arm-fedora-64" +sources_enabled = [ + "source.virtualbox-ovf.vm" +] diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl index 4707acc7d..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 index c9cb1a8bc..1d5b199f2 100644 --- a/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://quantum-mirror.hu/mirrors/pub/centos-altarch/ iso_checksum = "file:https://quantum-mirror.hu/mirrors/pub/centos-altarch/7.9.2009/isos/aarch64/sha256sum.txt" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg x"] diff --git a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl index 20fb10372..08d946e6b 100644 --- a/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-stream-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://mirrors.edge.kernel.org/centos/8-stream/isos/ iso_checksum = "file:https://mirrors.edge.kernel.org/centos/8-stream/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg x"] 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 ee5e7dedd..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.8" +os_version = "11.9" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.8.0-arm64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.9.0-arm64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" -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 9107b7f2e..e60ff9fb2 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.8" +os_version = "11.9" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.8.0-amd64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.9.0-amd64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index aa3acc355..a1f98a930 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.4" +os_version = "12.5" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/debian-12.4.0-arm64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/debian-12.5.0-arm64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" -vmware_guest_os_type = "arm-debian-64" +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 817f0a3c3..6ad4b3f04 100644 --- a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.4" +os_version = "12.5" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/debian-12.4.0-amd64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" diff --git a/os_pkrvars/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-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl index b467c948e..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_version = "13.3" os_arch = "aarch64" -iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-arm64-aarch64-disc1.iso" -iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-arm64-aarch64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.3/FreeBSD-13.3-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.3/CHECKSUM.SHA256-FreeBSD-13.3-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "arm-freebsd-64" +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-14-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl index 69344d36c..f2dfcfdb6 100644 --- a/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-14-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.freebsd.org/releases/arm64/aarch64/I iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/CHECKSUM.SHA256-FreeBSD-14.0-RELEASE-arm64-aarch64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "arm-freebsd-64" +vmware_guest_os_type = "arm-freebsd14-64" boot_command = ["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/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl similarity index 86% rename from os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl index ec6471c14..8fbfc33f8 100644 --- a/os_pkrvars/oracle/oracle-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl @@ -1,9 +1,9 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "7.9" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL7/u9/aarch64/OracleLinux-R7-U9-Server-aarch64-dvd.iso" iso_checksum = "fd2c1b1e26858576534f6e6c4cf000a15cd81bec010dad5e827b204a14a1750e" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["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/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl index 49a1a6f40..6bd8977ad 100644 --- a/os_pkrvars/oracle/oracle-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "7.9" os_arch = "x86_64" iso_url = "http://mirrors.dotsrc.org/oracle-linux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl similarity index 86% rename from os_pkrvars/oracle/oracle-8-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl index dd1c6561d..c04cf1f0e 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_name = "oraclelinux" os_version = "8.9" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/aarch64/OracleLinux-R8-U9-aarch64-dvd.iso" iso_checksum = "c732ec9bb4a85349c0f1ca82020a8514341247506d114b8b79ec32bf99d59ea0" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["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 92% rename from os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl index af05d8767..499533fd4 100644 --- a/os_pkrvars/oracle/oracle-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "8.9" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/x86_64/OracleLinux-R8-U9-x86_64-dvd.iso" diff --git a/os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl similarity index 86% rename from os_pkrvars/oracle/oracle-9-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl index f5384427d..7d64a0a65 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_name = "oraclelinux" os_version = "9.3" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/aarch64/OracleLinux-R9-U3-aarch64-dvd.iso" iso_checksum = "7cc50a48f361cb1100a28621ba455edaac3a38182f6dd3fe67588b3eeaf18dc3" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = ["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 92% rename from os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl index b76944965..0aa28f6e1 100644 --- a/os_pkrvars/oracle/oracle-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oracle" +os_name = "oraclelinux" os_version = "9.3" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u3/x86_64/OracleLinux-R9-U3-x86_64-dvd.iso" diff --git a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl index a6c26ef33..940473f9a 100644 --- a/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-7-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "1b8004961150b60f6c5ec3f25139d3217eee55707cf9fa19e826919fc58e328b" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = [" 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 0785f59d0..e5950dceb 100644 --- a/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "none" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg"] diff --git a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl index 345324625..42d86f15d 100644 --- a/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/rhel/rhel-9-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://www.redhat.com/en/technologies/linux-platform iso_checksum = "none" parallels_guest_os_type = "rhel" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-rhel9-64" boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg"] diff --git a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl index 9a542230e..8f769dde5 100644 --- a/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/rockylinux/rockylinux-8-aarch64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.rockylinux.org/pub/rocky/8/isos/aarc iso_checksum = "file:https://download.rockylinux.org/pub/rocky/8/isos/aarch64/CHECKSUM" parallels_guest_os_type = "centos" vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "arm-centos-64" +vmware_guest_os_type = "arm-other-64" boot_command = ["e inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/8ks.cfg x"] diff --git a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl index 4d9b85d40..bf705c990 100644 --- a/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl +++ b/os_pkrvars/sles/sles-15-x86_64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "suse" os_version = "15.5" os_arch = "x86_64" iso_url = "https://updates.suse.com/SUSE/Products/SLE-Product-SLES/15-SP5/x86_64/iso/SLE-15-SP5-Online-x86_64-GM-Media1.iso" -iso_checksum = "" +iso_checksum = "b0920189fd7f2624983a9cf8bc062bbb7a8557658e3feadde77b80e72f66b6ef" parallels_guest_os_type = "suse" vbox_guest_os_type = "SUSE_LE_64" vmware_guest_os_type = "sles15-64" diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl index 35e379886..e49428e2b 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.3-live-server-arm64.iso" +iso_url = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso" iso_checksum = "file:https://cdimage.ubuntu.com/releases/jammy/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl index 7475a60a4..c4f1bb6fe 100644 --- a/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-22.04-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "ubuntu" os_version = "22.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.3-live-server-amd64.iso" +iso_url = "https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso" iso_checksum = "file:https://releases.ubuntu.com/jammy/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl similarity index 69% rename from os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl index 770a5671a..f3625a163 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.10-aarch64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.10" +os_version = "24.04" os_arch = "aarch64" -iso_url = "https://cdimage.ubuntu.com/releases/mantic/release/ubuntu-23.10-live-server-arm64.iso" -iso_checksum = "file:https://cdimage.ubuntu.com/releases/mantic/release/SHA256SUMS" +iso_url = "https://cdimage.ubuntu.com/releases/noble/release/ubuntu-24.04-live-server-arm64.iso" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/noble/release/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "arm-ubuntu-64" diff --git a/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl similarity index 61% rename from os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl rename to os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl index 43a2a3941..ef40daf4f 100644 --- a/os_pkrvars/ubuntu/ubuntu-23.10-x86_64.pkrvars.hcl +++ b/os_pkrvars/ubuntu/ubuntu-24.04-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "ubuntu" -os_version = "23.10" +os_version = "24.04" os_arch = "x86_64" -iso_url = "https://releases.ubuntu.com/mantic/ubuntu-23.10-live-server-amd64.iso" -iso_checksum = "file:https://releases.ubuntu.com/mantic/SHA256SUMS" +iso_url = "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso" +iso_checksum = "file:https://releases.ubuntu.com/noble/SHA256SUMS" parallels_guest_os_type = "ubuntu" vbox_guest_os_type = "Ubuntu_64" vmware_guest_os_type = "ubuntu-64" diff --git a/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/springdalelinux/7ks.cfg b/packer_templates/http/springdalelinux/7ks.cfg deleted file mode 100644 index bef5e9bd7..000000000 --- a/packer_templates/http/springdalelinux/7ks.cfg +++ /dev/null @@ -1,81 +0,0 @@ -install -eula --agreed -url --url="http://springdale.princeton.edu/data/Springdale/7/x86_64/os" -repo --name="Addons" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Addons -repo --name="Computational" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Computational -repo --name="Updates" --baseurl=http://springdale.princeton.edu/data/Springdale/7/x86_64/os/Updates -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --type=plain -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -%packages --ignoremissing --excludedocs -@core -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/springdalelinux/8ks.cfg b/packer_templates/http/springdalelinux/8ks.cfg deleted file mode 100644 index 9209acbaf..000000000 --- a/packer_templates/http/springdalelinux/8ks.cfg +++ /dev/null @@ -1,84 +0,0 @@ -install -url --url="http://springdale.princeton.edu/data/Springdale/8/x86_64/os" -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --nohome --nolvm --noboot -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -%packages --ignoremissing --excludedocs --instLangs=en_US.utf8 -# maybe prb needed for vbos guest additions? https://github.com/chef/bento/issues/1345 -# kernel-devel -# gcc -# make -# perl -# elfutils-libelf-devel -# end vbox -# vagrant needs this to copy initial files via scp -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/springdalelinux/9ks.cfg b/packer_templates/http/springdalelinux/9ks.cfg deleted file mode 100644 index 8f2523d42..000000000 --- a/packer_templates/http/springdalelinux/9ks.cfg +++ /dev/null @@ -1,82 +0,0 @@ -# Kickstart file for springdalelinux 9 -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp --noipv6 --onboot=on --device=eth0 -rootpw --plaintext vagrant -firewall --disabled -selinux --permissive -timezone UTC -bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0" -text -skipx -zerombr -clearpart --all --initlabel -autopart --nohome --nolvm --noboot -firstboot --disabled -reboot --eject -user --name=vagrant --plaintext --password vagrant - -url --url="http://springdale.princeton.edu/data/springdale/9/x86_64/os" -repo --name="BaseOS" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/BaseOS -repo --name="Updates_BaseOS" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/Updates_BaseOS -repo --name="AppStream" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/AppStream -repo --name="Updates_AppStream" --baseurl=http://springdale.princeton.edu/data/springdale/9/x86_64/os/Updates_AppStream - -%packages --ignoremissing --excludedocs -@^server-product-environment -openssh-clients -sudo -selinux-policy-devel -wget -nfs-utils -net-tools -tar -bzip2 -deltarpm -rsync -dnf-utils -redhat-lsb-core -elfutils-libelf-devel -network-scripts --fprintd-pam --intltool --iwl*-firmware --microcode_ctl -%end - -%post -# sudo -echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant -echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant -chmod 440 /etc/sudoers.d/vagrant - -# Enable hyper-v daemons only if using hyper-v virtualization -if [ $(virt-what) == "hyperv" ]; then -dnf -y install hyperv-daemons cifs-utils -systemctl enable hypervvssd -systemctl enable hypervkvpd -fi - -# Since we disable consistent network naming, we need to make sure the eth0 -# configuration file is in place so it will come up. -# Delete other network configuration first because RHEL/C7 networking will not -# restart successfully if there are configuration files for devices that do not -# exist. -rm -f /etc/sysconfig/network-scripts/ifcfg-e* -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_ -TYPE=Ethernet -PROXY_METHOD=none - BROWSER_ONLY=no - BOOTPROTO=dhcp - DEFROUTE=yes -IPV4_FAILURE_FATAL=no -IPV6INIT=yes -IPV6_AUTOCONF=yes -IPV6_DEFROUTE=yes - IPV6_FAILURE_FATAL=no - IPV6_ADDR_GEN_MODE=stable-privacy - NAME=eth0 -DEVICE=eth0 -ONBOOT=yes -_EOF_ -%end diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 01a91e224..5e619f9a5 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,6 +13,10 @@ autoinstall: install-server: yes allow-pw: yes late-commands: - - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant - # Enable hyper-v daemons only if using hyper-v virtualization - - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi + - | + 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 799b849a3..6c62ae330 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -6,7 +6,7 @@ packer { source = "github.com/hashicorp/hyperv" } parallels = { - version = ">= 1.0.2" + version = ">= 1.1.6" source = "github.com/parallels/parallels" } qemu = { @@ -49,98 +49,106 @@ locals { "${path.root}/scripts/windows/enable-file-sharing.ps1", "${path.root}/scripts/windows/eject-media.ps1" ] : ( - var.os_name == "solaris" ? [ - "${path.root}/scripts/solaris/update_solaris.sh", - "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/solaris/vmtools_solaris.sh", - "${path.root}/scripts/solaris/minimize_solaris.sh" + var.os_name == "macos" ? [ + "${path.root}/scripts/macos/system-default.sh", + "${path.root}/scripts/macos/system-update.sh", + "${path.root}/scripts/macos/vagrant.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/macos/parallels-tools.sh", + "${path.root}/scripts/macos/vmware-tools.sh", + "${path.root}/scripts/macos/shrink.sh" ] : ( - var.os_name == "freebsd" ? [ - "${path.root}/scripts/freebsd/update_freebsd.sh", - "${path.root}/scripts/freebsd/postinstall_freebsd.sh", - "${path.root}/scripts/freebsd/sudoers_freebsd.sh", + var.os_name == "solaris" ? [ + "${path.root}/scripts/solaris/update_solaris.sh", "${path.root}/scripts/_common/vagrant.sh", - "${path.root}/scripts/freebsd/vmtools_freebsd.sh", - "${path.root}/scripts/freebsd/cleanup_freebsd.sh", - "${path.root}/scripts/freebsd/minimize_freebsd.sh" + "${path.root}/scripts/solaris/vmtools_solaris.sh", + "${path.root}/scripts/solaris/minimize_solaris.sh" ] : ( - var.os_name == "opensuse" || - 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" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oraclelinux-7" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ + "${path.root}/scripts/rhel/update_yum.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/_common/sshd.sh", + "${path.root}/scripts/rhel/networking_rhel7.sh", + "${path.root}/scripts/_common/vagrant.sh", + "${path.root}/scripts/_common/virtualbox.sh", + "${path.root}/scripts/_common/vmware_rhel.sh", + "${path.root}/scripts/_common/parallels-rhel.sh", + "${path.root}/scripts/rhel/cleanup_yum.sh", + "${path.root}/scripts/_common/minimize.sh" + ] : [ + "${path.root}/scripts/rhel/update_dnf.sh", + "${path.root}/scripts/_common/motd.sh", + "${path.root}/scripts/_common/sshd.sh", + "${path.root}/scripts/_common/vagrant.sh", + "${path.root}/scripts/_common/virtualbox.sh", + "${path.root}/scripts/_common/vmware_rhel.sh", + "${path.root}/scripts/_common/parallels-rhel.sh", + "${path.root}/scripts/rhel/cleanup_dnf.sh", + "${path.root}/scripts/_common/minimize.sh" + ] + ) ) ) ) @@ -211,8 +219,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..1b0e9367c 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,9 +20,15 @@ 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"] ] @@ -35,8 +41,9 @@ locals { ) : var.qemu_machine_type qemuargs = var.qemuargs == null ? ( var.is_windows ? [ - ["-drive", "file=${path.root}/win_answer_files/virtio-win.iso,media=cdrom,index=3"], - ["-drive", "file=${path.root}/../builds/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=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [ ["-boot", "strict=off"] @@ -55,11 +62,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 +72,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 +151,32 @@ source "hyperv-iso" "vm" { winrm_username = var.winrm_username vm_name = local.vm_name } +source "parallels-ipsw" "vm" { + # Parallels specific options + host_interfaces = var.parallels_host_interfaces + ipsw_url = var.parallels_ipsw_url + ipsw_checksum = var.parallels_ipsw_checksum + prlctl = local.parallels_prlctl + prlctl_post = var.parallels_prlctl_post + prlctl_version_file = var.parallels_prlctl_version_file + # Source block common options + boot_command = var.boot_command + boot_wait = var.parallels_boot_wait == null ? local.default_boot_wait : var.parallels_boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + http_directory = local.http_directory + http_content = var.http_content + memory = local.memory + output_directory = "${local.output_directory}-parallels" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + vm_name = local.vm_name +} source "parallels-iso" "vm" { # Parallels specific options guest_os_type = var.parallels_guest_os_type @@ -171,11 +209,17 @@ source "parallels-iso" "vm" { } source "qemu" "vm" { # QEMU specific options - accelerator = var.qemu_accelerator - display = var.headless ? "none" : var.qemu_display - machine_type = local.qemu_machine_type - qemu_binary = local.qemu_binary - qemuargs = local.qemuargs + accelerator = var.qemu_accelerator + display = var.headless ? "none" : var.qemu_display + disk_image = var.qemu_disk_image + efi_boot = var.qemu_efi_boot + efi_firmware_code = var.qemu_efi_firmware_code + efi_firmware_vars = var.qemu_efi_firmware_vars + efi_drop_efivars = var.qemu_efi_drop_efivars + format = var.qemu_format + machine_type = local.qemu_machine_type + qemu_binary = local.qemu_binary + qemuargs = local.qemuargs # Source block common options boot_command = var.boot_command boot_wait = var.qemu_boot_wait == null ? local.default_boot_wait : var.qemu_boot_wait @@ -203,6 +247,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 +282,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..5b0c027fd 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 @@ -119,6 +145,36 @@ variable "qemu_display" { type = string default = "none" } +variable "qemu_disk_image" { + type = bool + default = null + description = "Whether iso_url is a bootable qcow2 disk image" +} +variable "qemu_efi_boot" { + type = bool + default = false + description = "Enable EFI boot" +} +variable "qemu_efi_firmware_code" { + type = string + default = null + description = "EFI firmware code path" +} +variable "qemu_efi_firmware_vars" { + type = string + default = null + description = "EFI firmware vars file path" +} +variable "qemu_efi_drop_efivars" { + type = bool + default = false + description = "Drop EFI vars" +} +variable "qemu_format" { + type = string + default = "qcow2" + description = "Disk format, takes qcow2 or raw" +} variable "qemu_machine_type" { type = string default = null @@ -185,9 +241,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 +282,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 +386,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_rhel.sh b/packer_templates/scripts/_common/vmware_rhel.sh index 835230df6..d8f8e7399 100644 --- a/packer_templates/scripts/_common/vmware_rhel.sh +++ b/packer_templates/scripts/_common/vmware_rhel.sh @@ -1,18 +1,20 @@ -#!/bin/sh -eux +#!/bin/bash -eux # set a default HOME_DIR environment variable if not set -HOME_DIR="${HOME_DIR:-/home/vagrant}"; +HOME_DIR="${HOME_DIR:-/home/vagrant}" case "$PACKER_BUILDER_TYPE" in vmware-iso|vmware-vmx) - # determine the major EL version we're runninng - major_version="$(sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release | awk -F. '{print $1}')"; + # determine the major EL version we're runninng + major_version="$(sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release | awk -F. '{print $1}')" - # make sure we use dnf on EL 8+ - if [ "$major_version" -ge 8 ]; then - dnf -y install open-vm-tools - else - yum -y install open-vm-tools - fi - ;; + # make sure we use dnf on EL 8+ + if [ "$major_version" -ge 8 ]; then + dnf install -y open-vm-tools + else + yum install -y open-vm-tools + fi + + systemctl enable vmtoolsd + systemctl start vmtoolsd esac diff --git a/packer_templates/scripts/macos/parallels-tools.sh b/packer_templates/scripts/macos/parallels-tools.sh new file mode 100644 index 000000000..4eea703a6 --- /dev/null +++ b/packer_templates/scripts/macos/parallels-tools.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ -e .PACKER_BUILDER_TYPE ] || echo "$PACKER_BUILDER_TYPE" | grep -q '^parallels'; then + echo "Installing Parallels Tools..." + installer -pkg /Volumes/Parallels\ Tools/Install.app/Contents/Resources/Install.mpkg -target / + + # This usually works but gives a failed to eject error + hdiutil detach /Volumes/Parallels\ Tools || echo "exit code $? is suppressed"; + + # Reboot is needed for tools install + reboot +fi diff --git a/packer_templates/scripts/macos/shrink.sh b/packer_templates/scripts/macos/shrink.sh new file mode 100644 index 000000000..14301079a --- /dev/null +++ b/packer_templates/scripts/macos/shrink.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +echo 'Disable spotlight...' +mdutil -a -i off + +echo 'Turn off hibernation and get rid of the sleepimage' +pmset hibernatemode 0 +rm -f /var/vm/sleepimage + +echo 'Remove Screensaver video files' +rm -rf /Library/Application Support/com.apple.idleassetsd/Customer/* || echo "rm screensaver videos exit code $? is suppressed" + +echo 'Remove logs' +rm -rf /Library/Logs/* || echo "rm library logs exit code $? is suppressed" + +echo 'Remove swap file' +rm -rf /System/Volumes/VM/swapfile* || echo "rm swapfile exit code $? is suppressed" + +if [ -e .vmfusion_version ] || [[ "$PACKER_BUILDER_TYPE" == vmware* ]]; then + echo 'VMware Fusion specific items' + echo 'Shrink the disk' + /Library/Application\ Support/VMware\ Tools/vmware-tools-cli disk shrink / +fi diff --git a/packer_templates/scripts/macos/system-default.sh b/packer_templates/scripts/macos/system-default.sh new file mode 100644 index 000000000..36a56e923 --- /dev/null +++ b/packer_templates/scripts/macos/system-default.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +PlistBuddy="/usr/libexec/PlistBuddy" + +echo 'Disable loginwindow screensaver to save CPU cycles' +$PlistBuddy -c 'Add :loginWindowIdleTime integer 0' "/Library/Preferences/com.apple.screensaver.plist" +defaults -currentHost write com.apple.screensaver idleTime 0 + +echo 'Prevent the VM from sleeping' +systemsetup -setdisplaysleep Off 2>/dev/null +systemsetup -setsleep Off 2>/dev/null +systemsetup -setcomputersleep Off 2>/dev/null + +echo "Enabling automatic GUI login for the 'Vagrant' user." +sysadminctl -autologin set -userName vagrant -password vagrant + +echo 'Disable screen lock' +sysadminctl -screenLock off -password vagrant diff --git a/packer_templates/scripts/macos/system-update.sh b/packer_templates/scripts/macos/system-update.sh new file mode 100644 index 000000000..b6112915d --- /dev/null +++ b/packer_templates/scripts/macos/system-update.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo "Downloading and installing system updates..." +softwareupdate -i -a -R + +echo 'Disable automatic updates' +# TOGGLE ALL OFF (auto checking is on to show other prefs are toggled off) +# before setting values quit system preferences & stop software update - stops defaults cache breaking 'AutomaticCheckEnabled' +osascript -e "tell application \"System Preferences\" to quit" +softwareupdate --schedule off +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticCheckEnabled -bool No +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist AutomaticDownload -bool NO +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist ConfigDataInstall -bool NO +defaults write /Library/Preferences/com.apple.SoftwareUpdate.plist CriticalUpdateInstall -bool NO +defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdateRestartRequired -bool NO +defaults write /Library/Preferences/com.apple.commerce.plist AutoUpdate -bool NO diff --git a/packer_templates/scripts/macos/vagrant.sh b/packer_templates/scripts/macos/vagrant.sh new file mode 100644 index 000000000..108c289d5 --- /dev/null +++ b/packer_templates/scripts/macos/vagrant.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +date > /etc/box_build_time +OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $1}') + +# Set computer/hostname +COMPNAME=macos-${OSX_VERS} +scutil --set ComputerName "${COMPNAME}" +scutil --set HostName "${COMPNAME}".vagrantup.com + +echo "Installing vagrant keys for vagrant user" +mkdir "/Users/vagrant/.ssh" +chmod 700 "/Users/vagrant/.ssh" +curl -L 'https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub' > "/Users/vagrant/.ssh/authorized_keys" +chmod 600 "/Users/vagrant/.ssh/authorized_keys" +chown -R "vagrant" "/Users/vagrant/.ssh" diff --git a/packer_templates/scripts/macos/vmware-tools.sh b/packer_templates/scripts/macos/vmware-tools.sh new file mode 100644 index 000000000..08218ba56 --- /dev/null +++ b/packer_templates/scripts/macos/vmware-tools.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# The MIT License (MIT) +# Copyright (c) 2013-2017 Timothy Sutton +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +echo 'VMware Fusion specific items' +if [ -e .vmfusion_version ] || echo "$PACKER_BUILDER_TYPE" | grep -q '^vmware'; then + # Globbing here: VMware Fusion >= 8.5.4 includes a second + # 'darwinPre15.iso' for any OS X guests pre-10.11 + TOOLS_PATH=$(find "/Users/vagrant/" -name '*darwin*.iso' -print) + if [ ! -e "$TOOLS_PATH" ]; then + echo "Couldn't locate uploaded tools iso at $TOOLS_PATH!" + exit 1 + fi + + TMPMOUNT=$(/usr/bin/mktemp -d /tmp/vmware-tools.XXXX) + hdiutil attach "$TOOLS_PATH" -mountpoint "$TMPMOUNT" + + INSTALLER_PKG="$TMPMOUNT/Install VMware Tools.app/Contents/Resources/VMware Tools.pkg" + if [ ! -e "$INSTALLER_PKG" ]; then + echo "Couldn't locate VMware installer pkg at $INSTALLER_PKG!" + exit 1 + fi + + echo "Installing VMware tools.." + installer -pkg "$TMPMOUNT/Install VMware Tools.app/Contents/Resources/VMware Tools.pkg" -target / + + # This usually fails + hdiutil detach "$TMPMOUNT" || echo "exit code $? is suppressed"; + rm -rf "$TMPMOUNT" + rm -f "$TOOLS_PATH" + + # Point Linux shared folder root to that used by OS X guests, + # useful for the Hashicorp vmware_fusion Vagrant provider plugin + mkdir /mnt + ln -sf /Volumes/VMware\ Shared\ Folders /mnt/hgfs +fi 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 abc88a934..22cf50b4d 100644 --- a/packer_templates/scripts/rhel/cleanup_yum.sh +++ b/packer_templates/scripts/rhel/cleanup_yum.sh @@ -19,9 +19,8 @@ package-cleanup --oldkernels --count=1 -y # Avoid ~200 meg firmware package we don't need # this cannot be done in the KS file so we do it here -if test "$(uname -r)" == -- *el7uek*; then - echo "Skipping firmware removal for Oracle Linux" -else +distro="$(rpm -qf --queryformat '%{NAME}' /etc/redhat-release | cut -f 1 -d '-')" +if [ "$distro" != 'oraclelinux' ]; then echo "Removing extra firmware packages" yum -y remove linux-firmware fi diff --git a/packer_templates/vagrantfile-windows.template b/packer_templates/vagrantfile-windows.template index 4a19e63d7..d6838e0e8 100644 --- a/packer_templates/vagrantfile-windows.template +++ b/packer_templates/vagrantfile-windows.template @@ -9,7 +9,6 @@ Vagrant.configure(2) do |config| config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.vm.provider "virtualbox" do |vb| - vb.gui = true vb.cpus = 2 vb.memory = 4096 end 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>