Programmatically create macOS ARM64 virtual machines that have desktop/GUI interface on Apple Silicon using macosvm.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
cd /opt/homebrew/bin/
ls| pkg_url=$(mist list installer 24F74 -o yaml -q | yq '.[].packages[] | select(.url | test("InstallAssistant.pkg")) | .url'); | |
| curl -L $pkg_url -o InstallAssistant.pkg | |
| ipsw_url=$(mist list ipsw 24F74 -o yaml -q | yq '.[0].url'); | |
| filename=$(basename "$ipsw_url"); | |
| curl -L $ipsw_url -o $filename -C - --retry 5 --retry-all-errors; | |
| vm_name="macOS-Sequoia" | |
| vm_dir="~/Library/Containers/com.utmapp.UTM/Data/Documents/$vm_name.utm" |
| 2023-03-13 10:04:38.384| Info| Deployment Manager Start | |
| 2023-03-13 10:04:39.041|Verbose| Retrieving config database version Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ... | |
| 2023-03-13 10:04:39.041| Info| Config database version: 9.1.16.20. | |
| 2023-03-13 10:04:41.043| Info| Creating table: DBUpdateInstallInfo | |
| 2023-03-13 10:04:41.059| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting | |
| 2023-03-13 10:04:41.059| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.1.0016.0020. | |
| 2023-03-13 10:04:41.090|Verbose| Getting number of organizations Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ... |
| $script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common' | |
| $script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common' | |
| Import-Module -Name $script:sqlServerDscHelperModulePath | |
| Import-Module -Name $script:resourceHelperModulePath | |
| $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' | |
| <# | |
| .SYNOPSIS |
| $script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common' | |
| $script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common' | |
| Import-Module -Name $script:sqlServerDscHelperModulePath | |
| Import-Module -Name $script:resourceHelperModulePath | |
| $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' | |
| <# | |
| .SYNOPSIS |
| $script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common' | |
| $script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common' | |
| Import-Module -Name $script:sqlServerDscHelperModulePath | |
| Import-Module -Name $script:resourceHelperModulePath | |
| $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' | |
| <# | |
| .SYNOPSIS |
| # Run in PS with elevated privileges | |
| iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install -y googlechrome | |
| choco install -y git | |
| choco install -y vscode | |
| choco install -y docker-engine | |
| Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform" -NoRestart | |
| Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi -UseBasicParsing | |
| Start-Process msiexec.exe -Wait -ArgumentList "/I $((Get-Location).Path)\wsl_update_x64.msi /quiet" | |
| # Reboot the machine before you continue |
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <appSettings> | |
| <add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" /> | |
| <add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" /> | |
| <add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" /> | |
| <add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" /> | |
| <add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" /> | |
| <add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" /> | |
| </appSettings> |
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <appSettings> | |
| <add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" /> | |
| <add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" /> | |
| <add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" /> | |
| <add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" /> | |
| <add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" /> | |
| <add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" /> | |
| </appSettings> |