#Create sites for Stretch Cluster
############not needed if AD Sites are created.
New-ClusterFaultDomain -Name Bangalore -Type Site -Description "Primary" -Location "Bangalore Datacenter"
New-ClusterFaultDomain -Name Chennai -Type Site -Description "Secondary" -Location "Chennai Datacenter"
Set-ClusterFaultDomain -Name node1 -Parent Bangalore
Set-ClusterFaultDomain -Name node2 -Parent Bangalore
Set-ClusterFaultDomain -Name node3 -Parent Chennai
Set-ClusterFaultDomain -Name node4 -Parent Chennai
(Get-Cluster).PreferredSite="Bangalore"
####After completing the above steps on any one of the cluster node
# NIC variables
# Modify to match the deployment requirements
$mgmt_compute_nics = @('NIC1','NIC2')
$stretch_nics = @('SLOT 1 Port 1','SLOT 1 Port 2')
$storage_nics = @('SLOT 3 Port 1','SLOT 3 Port 2')
$storage_vlans =@(203,204)
$Mgmt_Vlan=202
$Stretch_Vlan=210
# Set QoS Override (only necessary if there’s a deviation from MS recommendations)
$QoSOverride = New-NetIntentQoSPolicyOverrides
$QoSOverride.BandwidthPercentage_Cluster = 2
$QoSOverride.PriorityValue8021Action_Cluster = 5
# RDMA/JumboPacket Override for Management NIC (Optional - only if RDMA is not needed on Mgmt + Compute Intent)
$MgmtAdapterPropertyOverrides = New-NetIntentAdapterPropertyOverrides
$MgmtAdapterPropertyOverrides.NetworkDirect = 0
$MgmtAdapterPropertyOverrides.JumboPacket = 9014
$StorAdapterPropertyOverrides = New-NetIntentAdapterPropertyOverrides
$StorAdapterPropertyOverrides.JumboPacket = 9014
$StrAdapterPropertyOverrides = New-NetIntentAdapterPropertyOverrides
$StrAdapterPropertyOverrides.NetworkDirect = 0
# Create Management and Compute Intent
Add-NetIntent -Name Management_Compute -Management -Compute -AdapterName $mgmt_compute_nics -AdapterPropertyOverrides $MgmtAdapterPropertyOverrides
# Create Storage Intent
Add-NetIntent -Name Storage -Storage -AdapterName $storage_nics -StorageVLANs $storage_vlans -QosPolicyOverrides $QoSOverride -AdapterPropertyOverrides $StorAdapterPropertyOverrides
# Adding global override
$clusterOverride = New-NetIntentGlobalClusterOverrides
$clusterOverride.EnableVirtualMachineMigrationPerformanceSelection = $false
$clusterOverride.VirtualMachineMigrationPerformanceOption = "SMB"
$clusterOverride.MaximumVirtualMachineMigrations = 2 Set-NetIntent
-GlobalClusterOverrides $clusterOverride
# Create Stretch Intent
$site1Override = New-NetIntentSiteOverrides
$site1Override.Name = "Bangalore"
$site1Override.StretchVLAN = 210
$site1Override.StorageVLAN = 203
$site2Override = New-NetIntentSiteOverrides
$site2Override.Name = "Chennai"
$site2Override.StretchVLAN = 210
$site2Override.StorageVLAN = 203
Add-NetIntent -Name Stretch -Stretch -AdapterName $stretch_nics -QosPolicyOverrides $QoSOverride -AdapterPropertyOverrides $StrAdapterPropertyOverrides -SiteOverrides $site1Override, $site2Override
Note: All interfaces across both sites have to be in the same IP range if you use Network ATC. If that is not possible use untagged VLANs for management and replica network to work around this.
Note: If you prefer to combine the intents while configuring Network ATC, consider specifying the QoS policy parameters for one adapter.