Skip to content

Commit

Permalink
Merge pull request #514 from microsoft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jaromirk authored Jul 23, 2022
2 parents 60293c8 + cf7b7aa commit d170bd9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Scenarios/AzSHCI Deployment/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<#
$CloudWitnessStorageAccountName="MyStorageAccountName"
$CloudWitnessStorageKey="qi8QB/VSHHiA9lSvz1kEIEt0JxIucPL3l99nRHhkp+n1Lpabu4Ydi7Ih192A4VW42vccIgUnrXxxxxxxxxxxxx=="
$CloudWitnessEndpoint="core.windows.net
$CloudWitnessEndpoint="core.windows.net"
#>

#Perform Windows update? (for more info visit WU Scenario https://github.com/microsoft/WSLab/tree/dev/Scenarios/Windows%20Update)
Expand Down Expand Up @@ -545,6 +545,11 @@
}
}

#Configure dcbxmode to be host in charge (default is firmware in charge) on mellanox adapters
if (Get-NetAdapter -CimSession $Servers -InterfaceDescription Mellanox*){
Set-NetAdapterAdvancedProperty -CimSession $Servers -InterfaceDescription Mellanox* -DisplayName 'Dcbxmode' -DisplayValue 'Host in charge'
}

#configure DCB if requested
if ($DCB -eq $True){
#Install DCB
Expand Down Expand Up @@ -595,6 +600,8 @@
Get-NetAdapterAdvancedProperty -CimSession $servers -DisplayName "Jumbo Packet"
#verify RDMA settings
Get-NetAdapterRdma -CimSession $servers | Sort-Object -Property Systemname | Format-Table systemname,interfacedescription,name,enabled -AutoSize -GroupBy Systemname
#verify DCBXMode
Get-NetAdapterAdvancedProperty -CimSession $Servers -InterfaceDescription Mellanox* -DisplayName 'Dcbxmode'
#validate if VLANs were set
Get-VMNetworkAdapterVlan -CimSession $Servers -ManagementOS
#verify ip config
Expand Down Expand Up @@ -1108,6 +1115,7 @@
Import-Certificate -FilePath $env:TEMP\WACCert.cer -CertStoreLocation Cert:\LocalMachine\Root\

#Configure Resource-Based constrained delegation
Install-WindowsFeature -Name RSAT-AD-PowerShell
$gatewayObject = Get-ADComputer -Identity $GatewayServerName
$computers = (Get-ADComputer -Filter {OperatingSystem -eq "Azure Stack HCI"}).Name

Expand Down
12 changes: 12 additions & 0 deletions Scenarios/AzSHCI and VMFleet/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
Copy-Item -Path 'C:\Program Files\WindowsPowerShell\Modules\PrivateCloud.DiagnosticInfo' -Destination 'C:\Program Files\WindowsPowerShell\Modules\' -ToSession $Session -Recurse -Force
}

#make sure iDRAC NICs are disabled (since it's same APIPA range like vmfleet adapters, it's better to be disabled as it might disturb results copy from vmfleet VMs)
Get-Netadapter -CimSession $Nodes -InterfaceDescription "Remote NDIS Compatible Device" | Disable-NetAdapter -Confirm:0

#Configure VMFleet cluster network role to be none, and name to be vmfleet
$Network=(Get-ClusterNetworkInterface -Cluster $ClusterName | Where-Object Name -like *FleetInternal*).Network | Select-Object -Unique
$Network.Role="none"
$Network.Name="vmfleet"

# Temporarily enable CredSSP delegation to avoid double-hop issue
foreach ($Node in $Nodes){
Enable-WSManCredSSP -Role "Client" -DelegateComputer $Node -Force
Expand All @@ -106,6 +114,10 @@
# Disable CredSSP
Disable-WSManCredSSP -Role Client
Invoke-Command -ComputerName $nodes -ScriptBlock { Disable-WSManCredSSP Server }

#re-enable iDRAC NICs
Get-Netadapter -CimSession $Nodes -InterfaceDescription "Remote NDIS Compatible Device" | Enable-NetAdapter -Confirm:0

#endregion

#region Remove Fleet
Expand Down
6 changes: 6 additions & 0 deletions Scripts/3_Deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,12 @@ If (-not $isAdmin) {
$VMTemp | Set-VMProcessor -Count 2
}

#Disable Time Integration Components
If ($VMConfig.DisableTimeIC){
WriteInfo "`t`t Disabling Time Synchronization Integration Service"
$VMTemp | Disable-VMIntegrationService -Name "Time Synchronization"
}

$Name=$VMConfig.VMName
#add run synchronous commands
WriteInfo "`t Adding Sync Commands"
Expand Down
5 changes: 4 additions & 1 deletion Scripts/LabConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'MSLab-' ; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()}
# Windows Server 2022
1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2022Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }}
# Or Azure Stack HCI 20H2
# Or Azure Stack HCI 2090
#1..4 | ForEach-Object {$VMNames="AzSHCI"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI20H2_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB }}
# Or Windows Server 2019
#1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }}
Expand Down Expand Up @@ -335,6 +335,9 @@ $LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'M
This will set Management NICs to defined subnet id by configuring native VLAN ID. Default is 0. If configured to 1, it will increase highest allowed VLAN by one and configure.
For example ManagementSubnetID=1, AllowedVlans=10, then ManagementSubnetID VLAN will be configured 11.
#DisableTimeIC (Optional)
Example DisableTimeIC=$true
if $true, time Hyper-V Time Synchronization Integration Service (VMICTimeProvider) will be disabled
#>
#endregion

Expand Down

0 comments on commit d170bd9

Please sign in to comment.