From 49a9826825ade5545fabe4261f4dcde3bba13906 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 16 Feb 2024 09:41:13 -0600 Subject: [PATCH] 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 = [" 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 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 = [" inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rhel/9ks.cfg"] 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 @@ - - - - - - - - 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>