Skip to content

Commit 6f587e2

Browse files
authored
Merge pull request #636 from microsoft/dev
Dev
2 parents a96d03c + c0cfb9f commit 6f587e2

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

HandsOnLabs/02-DeployingAzureLocal/readme.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ In this lab you will deploy 2 node Azure Local into virtual environment using [c
2626

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

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

3131
## LabConfig
3232

@@ -35,7 +35,7 @@ $LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPass
3535
3636
#Azure Local 24H2
3737
#labconfig will not domain join VMs
38-
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 }}
38+
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 }}
3939
4040
#VM for Windows Admin Center (optional)
4141
#$LabConfig.VMs += @{ VMName = 'WACGW' ; ParentVHD = 'Win2025Core_G2.vhdx'; MGMTNICs=1}
@@ -101,22 +101,21 @@ Invoke-Command -ComputerName $Servers -ScriptBlock {
101101

102102

103103
```PowerShell
104-
<# this breaks registration - recipe validation failed
105-
106104
#Install modules
105+
<# No longer needed
107106
Invoke-Command -ComputerName $Servers -Scriptblock {
108107
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
109108
Install-Module PowerShellGet -AllowClobber -Force
110109
Install-Module -Name AzStackHci.EnvironmentChecker -Force
111110
} -Credential $Credentials
111+
#>
112112
113113
#validate environment
114114
$result=Invoke-Command -ComputerName $Servers -Scriptblock {
115115
Invoke-AzStackHciConnectivityValidation -PassThru
116116
} -Credential $Credentials
117117
$result | Out-GridView
118118
119-
#>
120119
```
121120

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

235234
```PowerShell
236235
#Make sure resource providers are registered
236+
Register-AzResourceProvider -ProviderNamespace "Microsoft.AzureArcData"
237237
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridCompute"
238238
Register-AzResourceProvider -ProviderNamespace "Microsoft.GuestConfiguration"
239239
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridConnectivity"
@@ -245,21 +245,24 @@ Register-AzResourceProvider -ProviderNamespace "Microsoft.ResourceConnector"
245245
Register-AzResourceProvider -ProviderNamespace "Microsoft.HybridContainerService"
246246
Register-AzResourceProvider -ProviderNamespace "Microsoft.Attestation"
247247
Register-AzResourceProvider -ProviderNamespace "Microsoft.Storage"
248+
Register-AzResourceProvider -ProviderNamespace "Microsoft.Insights"
248249
249250
#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)
250251
$armtoken = (Get-AzAccessToken).Token
251252
$id = (Get-AzContext).Account.Id
252253
$Cloud="AzureCloud"
253254
254-
#check if token is plaintext (older module version outputs plaintext, version 5 outputs secure string) - will be fixed in 2506
255+
#check if token is plaintext (older module version outputs plaintext, version 5 outputs secure string)
255256
# Check if the token is a SecureString
256257
if ($armtoken -is [System.Security.SecureString]) {
257258
# Convert SecureString to plaintext
258259
$armtoken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($armtoken))
260+
Write-Output "Token converted to plaintext."
259261
}else {
260262
Write-Output "Token is already plaintext."
261263
}
262264
265+
<# no longer needed
263266
#check if ImageCustomizationScheduledTask is not in disabled state (if it's "ready", run it) - will be fixed in 2506
264267
Invoke-Command -ComputerName $Servers -ScriptBlock {
265268
$task=Get-ScheduledTask -TaskName ImageCustomizationScheduledTask
@@ -279,7 +282,7 @@ Register-AzResourceProvider -ProviderNamespace "Microsoft.Storage"
279282
} while ($task.state -ne "Disabled")
280283
}
281284
} -Credential $Credentials
282-
285+
#>
283286
#register servers
284287
Invoke-Command -ComputerName $Servers -ScriptBlock {
285288
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
@@ -371,7 +374,7 @@ Networking
371374
DNS Server: 10.0.0.1
372375
373376
Management
374-
Custom location name: ALClus01CustomLocation (default)
377+
Custom location name: ALClus01
375378
376379
Azure storage account name: <just generate new>
377380
@@ -394,6 +397,8 @@ Security:
394397
Advanced:
395398
Create workload volumes (Default)
396399
400+
**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.**
401+
397402
Tags:
398403
<keep default>
399404
```

Scripts/3_Deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ If (-not $isAdmin) {
970970
$TimeZone=(Get-TimeZone).id
971971

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

975975
#Calculate highest VLAN (for additional subnets)
976976
[int]$HighestVLAN=$LabConfig.AllowedVLANs -split "," -split "-" | Select-Object -Last 1

Scripts/LabConfig.ps1

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
#basic config for Windows Server 2022, that creates VMs for S2D Hyperconverged scenario https://github.com/Microsoft/MSLab/tree/master/Scenarios/S2D%20Hyperconverged
1+
#basic config for Windows Server 2025 S2D with 4 nodes
22

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

1112
### HELP ###
1213

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

1516
#region Same as above, but with more explanation
1617
<#

0 commit comments

Comments
 (0)