Support ARM64 architecture (#7451)

This commit is contained in:
Alexey-Ayupov
2023-04-17 16:42:19 +02:00
committed by GitHub
parent 5657dec7af
commit 871fce1661
2 changed files with 107 additions and 9 deletions

View File

@@ -81,8 +81,9 @@ function Invoke-SoftwareUpdate {
Write-Host "`t[*] Fetching Software Updates ready to install on '$TemplateName' VM:"
Show-StringWithFormat $newUpdates
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '')
Write-Host "`t[*] Installing Software Updates on '$TemplateName' VM:"
Install-SoftwareUpdate -HostName $ipAddress | Show-StringWithFormat
Install-SoftwareUpdate -HostName $ipAddress -listOfUpdates $listOfNewUpdates | Show-StringWithFormat
# Check if Action: restart
if ($newUpdates.Contains("Action: restart")) {
@@ -145,10 +146,16 @@ $env:SSHUSER = $TemplateUsername
$env:SSHPASS = $TemplatePassword
Write-Host "`n[#1] Download macOS application installer:"
$macOSInstaller = Get-MacOSInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
$shortMacOSVersion = Get-ShortMacOSVersion -MacOSVersion $MacOSVersion
if ([string]::IsNullOrEmpty($TemplateName)) {
$TemplateName = "clean_macos_${shortMacOSVersion}_${DiskSizeGb}gb"
$osArch = $(arch)
if ($osArch -eq "arm64"){
$macOSInstaller = Get-MacOSIPSWInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
$TemplateName = "clean_macos_${shortMacOSVersion}_${osArch}_${DiskSizeGb}gb"
} else {
$macOSInstaller = Get-MacOSInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
$TemplateName = "clean_macos_${shortMacOSVersion}_${DiskSizeGb}gb"
}
}
Write-Host "`n[#2] Create a VM template:"