Creating cluster node domain controller adapters the
Fig: Architecture of the solution marked with key components, parameters, connections
Mapped to the technical requirements of the following components- a domain controller,
- a storage server,
- a failover cluster with at least two nodes,
- an application server (Hyper-V) running the service (hosting VMs)
2. |
|
---|
4. creating cluster node on domain controller
4. |
---|
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
6. |
|
---|
#config storage network
#--------------------------
$mac1="00-00-03-90-01-01"
$adaptername=$adapters[0]
$ipadd='192.168.111.1'
$gateway='192.168.111.1’
#based on the mac address to find the adapter’s interface netif
$netif=(Get-NetAdapter | where {$_.MacAddress -eq $mac1}).InterfaceIndex $netname=(Get-NetAdapter | where {$_.MacAddress -eq $mac1}).name
#remove the existing IP to add new address
Remove-NetIpAddress -InterfaceIndex $netif -AddressFamily IPv4 -Confirm:$false Remove-NetRoute -InterfaceIndex $netif -AddressFamily IPv4 -Confirm:$false New-NetIPAddress -IPAddress $ipadd -prefixlength 24 -DefaultGateway $gateway InterfaceIndex $netif
rename-netadapter -name $netname -newName $adaptername8. Adding Addforest commands to the comain controller
Remove-VM -Name $VMName -Force
New-VM -Name $VMName -BootDevice VHD -VHDPath c:\miao\vhds\XYZVH-1.vhdx -Path C:\miao -Generation 2
SET-VMProcessor –VMName $VMName –count 3
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 1GB -StartupBytes 4GB -MaximumBytes 4GB -Priority 80 -Buffer 25
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
Get-VMNetworkAdapter -VMName $VMName | Set-VMNetworkAdapter
-MacAddressSpoofing On
remove-VMNetworkAdapter -VMName $VMName -Name "Network Adapter"
#only cluster node needs hearbeat network
For ($i=0; $i -lt 3; $i++) {
$adaptername=$adapters[$i]
$switchname=$switches[$i]
$mac=$macs[$i]
Add-VMNetworkAdapter -VMName $VMName -Name $adaptername -SwitchName $switchname -StaticMacAddress $mac
}
#reboot and login again
#allow ping through firewall
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
6. creating storage network and setting DNS client server Network
#config storage network
#--------------------------
$i=0
$mac1=$macs[$i]
$adaptername=$adapters[$i]
$ipadd=’172.20.10.9’
$gateway='172.20.10.1'
$netif=(Get-NetAdapter | where {$_.MacAddress -eq $mac1}).InterfaceIndex $netname=(Get-NetAdapter | where {$_.MacAddress -eq $mac1}).name
Remove-NetIpAddress -InterfaceIndex $netif -AddressFamily IPv4 -Confirm:$false Remove-NetRoute -InterfaceIndex $netif -AddressFamily IPv4 -Confirm:$false New-NetIPAddress -IPAddress $ipadd -prefixlength 24 -DefaultGateway $gateway -InterfaceIndex $netif
rename-netadapter -name $netname -newName $adaptername