Install-WindowsFeature -name Failover-Clustering -IncludeManagementTools
netsh advfirewall set allprofiles state off
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value 0xffffffff
Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools
Set-Date -date "6/17/2018 5:10 AM
https://social.technet.microsoft.com/wiki/contents/articles/20885.hyper-v-update-list-for-windows-server-2012-r2.aspx
Tip: to check Fibre HBA driver versions, use "Get-WmiObject -class MSFC_FCAdapterHBAAttributes -computername MyTestServer -namespace "root\WMI" | Select-Object DriverVersion, FirmwareVersion, Manufacturer, Model, SerialNumber | Format-Table -AutoSize"
"rescan" | diskpart
Rename-NetAdapter -Name "Ethernet 5" -NewName iSCSI1
$netadapter = Get-NetAdapter -Name iSCSI1
$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 192.168.10.2 -PrefixLength 24 -Type Unicast
Set-DnsClientServerAddress -InterfaceAlias <name> -ServerAddresses <DNS IP1>,<DNS IP2>
Set-NetAdapterAdvancedProperty -Name iSCSI1 -RegistryKeyword "*JumboPacket" -RegistryValue 9014
New-NetLbfoTeam -name AdminTeam -TeamMembers VM1,VM2 -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort
''' New-VMSwitch "ConvergedSwitch" –NetAdapterName "ConvergedTeam" –MinimumBandwidthMode Weight –AllowManagementOS $false'''
''' Set-VMSwitch -Name "ConvergedSwitch" -DefaultFlowMinimumBandwidthWeight 0 '''
Add-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -SwitchName "ConvergedSwitch"
Add-VMNetworkAdapter -ManagementOS -Name "ClusterCSV" -SwitchName "ConvergedSwitch"
Set-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -MinimumBandwidthWeight 50
Set-VMNetworkAdapter -ManagementOS -Name "ClusterCSV" -MinimumBandwidthWeight 50
New-NetIPAddress -InterfaceAlias "vEthernet (LiveMigration)" -IPAddress 10.40.1.123 -PrefixLength "16"
New-NetIPAddress -InterfaceAlias "vEthernet (ClusterCSV)" -IPAddress 10.30.1.133 -PrefixLength "16"
"Get-vmnetworkadapter -ManagementOS | fl"
Set-Service -Name MSiSCSI -StartupType Automatic
Start-Service MSiSCSI
Install-WindowsFeature Multipath-IO
Enable-WindowsOptionalFeature –Online –FeatureName MultiPathIO
Enable-MSDSMAutomaticClaim -BusType iSCSI
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
Set-MPIOSetting -NewDiskTimeout 60
Connecting to an iSCSI SAN:
- New-IscsiTargetPortal -TargetPortalAddress 192.168.30.10
- Get-IscsiTarget | fl
- Use 'iscsicpl' to configure iSCSI targets or, as an example, connect using something like: "Connect-IscsiTarget -NodeAddress iqn.2001-05.com.equallogic:8-cb2b76-66f2c8e4a-67859b190555933f-vm2012 -AuthenticationType ONEWAYCHAP -ChapUsername liquid_chap2012 -ChapSecret chappassword–IsMultipathEnabled $True -IsPersistent $True"
- Initialize a disk, if it's new: "Get-Disk | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "VMs2012-2" -Confirm:$false"
- Install-WindowsFeature Multipath-IO
- Enable-WindowsOptionalFeature –Online –FeatureName MultiPathIO
- Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
- Set-MPIOSetting -NewDiskTimeout 60
- Update-MPIOClaimedHW (and restart the server)
- Launch mpiocpl. If the expected device (COMPELNT, for example) isn't in the devices list, click on the "Discover Multi-Paths" tab and add the FC SAN from the Others list (COMPELNT, for example). Restart the server.
- To rescan available disks, use " "rescan" | diskpart "
- Initialize a disk, if it's new: "Get-Disk | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "VMs2012-2" -Confirm:$false"
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。