Skip to content
Merged

Dev #636

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions HandsOnLabs/02-DeployingAzureLocal/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In this lab you will deploy 2 node Azure Local into virtual environment using [c

To setup lab, follow [01-Creating First Lab](../../HandsOnLabs/01-CreatingFirstLab/readme.md)

Lab consumes ~60GB RAM. You can modify number of VMs and get down to ~30GB
Lab consumes ~50GB RAM. You can modify number of VMs and get down to ~40GB. Deployment works with just 16GB RAM per node

## LabConfig

Expand All @@ -35,7 +35,7 @@ $LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPass

#Azure Local 24H2
#labconfig will not domain join VMs
1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName = "ALNode$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI24H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 1TB ; MemoryStartupBytes= 24GB; VMProcessorCount="MAX" ; vTPM=$true ; Unattend="NoDjoin" ; NestedVirt=$true }}
1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName = "ALNode$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI24H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 1TB ; MemoryStartupBytes= 20GB; VMProcessorCount="MAX" ; vTPM=$true ; Unattend="NoDjoin" ; NestedVirt=$true }}

#VM for Windows Admin Center (optional)
#$LabConfig.VMs += @{ VMName = 'WACGW' ; ParentVHD = 'Win2025Core_G2.vhdx'; MGMTNICs=1}
Expand Down Expand Up @@ -101,22 +101,21 @@ Invoke-Command -ComputerName $Servers -ScriptBlock {


```PowerShell
<# this breaks registration - recipe validation failed

#Install modules
<# No longer needed
Invoke-Command -ComputerName $Servers -Scriptblock {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PowerShellGet -AllowClobber -Force
Install-Module -Name AzStackHci.EnvironmentChecker -Force
} -Credential $Credentials
#>

#validate environment
$result=Invoke-Command -ComputerName $Servers -Scriptblock {
Invoke-AzStackHciConnectivityValidation -PassThru
} -Credential $Credentials
$result | Out-GridView

#>
```

![](./media/powershell02.png)
Expand Down Expand Up @@ -234,6 +233,7 @@ As you can see, code contains few fixes that will be addressed in future release

```PowerShell
#Make sure resource providers are registered
Register-AzResourceProvider -ProviderNamespace "Microsoft.AzureArcData"
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridCompute"
Register-AzResourceProvider -ProviderNamespace "Microsoft.GuestConfiguration"
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridConnectivity"
Expand All @@ -245,21 +245,24 @@ Register-AzResourceProvider -ProviderNamespace "Microsoft.ResourceConnector"
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridContainerService"
Register-AzResourceProvider -ProviderNamespace "Microsoft.Attestation"
Register-AzResourceProvider -ProviderNamespace "Microsoft.Storage"
Register-AzResourceProvider -ProviderNamespace "Microsoft.Insights"

#deploy ARC Agent (with Arc Gateway, without proxy. For more examples visit https://learn.microsoft.com/en-us/azure/azure-local/deploy/deployment-arc-register-server-permissions?tabs=powershell)
$armtoken = (Get-AzAccessToken).Token
$id = (Get-AzContext).Account.Id
$Cloud="AzureCloud"

#check if token is plaintext (older module version outputs plaintext, version 5 outputs secure string) - will be fixed in 2506
#check if token is plaintext (older module version outputs plaintext, version 5 outputs secure string)
# Check if the token is a SecureString
if ($armtoken -is [System.Security.SecureString]) {
# Convert SecureString to plaintext
$armtoken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($armtoken))
Write-Output "Token converted to plaintext."
}else {
Write-Output "Token is already plaintext."
}

<# no longer needed
#check if ImageCustomizationScheduledTask is not in disabled state (if it's "ready", run it) - will be fixed in 2506
Invoke-Command -ComputerName $Servers -ScriptBlock {
$task=Get-ScheduledTask -TaskName ImageCustomizationScheduledTask
Expand All @@ -279,7 +282,7 @@ Register-AzResourceProvider -ProviderNamespace "Microsoft.Storage"
} while ($task.state -ne "Disabled")
}
} -Credential $Credentials

#>
#register servers
Invoke-Command -ComputerName $Servers -ScriptBlock {
Invoke-AzStackHciArcInitialization -SubscriptionID $using:SubscriptionID -ResourceGroup $using:ResourceGroupName -TenantID $using:TenantID -Cloud $using:Cloud -Region $Using:Location -ArmAccessToken $using:ARMtoken -AccountID $using:id #-ArcGatewayID $using:ArcGatewayID
Expand Down Expand Up @@ -371,7 +374,7 @@ Networking
DNS Server: 10.0.0.1

Management
Custom location name: ALClus01CustomLocation (default)
Custom location name: ALClus01

Azure storage account name: <just generate new>

Expand All @@ -394,6 +397,8 @@ Security:
Advanced:
Create workload volumes (Default)

**Please understand that the workload volumes will use thin provisioning, but their default max size is about 2x larger than the pool capacity. This is by-design.**

Tags:
<keep default>
```
Expand Down
2 changes: 1 addition & 1 deletion Scripts/3_Deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ If (-not $isAdmin) {
$TimeZone=(Get-TimeZone).id

#Grab number of processors
Get-CimInstance -ClassName "win32_processor" | ForEach-Object { $global:NumberOfLogicalProcessors += $_.NumberOfLogicalProcessors }
Get-CimInstance -ClassName "win32_processor" | ForEach-Object { $global:NumberOfLogicalProcessors += $_.NumberOfEnabledCore }

#Calculate highest VLAN (for additional subnets)
[int]$HighestVLAN=$LabConfig.AllowedVLANs -split "," -split "-" | Select-Object -Last 1
Expand Down
17 changes: 9 additions & 8 deletions Scripts/LabConfig.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#basic config for Windows Server 2022, that creates VMs for S2D Hyperconverged scenario https://github.com/Microsoft/MSLab/tree/master/Scenarios/S2D%20Hyperconverged
#basic config for Windows Server 2025 S2D with 4 nodes

$LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'MSLab-' ; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()}
# Windows Server 2022
1..4 | ForEach-Object {$LABConfig.VMs += @{ VMName = "S2D$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2022Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }}
# Or Azure Stack HCI 23H2 (non-domain joined) https://github.com/DellGEOS/AzureStackHOLs/tree/main/lab-guides/01a-DeployAzureStackHCICluster-CloudBasedDeployment
#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName = "ASNode$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI23H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 24GB; VMProcessorCount=16 ; vTPM=$true ; Unattend="NoDjoin" ; NestedVirt=$true }}
# Or Windows Server 2025 https://github.com/DellGEOS/AzureLocalHOLs/tree/main/lab-guides/03-TestingWindowsServer2025
#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName="S2D$_" ; Configuration='S2D' ; ParentVHD='Win2025Core_G2.vhdx' ; HDDNumber=4 ; HDDSize=2TB ; MemoryStartupBytes=1GB; VMProcessorCount=4 ; vTPM=$true}}
# Windows Server 2025 https://github.com/DellGEOS/AzureLocalHOLs/tree/main/lab-guides/03-TestingWindowsServer2025
1..4 | ForEach-Object {$LABConfig.VMs += @{ VMName = "S2D$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2025Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }}
# Or Azure Stack HCI 23H2 (non-domain joined) https://github.com/microsoft/MSLab/tree/master/HandsOnLabs/02-DeployingAzureLocal
#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName = "ALNode$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI24H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 1TB ; MemoryStartupBytes= 24GB; VMProcessorCount="MAX" ; vTPM=$true ; Unattend="NoDjoin" ; NestedVirt=$true }}
# Or Windows Server Insider https://github.com/microsoft/MSLab/tree/master/HandsOnLabs/03-RackLevelNestedMirror
#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName="SiteA_$_" ; Configuration='S2D' ; ParentVHD='WinSrvInsiderCore_26445.vhdx' ; HDDNumber=4 ; HDDSize=2TB ; MemoryStartupBytes=1GB; VMProcessorCount=4 ; vTPM=$true}}
#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName="SiteB_$_" ; Configuration='S2D' ; ParentVHD='WinSrvInsiderCore_26445.vhdx' ; HDDNumber=4 ; HDDSize=2TB ; MemoryStartupBytes=1GB; VMProcessorCount=4 ; vTPM=$true}}

### HELP ###

#If you need more help or different configuration options, ping us at jaromir.kaspar@dell.com or [email protected]
#If you need more help or different configuration options, ping us at v-jkaspar@microsoft.com or [email protected]

#region Same as above, but with more explanation
<#
Expand Down
Loading