From bf825b7e7e9892176a6726e5b78874d2172ed902 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Tue, 13 Feb 2024 18:23:43 -0600 Subject: [PATCH 1/5] test --- lib/bento/buildmetadata.rb | 2 +- lib/bento/test_templates/bootstrap.sh.erb | 1 - .../amazonlinux-2-x86_64.pkrvars.hcl | 21 - os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl | 9 - .../centos/centos-stream-9-x86_64.pkrvars.hcl | 9 - .../debian/debian-11-aarch64.pkrvars.hcl | 4 +- .../debian/debian-11-x86_64.pkrvars.hcl | 4 +- .../debian/debian-12-x86_64.pkrvars.hcl | 6 +- .../windows/windows-10-x86_64.pkrvars.hcl | 1 + .../windows/windows-11-aarch64.pkrvars.hcl | 9 + packer_templates/http/ubuntu/user-data | 2 + packer_templates/pkr-builder.pkr.hcl | 4 +- packer_templates/pkr-sources.pkr.hcl | 39 +- packer_templates/pkr-variables.pkr.hcl | 1 + .../scripts/_common/parallels-rhel.sh | 47 -- packer_templates/scripts/_common/parallels.sh | 39 - .../scripts/debian/systemd_debian.sh | 4 - .../scripts/solaris/vmtools_solaris.sh | 24 - .../scripts/ubuntu/sudoers_ubuntu.sh | 7 - .../scripts/windows/enable-file-sharing.ps1 | 17 - .../win_answer_files/10/Autounattend.xml | 2 +- .../10/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/11/Autounattend.xml | 2 +- .../11/arm64/Autounattend.bak.xml | 338 ++++++++ .../11/arm64/Autounattend.xml | 720 ++++++++++++++++++ .../11/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2016/Autounattend.xml | 2 +- .../2016/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2019/Autounattend.xml | 2 +- .../2019/hyperv-gen2/Autounattend.xml | 2 +- .../win_answer_files/2022/Autounattend.xml | 2 +- .../2022/hyperv-gen2/Autounattend.xml | 2 +- 32 files changed, 1114 insertions(+), 214 deletions(-) create mode 100644 os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl create mode 100644 packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml create mode 100644 packer_templates/win_answer_files/11/arm64/Autounattend.xml diff --git a/lib/bento/buildmetadata.rb b/lib/bento/buildmetadata.rb index d343686dc..5b9c61341 100644 --- a/lib/bento/buildmetadata.rb +++ b/lib/bento/buildmetadata.rb @@ -33,7 +33,7 @@ def read attr_reader :template, :build_timestamp, :override_version, :pkr_cmd def box_basename - name.gsub('/', '__').split('-')[0...-1].join('-') + name.gsub('/', '__').split('-').join('-') end def git_revision diff --git a/lib/bento/test_templates/bootstrap.sh.erb b/lib/bento/test_templates/bootstrap.sh.erb index 99d3975e1..e69de29bb 100644 --- a/lib/bento/test_templates/bootstrap.sh.erb +++ b/lib/bento/test_templates/bootstrap.sh.erb @@ -1 +0,0 @@ -echo "Shell Provisioner Says What" diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl index 4707acc7d..e69de29bb 100644 --- a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl +++ b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl @@ -1,21 +0,0 @@ -os_name = "amazonlinux" -os_version = "2" -os_arch = "x86_64" -vbox_guest_os_type = "RedHat_64" -sources_enabled = [ - "source.virtualbox-ovf.amazonlinux" -] -vboxmanage = [ - [ - "modifyvm", - "{{ .Name }}", - "--memory", - "2048", - "--cpus", - "2", - "--audio", - "none", - "--nat-localhostreachable1", - "on", - ] -] diff --git a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl index b78910cf8..e69de29bb 100644 --- a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl @@ -1,9 +0,0 @@ -os_name = "centos" -os_version = "7.9" -os_arch = "x86_64" -iso_url = "http://mirrors.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso" -iso_checksum = "file:https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/sha256sum.txt" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg"] diff --git a/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl index 6275223b8..e69de29bb 100644 --- a/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl @@ -1,9 +0,0 @@ -os_name = "centos-stream" -os_version = "9" -os_arch = "x86_64" -iso_url = "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso" -iso_checksum = "file:https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso.SHA256SUM" -parallels_guest_os_type = "centos" -vbox_guest_os_type = "RedHat_64" -vmware_guest_os_type = "centos-64" -boot_command = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg"] diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index ee5e7dedd..88909284d 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.8" +os_version = "11.9" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.8.0-arm64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/debian-11.9.0-arm64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index 9107b7f2e..e60ff9fb2 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -1,7 +1,7 @@ os_name = "debian" -os_version = "11.8" +os_version = "11.9" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.8.0-amd64-DVD-1.iso" +iso_url = "https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/debian-11.9.0-amd64-DVD-1.iso" iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/latest-oldstable/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" diff --git a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl index 817f0a3c3..6ad4b3f04 100644 --- a/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-x86_64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.4" +os_version = "12.5" os_arch = "x86_64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/debian-12.4.0-amd64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/amd64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" diff --git a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl index ad283fb4e..a96283d18 100644 --- a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl @@ -8,3 +8,4 @@ parallels_guest_os_type = "win-10" vbox_guest_os_type = "Windows10_64" vmware_guest_os_type = "windows9srv-64" +# https://software.download.prss.microsoft.com/dbazure/Win10_22H2_English_x64v1.iso?t=f1cf9077-9373-441c-b238-907e3fac3231&P1=1707583719&P2=601&P3=2&P4=l0y%2fNUso0z871ymK7QtD6%2f6vN1zBGJRzfpJCISynZTcakhL1tbE1cIPv20cz70wyfmUqhcBMnTDy0OVZiCD%2fFztKsl8hKlCbsPmxVjzdKth7nwntwy3IQFYmyFhoOp%2bPZFW01u%2fPO%2b8%2fLByLxdebsEjF5wt%2bdLN0bi46TVSDn3FXoiNTNDUt4gkW5ihlExBPDRXMV8jTLR5Kf1gp9Owet1zunRiPVxZN3cB5Y9J3RcqyIvR6SGTi2n75DxXerJQXtRYkToJXsvpNpL%2bOunhbZgudHqM1FgamFSrD4rNSPfhxS0AYIxCbHVCrhf6EZRVyQMY8GYAUpwydhk2zZFFoIQ%3d%3d diff --git a/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl b/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl new file mode 100644 index 000000000..876c78c06 --- /dev/null +++ b/os_pkrvars/windows/windows-11-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "windows" +os_version = "11" +os_arch = "aarch64" +is_windows = true +iso_url = "../../builds/iso/WIN11_PROFESSIONAL_ARM64_EN-US.ISO" +iso_checksum = "90d4f9b5377e3c41784696ad0bb021b690e4f981f8e278fad62e07726f86bd77" +parallels_guest_os_type = "win-11" +vbox_guest_os_type = "Windows11_64" +vmware_guest_os_type = "windows9srv-64" diff --git a/packer_templates/http/ubuntu/user-data b/packer_templates/http/ubuntu/user-data index 17f05ca0a..24598df56 100644 --- a/packer_templates/http/ubuntu/user-data +++ b/packer_templates/http/ubuntu/user-data @@ -13,6 +13,8 @@ autoinstall: install-server: yes allow-pw: yes late-commands: + - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf + - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/vagrant # Enable hyper-v daemons only if using hyper-v virtualization - if [ $(virt-what) == "hyperv" ]; then apt-get update && apt-get install -y hyperv-daemons linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common cifs-utils && systemctl enable hypervvssd && systemctl enable hypervkvpd && systemctl start hypervvssd && systemctl start hypervkvpd; fi diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index 799b849a3..4604def93 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -117,9 +117,7 @@ locals { "${var.os_name}-${substr(var.os_version, 0, 1)}" == "amazonlinux-2" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oracle-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "scientificlinux-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "springdalelinux-7" ? [ + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" ? [ "${path.root}/scripts/rhel/update_yum.sh", "${path.root}/scripts/_common/motd.sh", "${path.root}/scripts/_common/sshd.sh", diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 9dafa9856..fd647c746 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -2,10 +2,10 @@ locals { # Source block provider specific # hyperv-iso hyperv_enable_dynamic_memory = var.hyperv_enable_dynamic_memory == null ? ( - var.hyperv_generation == 2 && var.is_windows ? "true" : null + var.hyperv_generation == 2 && var.is_windows ? true : false ) : var.hyperv_enable_dynamic_memory hyperv_enable_secure_boot = var.hyperv_enable_secure_boot == null ? ( - var.hyperv_generation == 2 && var.is_windows ? false : null + var.hyperv_generation == 2 && var.is_windows ? true : false ) : var.hyperv_enable_secure_boot # parallels-iso @@ -21,10 +21,14 @@ locals { ) : var.parallels_tools_mode parallels_prlctl = var.parallels_prlctl == null ? ( var.is_windows ? [ - ["set", "{{ .Name }}", "--efi-boot", "off"] + ["set", "{{ .Name }}", "--efi-boot", "off"], + ["set", "{{ .Name }}", "--efi-secure-boot", "off"], +# ["set", "{{ .Name }}", "--3d-accelerate", "off"], +# ["set", "{{ .Name }}", "--videosize", "16"], + ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../unattended.iso", "--connect"], ] : [ - ["set", "{{ .Name }}", "--3d-accelerate", "off"], - ["set", "{{ .Name }}", "--videosize", "16"] +# ["set", "{{ .Name }}", "--3d-accelerate", "off"], +# ["set", "{{ .Name }}", "--videosize", "16"] ] ) : var.parallels_prlctl @@ -76,22 +80,26 @@ locals { var.is_windows ? ( var.hyperv_generation == 2 ? [ "${path.root}/win_answer_files/${var.os_version}/hyperv-gen2/Autounattend.xml", - ] : [ - "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", - ] + ] : ( + var.os_arch == "x86_64" ? [ + "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", + ] : [ + "${path.root}/win_answer_files/${var.os_version}/arm64/Autounattend.xml", + ] + ) ) : null ) : var.cd_files communicator = var.communicator == null ? ( var.is_windows ? "winrm" : "ssh" ) : var.communicator floppy_files = var.floppy_files == null ? ( - var.is_windows ? [ - "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", - ] : ( - var.os_name == "springdalelinux" ? [ - "${path.root}/http/rhel/${substr(var.os_version, 0, 1)}ks.cfg" - ] : null - ) + var.is_windows ? ( + var.os_arch == "x86_64" ? [ + "${path.root}/win_answer_files/${var.os_version}/Autounattend.xml", + ] : [ + "${path.root}/win_answer_files/${var.os_version}/arm64/Autounattend.xml", + ] + ) : null ) : var.floppy_files http_directory = var.http_directory == null ? "${path.root}/http" : var.http_directory memory = var.memory == null ? (var.is_windows ? 4096 : 2048) : var.memory @@ -203,6 +211,7 @@ source "qemu" "vm" { } source "virtualbox-iso" "vm" { # Virtualbox specific options + firmware = "efi" gfx_controller = local.vbox_gfx_controller gfx_vram_size = local.vbox_gfx_vram_size guest_additions_path = var.vbox_guest_additions_path diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 1ba744623..fd517dcdd 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -225,6 +225,7 @@ variable "vmware_version" { variable "vmware_vmx_data" { type = map(string) default = { + "firmware" = "efi" "cpuid.coresPerSocket" = "2" "ethernet0.pciSlotNumber" = "32" "svga.autodetect" = true diff --git a/packer_templates/scripts/_common/parallels-rhel.sh b/packer_templates/scripts/_common/parallels-rhel.sh index fde6f59fb..e69de29bb 100644 --- a/packer_templates/scripts/_common/parallels-rhel.sh +++ b/packer_templates/scripts/_common/parallels-rhel.sh @@ -1,47 +0,0 @@ -#!/bin/sh -eux - -# set a default HOME_DIR environment variable if not set -HOME_DIR="${HOME_DIR:-/home/vagrant}"; - -case "$PACKER_BUILDER_TYPE" in -parallels-iso|parallels-pvm) - 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 checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make - else - yum -y install checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make - fi - - mkdir -p /tmp/parallels; - if [ "$(uname -m)" = "aarch64" ] ; then - mount -o loop "$HOME_DIR"/prl-tools-lin-arm.iso /tmp/parallels; - else - mount -o loop "$HOME_DIR"/prl-tools-lin.iso /tmp/parallels; - fi - VER="$(cat /tmp/parallels/version)"; - - echo "Parallels Tools Version: $VER"; - - /tmp/parallels/install --install-unattended-with-deps \ - || (code="$?"; \ - echo "Parallels tools installation exited $code, attempting" \ - "to output /var/log/parallels-tools-install.log"; \ - cat /var/log/parallels-tools-install.log; \ - exit $code); - umount /tmp/parallels; - rm -rf /tmp/parallels; - rm -f "$HOME_DIR"/*.iso; - - # Parallels Tools for Linux includes native auto-mount script, - # which causes losing some of Vagrant-relative shared folders. - # So, we should disable this behavior. - # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 - # TODO: verify this is fixed in latest version of parallels - # auto_mount_script='/usr/bin/prlfsmountd' - # if [ -f "${auto_mount_script}" ]; then - # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" - # fi - - ;; -esac diff --git a/packer_templates/scripts/_common/parallels.sh b/packer_templates/scripts/_common/parallels.sh index def4f01aa..e69de29bb 100644 --- a/packer_templates/scripts/_common/parallels.sh +++ b/packer_templates/scripts/_common/parallels.sh @@ -1,39 +0,0 @@ -#!/bin/sh -eux - -# set a default HOME_DIR environment variable if not set -HOME_DIR="${HOME_DIR:-/home/vagrant}"; - -case "$PACKER_BUILDER_TYPE" in -parallels-iso|parallels-pvm) - mkdir -p /tmp/parallels; - if [ "$(uname -m)" = "aarch64" ] ; then - mount -o loop "$HOME_DIR"/prl-tools-lin-arm.iso /tmp/parallels; - else - mount -o loop "$HOME_DIR"/prl-tools-lin.iso /tmp/parallels; - fi - VER="$(cat /tmp/parallels/version)"; - - echo "Parallels Tools Version: $VER"; - - /tmp/parallels/install --install-unattended-with-deps \ - || (code="$?"; \ - echo "Parallels tools installation exited $code, attempting" \ - "to output /var/log/parallels-tools-install.log"; \ - cat /var/log/parallels-tools-install.log; \ - exit $code); - umount /tmp/parallels; - rm -rf /tmp/parallels; - rm -f "$HOME_DIR"/*.iso; - - # Parallels Tools for Linux includes native auto-mount script, - # which causes losing some of Vagrant-relative shared folders. - # So, we should disable this behavior. - # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 - # TODO: verify this is fixed in latest version of parallels - # auto_mount_script='/usr/bin/prlfsmountd' - # if [ -f "${auto_mount_script}" ]; then - # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" - # fi - - ;; -esac diff --git a/packer_templates/scripts/debian/systemd_debian.sh b/packer_templates/scripts/debian/systemd_debian.sh index 2d1b5a71e..e69de29bb 100644 --- a/packer_templates/scripts/debian/systemd_debian.sh +++ b/packer_templates/scripts/debian/systemd_debian.sh @@ -1,4 +0,0 @@ -#!/bin/sh -eux - -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751636 -apt-get install libpam-systemd diff --git a/packer_templates/scripts/solaris/vmtools_solaris.sh b/packer_templates/scripts/solaris/vmtools_solaris.sh index 73953413f..e69de29bb 100644 --- a/packer_templates/scripts/solaris/vmtools_solaris.sh +++ b/packer_templates/scripts/solaris/vmtools_solaris.sh @@ -1,24 +0,0 @@ -#!/bin/bash -eux - -# Add pkgadd auto-answer file -sudo mkdir -p /tmp -sudo chmod 777 /tmp -{ - echo "mail=" - echo "instance=overwrite" - echo "partial=nocheck" - echo "runlevel=nocheck" - echo "idepend=nocheck" - echo "rdepend=nocheck" - echo "space=nocheck" - echo "setuid=nocheck" - echo "conflict=nocheck" - echo "action=nocheck" - echo "basedir=default" -} > /tmp/nocheck - -if [ -f /home/vagrant/.vbox_version ]; then - mkdir /tmp/vbox - ls - echo "all" | sudo -i pkgadd -a /tmp/nocheck -d /media/VBOXADDITIONS_*/VBoxSolarisAdditions.pkg -fi diff --git a/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh b/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh index e56537fea..e69de29bb 100644 --- a/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh +++ b/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers; - -# Set up password-less sudo for the vagrant user -echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_vagrant; -chmod 440 /etc/sudoers.d/99_vagrant; diff --git a/packer_templates/scripts/windows/enable-file-sharing.ps1 b/packer_templates/scripts/windows/enable-file-sharing.ps1 index fefc29d9d..e69de29bb 100644 --- a/packer_templates/scripts/windows/enable-file-sharing.ps1 +++ b/packer_templates/scripts/windows/enable-file-sharing.ps1 @@ -1,17 +0,0 @@ -Set-StrictMode -Version Latest -$ProgressPreference = 'SilentlyContinue' -$ErrorActionPreference = 'Stop' - -trap { - Write-Host - Write-Host "ERROR: $_" - ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host - ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host - Write-Host - Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...' - Start-Sleep -Seconds (60*60) - Exit 1 -} - -Write-Host 'Enable filesharing' -Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing" 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.bak.xml b/packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml new file mode 100644 index 000000000..0fb25c692 --- /dev/null +++ b/packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml @@ -0,0 +1,338 @@ + + + + + + + + E:\viostor\w11\arm64 + + + E:\NetKVM\w11\arm64 + + + E:\Balloon\w11\arm64 + + + E:\pvpanic\w11\arm64 + + + E:\qemupciserial\w11\arm64 + + + E:\qxldod\w11\arm64 + + + E:\vioinput\w11\arm64 + + + E:\viorng\w11\arm64 + + + E:\vioscsi\w11\arm64 + + + E:\vioserial\w11\arm64 + + + + + + en-US + + en-US + en-US + en-US + en-US + en-US + + + + + 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 + + + + + + + /IMAGE/NAME + Windows 11 Professional + + + + 0 + 3 + + + + + + VK7JG-NPHTM-C97JM-9MPGT-3V66T + + true + Vagrant + Bento by Progress Chef + + + false + + + + + + 1 + + + false + false + + + + + 1 + + + false + + + + + true + Windows Remote Management + all + + + true + Remote Administration + all + + + + + 0 + + + true + + + + + 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> + </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/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 @@ +<?xml version="1.0" encoding="utf-8"?> +<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> + <!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&UserLocale=en-US&KeyboardLayout=0409%3A00000409&ProcessorArchitecture=arm64&BypassRequirementsCheck=true&ComputerNameMode=Custom&ComputerName=Vagrant&TimeZoneMode=Implicit&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=100&RecoveryMode=None&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=vagrant&AccountPassword0=vagrant&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&LockoutMode=Disabled&DisableSystemRestore=true&EnableRemoteDesktop=true&AllowPowerShellScripts=true&DisableAppSuggestions=true&DisableWidgets=true&WifiMode=Skip&ExpressSettings=DisableAll&Remove3DViewer=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCortana=true&RemoveDevHome=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveInternetExplorer=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveZuneVideo=true&RemoveNews=true&RemoveNotepad=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOutlook=true&RemovePaint=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemoveQuickAssist=true&RemoveSkype=true&RemoveSnippingTool=true&RemoveSolitaire=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWeather=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveXboxApps=true&RemoveYourPhone=true&WdacMode=Skip--> + <settings pass="windowsPE"> + <component name="Microsoft-Windows-PnpCustomizationsWinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="arm64"> + <!-- + This makes the VirtIO drivers available to Windows, assuming that + the VirtIO driver disk at https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso + (see https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html#virtio-win-direct-downloads) + is available as drive F: + --> + <DriverPaths> + <PathAndCredentials wcm:action="add" wcm:keyValue="2"> + <Path>F:\drivers\viostor\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="3"> + <Path>F:\drivers\NetKVM\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="4"> + <Path>F:\drivers\Balloon\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="5"> + <Path>F:\drivers\pvpanic\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="8"> + <Path>F:\drivers\vioinput\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="9"> + <Path>F:\drivers\viorng\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="10"> + <Path>F:\drivers\vioscsi\w11\ARM64</Path> + </PathAndCredentials> + <PathAndCredentials wcm:action="add" wcm:keyValue="11"> + <Path>F:\drivers\vioserial\w11\ARM64</Path> + </PathAndCredentials> + </DriverPaths> + </component> + <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <SetupUILanguage> + <UILanguage>en-US</UILanguage> + </SetupUILanguage> + <SystemLocale>en-US</SystemLocale> + <UILanguage>en-US</UILanguage> + <UserLocale>en-US</UserLocale> + </component> + <component name="Microsoft-Windows-Setup" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <ImageInstall> + <OSImage> + <InstallFrom> + <MetaData wcm:action="add"> + <Key>/IMAGE/NAME</Key> + <Value>Windows 11 Professional</Value> + </MetaData> + </InstallFrom> + <InstallTo> + <DiskID>0</DiskID> + <PartitionID>3</PartitionID> + </InstallTo> + </OSImage> + </ImageInstall> + <UserData> + <ProductKey> + <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key> + </ProductKey> + <AcceptEula>true</AcceptEula> + </UserData> + <RunSynchronous> + <RunSynchronousCommand wcm:action="add"> + <Order>1</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo SELECT DISK=0"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>2</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo CLEAN"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>3</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo CONVERT GPT"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>4</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo CREATE PARTITION EFI SIZE=100"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>5</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo FORMAT QUICK FS=FAT32 LABEL="System""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>6</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo CREATE PARTITION MSR SIZE=16"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>7</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo CREATE PARTITION PRIMARY"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>8</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" echo FORMAT QUICK FS=NTFS LABEL="Windows""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>9</Order> + <Path>cmd.exe /c "&gt;&gt;"X:\diskpart.log" diskpart.exe /s "X:\diskpart.txt""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>10</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>11</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>12</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>13</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>14</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>15</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + </RunSynchronous> + </component> + </settings> + <settings pass="generalize"> + <component name="Microsoft-Windows-Security-SPP" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <SkipRearm>1</SkipRearm> + </component> + <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <PersistAllDeviceInstalls>false</PersistAllDeviceInstalls> + <DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices> + </component> + </settings> + <settings pass="specialize"> + <component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <DisableSR>1</DisableSR> + </component> + <component name="Microsoft-Windows-SystemSettingsThreshold" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <DisplayNetworkSelection>false</DisplayNetworkSelection> + </component> + <component name="Networking-MPSSVC-Svc" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <FirewallGroups> + <FirewallGroup wcm:action="add" wcm:keyValue="WindowsRemoteManagement"> + <Active>true</Active> + <Group>Windows Remote Management</Group> + <Profile>all</Profile> + </FirewallGroup> + <FirewallGroup wcm:action="add" wcm:keyValue="RemoteAdministration"> + <Active>true</Active> + <Group>Remote Administration</Group> + <Profile>all</Profile> + </FirewallGroup> + </FirewallGroups> + </component> + <component name="Microsoft-Windows-SQMApi" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <CEIPEnabled>0</CEIPEnabled> + </component> + <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <SkipAutoActivation>true</SkipAutoActivation> + </component> + <component name="Microsoft-Windows-Deployment" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <RunSynchronous> + <RunSynchronousCommand wcm:action="add"> + <Order>1</Order> + <Path>ReAgentc.exe /disable</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>2</Order> + <Path>cmd.exe /c "del /a /f "C:\Windows\System32\Recovery\Winre.wim""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>3</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Microsoft3DViewer"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>4</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsCalculator"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>5</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsCamera"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>6</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Clipchamp.Clipchamp"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>7</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsAlarms"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>8</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.549981C3F5F10"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>9</Order> + <Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>10</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsFeedbackHub"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>11</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.GetHelp"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>12</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo Browser.InternetExplorer"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>13</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsMaps"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>14</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo MathRecognizer"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>15</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.ZuneVideo"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>16</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.BingNews"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>17</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsNotepad"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>18</Order> + <Path>reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>19</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>20</Order> + <Path>reg.exe unload "HKU\mount"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>21</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftOfficeHub"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>22</Order> + <Path>cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>23</Order> + <Path>cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>24</Order> + <Path>cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe""</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>25</Order> + <Path>reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>26</Order> + <Path>reg.exe delete "HKU\mount\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>27</Order> + <Path>reg.exe unload "HKU\mount"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>28</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Office.OneNote"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>29</Order> + <Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>30</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo Microsoft.Windows.MSPaint"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>31</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Paint"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>32</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.MSPaint"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>33</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.People"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>34</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Windows.Photos"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>35</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.PowerAutomateDesktop"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>36</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo App.Support.QuickAssist"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>37</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo MicrosoftCorporationII.QuickAssist"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>38</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.SkypeApp"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>39</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.ScreenSketch"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>40</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftSolitaireCollection"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>41</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo App.StepsRecorder"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>42</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.MicrosoftStickyNotes"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>43</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>44</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Getstarted"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>45</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Todos"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>46</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.WindowsSoundRecorder"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>47</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.BingWeather"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>48</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-caps.txt" echo Media.WindowsMediaPlayer"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>49</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.ZuneMusic"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>50</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.Xbox.TCUI"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>51</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.XboxApp"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>52</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.XboxGameOverlay"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>53</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.XboxGamingOverlay"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>54</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.XboxIdentityProvider"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>55</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.XboxSpeechToTextOverlay"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>56</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.GamingApp"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>57</Order> + <Path>cmd.exe /c "&gt;&gt;"%TEMP%\remove-packages.txt" echo Microsoft.YourPhone"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>58</Order> + <Path>powershell.exe -NoProfile -Command "Get-AppxProvisionedPackage -Online | where DisplayName -In (Get-Content $env:TEMP\remove-packages.txt ) | Remove-AppxProvisionedPackage -AllUsers -Online *&gt;&amp;1 &gt;&gt; $env:TEMP\remove-packages.log;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>59</Order> + <Path>powershell.exe -NoProfile -Command "Get-WindowsCapability -Online | where {($_.Name -split '~')[0] -in (Get-Content $env:TEMP\remove-caps.txt ) } | Remove-WindowsCapability -Online *&gt;&amp;1 &gt;&gt; $env:TEMP\remove-caps.log;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>60</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>61</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;LayoutOptions StartTileGroupCellWidth="6" /^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>62</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;DefaultLayoutOverride^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>63</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;StartLayoutCollection^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>64</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" /^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>65</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;/StartLayoutCollection^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>66</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;/DefaultLayoutOverride^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>67</Order> + <Path>cmd.exe /c "&gt;&gt;"C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml" echo ^&lt;/LayoutModificationTemplate^&gt;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>68</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>69</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>70</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>71</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>72</Order> + <Path>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</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>73</Order> + <Path>net.exe accounts /lockoutthreshold:0</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>74</Order> + <Path>netsh.exe advfirewall firewall set rule group="Remote Desktop" new enable=Yes</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>75</Order> + <Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>76</Order> + <Path>powershell.exe -NoProfile -Command "Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>77</Order> + <Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>78</Order> + <Path>reg.exe load "HKU\mount" "C:\Users\Default\NTUSER.DAT"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>79</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>80</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>81</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>82</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>83</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>84</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>85</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>86</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>87</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>88</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>89</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>90</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>91</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>92</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>93</Order> + <Path>reg.exe add "HKU\mount\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>94</Order> + <Path>reg.exe unload "HKU\mount"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>95</Order> + <Path>reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f</Path> + </RunSynchronousCommand> + </RunSynchronous> + </component> + </settings> + <settings pass="oobeSystem"> + <component name="Microsoft-Windows-International-Core" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <InputLocale>en-US</InputLocale> + <SystemLocale>en-US</SystemLocale> + <UILanguage>en-US</UILanguage> + <UserLocale>en-US</UserLocale> + </component> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <OOBE> + <HideEULAPage>true</HideEULAPage> + <HideLocalAccountScreen>true</HideLocalAccountScreen> + <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> + <HideOnlineAccountScreens>true</HideOnlineAccountScreens> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <NetworkLocation>Work</NetworkLocation> + <ProtectYourPC>3</ProtectYourPC> + <SkipMachineOOBE>true</SkipMachineOOBE> + <SkipUserOOBE>true</SkipUserOOBE> + <VMModeOptimizations> + <SkipAdministratorProfileRemoval>true</SkipAdministratorProfileRemoval> + <SkipNotifyUILanguageChange>true</SkipNotifyUILanguageChange> + <SkipWinREInitialization>true</SkipWinREInitialization> + </VMModeOptimizations> + </OOBE> + <UserAccounts> + <AdministratorPassword> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </AdministratorPassword> + <LocalAccounts> + <LocalAccount wcm:action="add"> + <Password> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </Password> + <Description>Vagrant User</Description> + <DisplayName>vagrant</DisplayName> + <Group>Administrators</Group> + <Name>vagrant</Name> + </LocalAccount> + </LocalAccounts> + </UserAccounts> + <AutoLogon> + <Password> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </Password> + <Username>vagrant</Username> + <Enabled>true</Enabled> + </AutoLogon> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 64 Bit</Description> + <Order>1</Order> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 32 Bit</Description> + <Order>2</Order> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>3</Order> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"</CommandLine> + <Description>Sets detected network connections to private to allow start of winrm</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>4</Order> + <CommandLine>%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any</CommandLine> + <Description>Allows winrm over public profile interfaces</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>5</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm quickconfig -q</CommandLine> + <Description>winrm quickconfig -q</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>6</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm quickconfig -transport:http</CommandLine> + <Description>winrm quickconfig -transport:http</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>7</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}</CommandLine> + <Description>Win RM MaxTimoutms</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>8</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}</CommandLine> + <Description>Win RM MaxMemoryPerShellMB</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>9</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}</CommandLine> + <Description>Win RM AllowUnencrypted</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>10</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}</CommandLine> + <Description>Win RM auth Basic</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>11</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}</CommandLine> + <Description>Win RM client auth Basic</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>12</Order> + <CommandLine>%windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}</CommandLine> + <Description>Win RM listener Address/Port</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>13</Order> + <CommandLine>%windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"</CommandLine> + <Description>Win RM port open</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>14</Order> + <CommandLine>%windir%\System32\cmd.exe /c net stop winrm</CommandLine> + <Description>Stop Win RM Service</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>15</Order> + <CommandLine>%windir%\System32\cmd.exe /c sc config winrm start= auto</CommandLine> + <Description>Win RM Autostart</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>16</Order> + <CommandLine>%windir%\System32\cmd.exe /c net start winrm</CommandLine> + <Description>Start Win RM Service</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>17</Order> + <CommandLine>%windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE</CommandLine> + <Description>Disable password expiration for vagrant user</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "vagrant" /f</CommandLine> + <Order>18</Order> + <Description>Enable AutoLogon</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f</CommandLine> + <Order>19</Order> + <Description>Enable AutoLogon</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <Order>20</Order> + <CommandLine>powershell.exe -NoProfile -Command "Disable-ComputerRestore -Drive 'C:';"</CommandLine> + <Description>Disable Computer Restore</Description> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>cmd.exe /c E:\PTAgent.exe /install_silent</CommandLine> + <Description>Install Parallels Desktop tools</Description> + <Order>21</Order> + </SynchronousCommand> + </FirstLogonCommands> + </component> + <component name="Microsoft-Windows-WinRE-RecoveryAgent" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <UninstallWindowsRE>true</UninstallWindowsRE> + </component> + </settings> + <settings pass="offlineServicing"> + <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <EnableLUA>false</EnableLUA> + </component> + </settings> +</unattend> diff --git a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml index 65a4caaa3..431ef5e0c 100644 --- a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend.xml @@ -136,7 +136,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef.</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2016/Autounattend.xml b/packer_templates/win_answer_files/2016/Autounattend.xml index f58062063..6379e2f8c 100644 --- a/packer_templates/win_answer_files/2016/Autounattend.xml +++ b/packer_templates/win_answer_files/2016/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml index 64579c515..c51a95ee9 100644 --- a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2019/Autounattend.xml b/packer_templates/win_answer_files/2019/Autounattend.xml index 041dccbef..6cb3a61b4 100644 --- a/packer_templates/win_answer_files/2019/Autounattend.xml +++ b/packer_templates/win_answer_files/2019/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml index 58f6821a7..8d8498365 100644 --- a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2022/Autounattend.xml b/packer_templates/win_answer_files/2022/Autounattend.xml index 929915b8c..9d02fb7df 100644 --- a/packer_templates/win_answer_files/2022/Autounattend.xml +++ b/packer_templates/win_answer_files/2022/Autounattend.xml @@ -106,7 +106,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> diff --git a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml b/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml index ecfca3ebe..8d6565fc0 100644 --- a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml +++ b/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend.xml @@ -126,7 +126,7 @@ </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Vagrant</FullName> - <Organization>Bento by Chef Software, Inc.</Organization> + <Organization>Bento by Progress Chef</Organization> </UserData> <DynamicUpdate> <Enable>false</Enable> From 49a9826825ade5545fabe4261f4dcde3bba13906 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Fri, 16 Feb 2024 09:41:13 -0600 Subject: [PATCH 2/5] fixed files --- lib/bento/test_templates/bootstrap.sh.erb | 1 + .../amazonlinux-2-x86_64.pkrvars.hcl | 21 ++ os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl | 9 + .../centos/centos-stream-9-x86_64.pkrvars.hcl | 9 + .../windows/windows-10-x86_64.pkrvars.hcl | 2 - packer_templates/pkr-sources.pkr.hcl | 13 +- packer_templates/pkr-variables.pkr.hcl | 2 +- .../scripts/_common/parallels-rhel.sh | 47 +++ packer_templates/scripts/_common/parallels.sh | 39 ++ .../scripts/debian/systemd_debian.sh | 4 + .../scripts/solaris/vmtools_solaris.sh | 24 ++ .../scripts/ubuntu/sudoers_ubuntu.sh | 7 + .../scripts/windows/enable-file-sharing.ps1 | 17 + .../11/arm64/Autounattend.bak.xml | 338 ------------------ 14 files changed, 183 insertions(+), 350 deletions(-) delete mode 100644 packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml diff --git a/lib/bento/test_templates/bootstrap.sh.erb b/lib/bento/test_templates/bootstrap.sh.erb index e69de29bb..99d3975e1 100644 --- a/lib/bento/test_templates/bootstrap.sh.erb +++ b/lib/bento/test_templates/bootstrap.sh.erb @@ -0,0 +1 @@ +echo "Shell Provisioner Says What" diff --git a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl index e69de29bb..4707acc7d 100644 --- a/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl +++ b/os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl @@ -0,0 +1,21 @@ +os_name = "amazonlinux" +os_version = "2" +os_arch = "x86_64" +vbox_guest_os_type = "RedHat_64" +sources_enabled = [ + "source.virtualbox-ovf.amazonlinux" +] +vboxmanage = [ + [ + "modifyvm", + "{{ .Name }}", + "--memory", + "2048", + "--cpus", + "2", + "--audio", + "none", + "--nat-localhostreachable1", + "on", + ] +] diff --git a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl index e69de29bb..b78910cf8 100644 --- a/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-7-x86_64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "centos" +os_version = "7.9" +os_arch = "x86_64" +iso_url = "http://mirrors.kernel.org/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso" +iso_checksum = "file:https://mirrors.edge.kernel.org/centos/7.9.2009/isos/x86_64/sha256sum.txt" +parallels_guest_os_type = "centos" +vbox_guest_os_type = "RedHat_64" +vmware_guest_os_type = "centos-64" +boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/7ks.cfg<enter><wait>"] diff --git a/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl b/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl index e69de29bb..6275223b8 100644 --- a/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/centos/centos-stream-9-x86_64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "centos-stream" +os_version = "9" +os_arch = "x86_64" +iso_url = "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso" +iso_checksum = "file:https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso.SHA256SUM" +parallels_guest_os_type = "centos" +vbox_guest_os_type = "RedHat_64" +vmware_guest_os_type = "centos-64" +boot_command = ["<wait><up><wait><tab> inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg<enter><wait>"] diff --git a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl index a96283d18..0036e7c10 100644 --- a/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl +++ b/os_pkrvars/windows/windows-10-x86_64.pkrvars.hcl @@ -7,5 +7,3 @@ iso_checksum = "ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d60 parallels_guest_os_type = "win-10" vbox_guest_os_type = "Windows10_64" vmware_guest_os_type = "windows9srv-64" - -# https://software.download.prss.microsoft.com/dbazure/Win10_22H2_English_x64v1.iso?t=f1cf9077-9373-441c-b238-907e3fac3231&P1=1707583719&P2=601&P3=2&P4=l0y%2fNUso0z871ymK7QtD6%2f6vN1zBGJRzfpJCISynZTcakhL1tbE1cIPv20cz70wyfmUqhcBMnTDy0OVZiCD%2fFztKsl8hKlCbsPmxVjzdKth7nwntwy3IQFYmyFhoOp%2bPZFW01u%2fPO%2b8%2fLByLxdebsEjF5wt%2bdLN0bi46TVSDn3FXoiNTNDUt4gkW5ihlExBPDRXMV8jTLR5Kf1gp9Owet1zunRiPVxZN3cB5Y9J3RcqyIvR6SGTi2n75DxXerJQXtRYkToJXsvpNpL%2bOunhbZgudHqM1FgamFSrD4rNSPfhxS0AYIxCbHVCrhf6EZRVyQMY8GYAUpwydhk2zZFFoIQ%3d%3d diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index fd647c746..64396917e 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -23,13 +23,8 @@ locals { var.is_windows ? [ ["set", "{{ .Name }}", "--efi-boot", "off"], ["set", "{{ .Name }}", "--efi-secure-boot", "off"], -# ["set", "{{ .Name }}", "--3d-accelerate", "off"], -# ["set", "{{ .Name }}", "--videosize", "16"], - ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../unattended.iso", "--connect"], - ] : [ -# ["set", "{{ .Name }}", "--3d-accelerate", "off"], -# ["set", "{{ .Name }}", "--videosize", "16"] - ] + ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../builds/iso/unattended.iso", "--connect"], + ] : null ) : var.parallels_prlctl # qemu @@ -39,7 +34,7 @@ locals { ) : var.qemu_machine_type qemuargs = var.qemuargs == null ? ( var.is_windows ? [ - ["-drive", "file=${path.root}/win_answer_files/virtio-win.iso,media=cdrom,index=3"], + ["-drive", "file=${path.root}/../builds/iso/virtio-win.iso,media=cdrom,index=3"], ["-drive", "file=${path.root}/../builds/packer-${var.os_name}-${var.os_version}-${var.os_arch}-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"], ] : ( var.os_arch == "aarch64" ? [ @@ -211,7 +206,7 @@ source "qemu" "vm" { } source "virtualbox-iso" "vm" { # Virtualbox specific options - firmware = "efi" + #firmware = "efi" gfx_controller = local.vbox_gfx_controller gfx_vram_size = local.vbox_gfx_vram_size guest_additions_path = var.vbox_guest_additions_path diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index fd517dcdd..049ca0d6d 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -225,7 +225,7 @@ variable "vmware_version" { variable "vmware_vmx_data" { type = map(string) default = { - "firmware" = "efi" + # "firmware" = "efi" "cpuid.coresPerSocket" = "2" "ethernet0.pciSlotNumber" = "32" "svga.autodetect" = true diff --git a/packer_templates/scripts/_common/parallels-rhel.sh b/packer_templates/scripts/_common/parallels-rhel.sh index e69de29bb..fde6f59fb 100644 --- a/packer_templates/scripts/_common/parallels-rhel.sh +++ b/packer_templates/scripts/_common/parallels-rhel.sh @@ -0,0 +1,47 @@ +#!/bin/sh -eux + +# set a default HOME_DIR environment variable if not set +HOME_DIR="${HOME_DIR:-/home/vagrant}"; + +case "$PACKER_BUILDER_TYPE" in +parallels-iso|parallels-pvm) + 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 checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make + else + yum -y install checkpolicy selinux-policy-devel gcc kernel-devel kernel-headers make + fi + + mkdir -p /tmp/parallels; + if [ "$(uname -m)" = "aarch64" ] ; then + mount -o loop "$HOME_DIR"/prl-tools-lin-arm.iso /tmp/parallels; + else + mount -o loop "$HOME_DIR"/prl-tools-lin.iso /tmp/parallels; + fi + VER="$(cat /tmp/parallels/version)"; + + echo "Parallels Tools Version: $VER"; + + /tmp/parallels/install --install-unattended-with-deps \ + || (code="$?"; \ + echo "Parallels tools installation exited $code, attempting" \ + "to output /var/log/parallels-tools-install.log"; \ + cat /var/log/parallels-tools-install.log; \ + exit $code); + umount /tmp/parallels; + rm -rf /tmp/parallels; + rm -f "$HOME_DIR"/*.iso; + + # Parallels Tools for Linux includes native auto-mount script, + # which causes losing some of Vagrant-relative shared folders. + # So, we should disable this behavior. + # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 + # TODO: verify this is fixed in latest version of parallels + # auto_mount_script='/usr/bin/prlfsmountd' + # if [ -f "${auto_mount_script}" ]; then + # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" + # fi + + ;; +esac diff --git a/packer_templates/scripts/_common/parallels.sh b/packer_templates/scripts/_common/parallels.sh index e69de29bb..def4f01aa 100644 --- a/packer_templates/scripts/_common/parallels.sh +++ b/packer_templates/scripts/_common/parallels.sh @@ -0,0 +1,39 @@ +#!/bin/sh -eux + +# set a default HOME_DIR environment variable if not set +HOME_DIR="${HOME_DIR:-/home/vagrant}"; + +case "$PACKER_BUILDER_TYPE" in +parallels-iso|parallels-pvm) + mkdir -p /tmp/parallels; + if [ "$(uname -m)" = "aarch64" ] ; then + mount -o loop "$HOME_DIR"/prl-tools-lin-arm.iso /tmp/parallels; + else + mount -o loop "$HOME_DIR"/prl-tools-lin.iso /tmp/parallels; + fi + VER="$(cat /tmp/parallels/version)"; + + echo "Parallels Tools Version: $VER"; + + /tmp/parallels/install --install-unattended-with-deps \ + || (code="$?"; \ + echo "Parallels tools installation exited $code, attempting" \ + "to output /var/log/parallels-tools-install.log"; \ + cat /var/log/parallels-tools-install.log; \ + exit $code); + umount /tmp/parallels; + rm -rf /tmp/parallels; + rm -f "$HOME_DIR"/*.iso; + + # Parallels Tools for Linux includes native auto-mount script, + # which causes losing some of Vagrant-relative shared folders. + # So, we should disable this behavior. + # https://github.com/Parallels/vagrant-parallels/issues/325#issuecomment-418727113 + # TODO: verify this is fixed in latest version of parallels + # auto_mount_script='/usr/bin/prlfsmountd' + # if [ -f "${auto_mount_script}" ]; then + # printf '#!/bin/sh\n # Shared folders auto-mount is disabled by Vagrant' > "${auto_mount_script}" + # fi + + ;; +esac diff --git a/packer_templates/scripts/debian/systemd_debian.sh b/packer_templates/scripts/debian/systemd_debian.sh index e69de29bb..2d1b5a71e 100644 --- a/packer_templates/scripts/debian/systemd_debian.sh +++ b/packer_templates/scripts/debian/systemd_debian.sh @@ -0,0 +1,4 @@ +#!/bin/sh -eux + +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751636 +apt-get install libpam-systemd diff --git a/packer_templates/scripts/solaris/vmtools_solaris.sh b/packer_templates/scripts/solaris/vmtools_solaris.sh index e69de29bb..73953413f 100644 --- a/packer_templates/scripts/solaris/vmtools_solaris.sh +++ b/packer_templates/scripts/solaris/vmtools_solaris.sh @@ -0,0 +1,24 @@ +#!/bin/bash -eux + +# Add pkgadd auto-answer file +sudo mkdir -p /tmp +sudo chmod 777 /tmp +{ + echo "mail=" + echo "instance=overwrite" + echo "partial=nocheck" + echo "runlevel=nocheck" + echo "idepend=nocheck" + echo "rdepend=nocheck" + echo "space=nocheck" + echo "setuid=nocheck" + echo "conflict=nocheck" + echo "action=nocheck" + echo "basedir=default" +} > /tmp/nocheck + +if [ -f /home/vagrant/.vbox_version ]; then + mkdir /tmp/vbox + ls + echo "all" | sudo -i pkgadd -a /tmp/nocheck -d /media/VBOXADDITIONS_*/VBoxSolarisAdditions.pkg +fi diff --git a/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh b/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh index e69de29bb..e56537fea 100644 --- a/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh +++ b/packer_templates/scripts/ubuntu/sudoers_ubuntu.sh @@ -0,0 +1,7 @@ +#!/bin/sh -eux + +sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers; + +# Set up password-less sudo for the vagrant user +echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_vagrant; +chmod 440 /etc/sudoers.d/99_vagrant; diff --git a/packer_templates/scripts/windows/enable-file-sharing.ps1 b/packer_templates/scripts/windows/enable-file-sharing.ps1 index e69de29bb..fefc29d9d 100644 --- a/packer_templates/scripts/windows/enable-file-sharing.ps1 +++ b/packer_templates/scripts/windows/enable-file-sharing.ps1 @@ -0,0 +1,17 @@ +Set-StrictMode -Version Latest +$ProgressPreference = 'SilentlyContinue' +$ErrorActionPreference = 'Stop' + +trap { + Write-Host + Write-Host "ERROR: $_" + ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host + ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host + Write-Host + Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...' + Start-Sleep -Seconds (60*60) + Exit 1 +} + +Write-Host 'Enable filesharing' +Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing" diff --git a/packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml b/packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml deleted file mode 100644 index 0fb25c692..000000000 --- a/packer_templates/win_answer_files/11/arm64/Autounattend.bak.xml +++ /dev/null @@ -1,338 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-PnpCustomizationsWinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="arm64"> - <!-- - This makes the VirtIO drivers available to Windows, assuming that - the VirtIO driver disk at https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso - (see https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html#virtio-win-direct-downloads) - is available as drive E: - --> - <DriverPaths> - <PathAndCredentials wcm:action="add" wcm:keyValue="2"> - <Path>E:\viostor\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="3"> - <Path>E:\NetKVM\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="4"> - <Path>E:\Balloon\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="5"> - <Path>E:\pvpanic\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="6"> - <Path>E:\qemupciserial\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="7"> - <Path>E:\qxldod\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="8"> - <Path>E:\vioinput\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="9"> - <Path>E:\viorng\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="10"> - <Path>E:\vioscsi\w11\arm64</Path> - </PathAndCredentials> - <PathAndCredentials wcm:action="add" wcm:keyValue="11"> - <Path>E:\vioserial\w11\arm64</Path> - </PathAndCredentials> - </DriverPaths> - </component> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo SELECT DISK=0"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>2</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo CLEAN"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>3</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo CONVERT GPT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>4</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION EFI SIZE=100"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>5</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo FORMAT QUICK FS=FAT32 LABEL="System""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>6</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION MSR SIZE=16"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>7</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo CREATE PARTITION PRIMARY"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>8</Order> - <Path>cmd.exe /c ">>"X:\diskpart.txt" echo FORMAT QUICK FS=NTFS LABEL="Windows""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>9</Order> - <Path>cmd.exe /c ">>"X:\diskpart.log" diskpart.exe /s "X:\diskpart.txt""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>10</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>11</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>12</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>13</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>14</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>15</Order> - <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - </RunSynchronous> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME</Key> - <Value>Windows 11 Professional</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Vagrant</FullName> - <Organization>Bento by Progress Chef</Organization> - </UserData> - <DynamicUpdate> - <Enable>false</Enable> - </DynamicUpdate> - </component> - </settings> - <settings pass="generalize"> - <component name="Microsoft-Windows-Security-SPP" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <SkipRearm>1</SkipRearm> - </component> - <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <PersistAllDeviceInstalls>false</PersistAllDeviceInstalls> - <DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <DisableSR>1</DisableSR> - </component> - <component name="Microsoft-Windows-SystemSettingsThreshold" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <DisplayNetworkSelection>false</DisplayNetworkSelection> - </component> - <component name="Networking-MPSSVC-Svc" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <FirewallGroups> - <FirewallGroup wcm:action="add" wcm:keyValue="WindowsRemoteManagement"> - <Active>true</Active> - <Group>Windows Remote Management</Group> - <Profile>all</Profile> - </FirewallGroup> - <FirewallGroup wcm:action="add" wcm:keyValue="RemoteAdministration"> - <Active>true</Active> - <Group>Remote Administration</Group> - <Profile>all</Profile> - </FirewallGroup> - </FirewallGroups> - </component> - <component name="Microsoft-Windows-SQMApi" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <CEIPEnabled>0</CEIPEnabled> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-International-Core" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="arm64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Work</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - <SkipMachineOOBE>true</SkipMachineOOBE> - <SkipUserOOBE>true</SkipUserOOBE> - <VMModeOptimizations> - <SkipAdministratorProfileRemoval>true</SkipAdministratorProfileRemoval> - <SkipNotifyUILanguageChange>true</SkipNotifyUILanguageChange> - <SkipWinREInitialization>true</SkipWinREInitialization> - </VMModeOptimizations> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>vagrant</Value> - <PlainText>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> - </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> From 6425057f1ba7b752834a9d391971597f1dc62176 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Fri, 16 Feb 2024 10:42:41 -0600 Subject: [PATCH 3/5] fmt fix --- packer_templates/pkr-sources.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 64396917e..25f92d8ee 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -24,7 +24,7 @@ locals { ["set", "{{ .Name }}", "--efi-boot", "off"], ["set", "{{ .Name }}", "--efi-secure-boot", "off"], ["set", "{{ .Name }}", "--device-add", "cdrom", "--image", "${path.root}/../builds/iso/unattended.iso", "--connect"], - ] : null + ] : null ) : var.parallels_prlctl # qemu From 3fe24297421f3a9d965510e428d0ab980af85b37 Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Fri, 16 Feb 2024 15:35:32 -0600 Subject: [PATCH 4/5] update debian 12 --- os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl index aa3acc355..1fcfb21ac 100644 --- a/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-12-aarch64.pkrvars.hcl @@ -1,8 +1,8 @@ os_name = "debian" -os_version = "12.4" +os_version = "12.5" os_arch = "aarch64" -iso_url = "https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/debian-12.4.0-arm64-DVD-1.iso" -iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.4.0/arm64/iso-dvd/SHA256SUMS" +iso_url = "https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/debian-12.5.0-arm64-DVD-1.iso" +iso_checksum = "file:https://cdimage.debian.org/cdimage/release/12.5.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian-64" From e18bbfae300ab60f0f1b4aee25b17ffbdf680acf Mon Sep 17 00:00:00 2001 From: Corey Hemminger <hemminger@hotmail.com> Date: Fri, 16 Feb 2024 15:47:53 -0600 Subject: [PATCH 5/5] updated changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7ad41a4..a6abc2b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,14 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#> - Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches - Added ability to configure bento upload of private or public boxes in builds.yml, defaults to private -## [unreleased] (2024-02-05) +## [unreleased] (2024-02-16) + +## [v4.0.1] (2024-02-16) + +- Fix metadata file box_basename +- Updated Debian 11 to 11.9 +- Updated Debian 12 to 12.5 +- Added Windows 11 aarch64 template ## [v4.0.0] (2024-02-05)