A blog by Jose Barreto, a member of the File Server team at Microsoft.
All messages posted to this blog are provided "AS IS" with no warranties, and confer no rights.
Information on unreleased products are subject to change without notice.
Dates related to unreleased products are estimates and are subject to change without notice.
The content of this site are personal opinions and might not represent the Microsoft Corporation view.
The information contained in this blog represents my view on the issues discussed as of the date of publication.
You should not consider older, out-of-date posts to reflect my current thoughts and opinions.
© Copyright 2004-2012 by Jose Barreto. All rights reserved.
Follow @josebarreto on Twitter for updates on new blog posts.
IMPORTANT: This blog post is now obsolete. For the latest version of this content, please visit:http://blogs.technet.com/b/josebda/archive/2012/08/23/windows-server-2012-scale-out-file-server-for-sql-server-2012-step-by-step-installation.aspx
In this document, I am sharing all the steps I used to create a Windows Server 2012 Beta demo, so you can experiment with some of the new technologies yourself. You only need a single computer (the specs are provided below) and the ISO file with the Windows Server 2012 Beta available right now as a free download. For the SQL part, you will need the SQL Server 2012 evaluation version, which is also available as a free download.
The demo setup includes 5 virtual machines: one domain controller, one iSCSI target, two file servers and a SQL server. You need the iSCSI target and two file servers because we’re using Failover Clustering to showcase SMB Transparent Failover and SMB Scale-Out. We’ll also use multiple Hyper-V virtual networks, so we can showcase SMB Multichannel. Here’s what it should look like:
This will probably require a few hours of work end-to-end, but it is a great way to experiment with a large set of Microsoft technologies in Windows Server 2012 Beta, including:
Follow the steps and let me know how it goes in the comment section. If you run into any issues or found anything particularly interesting, don’t forget to mention the number of the step.
You will need the following hardware to perform the steps described here:
You will need the following software to perform the steps described here:
2.3.PS. Using PowerShell
Rename-Computer DEMO-HV0 -Restart
2.3.GUI. Using Server Manager
2.4.GUI. Using Server Manager
3.1.PS. Using PowerShell
Install-WindowsFeature Hyper-V, Hyper-V-PowerShell, Hyper-V-Tools -Restart
3.1.GUI. Using Server Manager
3.2.PS. Using PowerShell
Get-NetAdapter Rename-NetAdapter –InterfaceDescription *Gigabit* -NewName External New-VMSwitch –Name External -NetAdapterName External 1..3 | % { New-VMSwitch -Name Internal$_ -SwitchType Internal } Get-VMSwitch Get-NetAdapter
Get-NetAdapter
Rename-NetAdapter –InterfaceDescription *Gigabit* -NewName External New-VMSwitch –Name External -NetAdapterName External 1..3 | % { New-VMSwitch -Name Internal$_ -SwitchType Internal } Get-VMSwitch Get-NetAdapter
3.2.GUI. Using Hyper-V Manager
3.3.PS. Using PowerShell
1..3 | % {Rename-NetAdapter –InterfaceDescription Internal$_ -NewName Internal$_} Rename-NetAdapter –InterfaceDescription External -NewName VirtualExternal Get-NetAdapter
3.3.GUI. Using Server Manager
Machine Virtual External Internal1 Internal2 Internal3 Parent DHCP 192.168.101.100 192.168.102.100 192.168.103.100
Machine
Virtual External
Internal1
Internal2
Internal3
Parent
DHCP
192.168.101.100
192.168.102.100
192.168.103.100
3.4.PS. Using PowerShell
1..3 | % { Set-NetIPInterface –InterfaceAlias Internal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -Confirm:$false New-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -IPv4Address "192.168.10$_.100" -PrefixLength 24 -Type UnicastSet-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1 } Get-NetIPAddress –AddressFamily Ipv4 | FT
1..3 | % { Set-NetIPInterface –InterfaceAlias Internal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -Confirm:$false New-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -IPv4Address "192.168.10$_.100" -PrefixLength 24 -Type UnicastSet-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1 }
Get-NetIPAddress –AddressFamily Ipv4 | FT
3.4.GUI. Using Server Manager
4.2.PS. Using PowerShell
MD C:\VMS New-VHD -Path C:\VMS\BASE.VHDX -Dynamic -SizeBytes 127GB New-VM -Name Base -VHDPath C:\VMS\BASE.VHDX -SwitchName External -Memory 1GB Set-VMDvdDrive –VMName Base -Path C:\ISO\WindowsServer8-Beta-64bit-English.iso Start-VM Base
4.2.GUI. Using Hyper-V Manager
Remove-VM Base
4.5.GUI. Using Hyper-V Manager
5.1.PS. Using PowerShell
1..5 | % { New-VHD -ParentPath C:\VMS\BASE.VHDX –Path C:\VMS\VM$_.VHDX }
5.1.GUI. Using Hyper-V Manager
VM Role Computer Name External Internal 1 Internal 2 Internal 3 VM1 DNS, DC DEMO-DC.DEMO.TEST DHCP 192.168.101.1 N/A N/A VM2 iSCSI Target DEMO-IT.DEMO.TEST DHCP 192.168.101.2 N/A N/A VM3 File Server 1 DEMO-F1.DEMO.TEST DHCP 192.168.101.3 192.168.102.3 192.168.103.3 VM4 File Server 2 DEMO-F2.DEMO.TEST DHCP 192.168.101.4 192.168.102.4 192.168.103.4 VM5 SQL Server DEMO-DB.DEMO.TEST DHCP 192.168.101.5 192.168.102.5 192.168.103.5
VM
Role
Computer Name
External
Internal 1
Internal 2
Internal 3
VM1
DNS, DC
DEMO-DC.DEMO.TEST
192.168.101.1
N/A
VM2
iSCSI Target
DEMO-IT.DEMO.TEST
192.168.101.2
VM3
File Server 1
DEMO-F1.DEMO.TEST
192.168.101.3
192.168.102.3
192.168.103.3
VM4
File Server 2
DEMO-F2.DEMO.TEST
192.168.101.4
192.168.102.4
192.168.103.4
VM5
SQL Server
DEMO-DB.DEMO.TEST
192.168.101.5
192.168.102.5
192.168.103.5
5.2.PS. Using PowerShell
1..5 | % { New-VM -Name VM$_ -VHDPath C:\VMS\VM$_.VHDX -Memory 1GB -SwitchName External} 1..5 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal1 } 3..5 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal2 } 3..5 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal3 }
5.2.GUI. Using Hyper-V Manager
5.3.PS. Using PowerShell
Start-VM VM*
5.3.GUI. Using Hyper-V Manager
5.5.PS. Using PowerShell (for VM1, for instance)
Rename-Computer DEMO-DC -Restart
5.5.GUI. Using Server Manager (for VM1, for instance)
5.6.PS. Using PowerShell (for VM1, for instance)
## External NIC is the only one with a DHCP server Get-NetIPAddress -PrefixOrigin “DHCP” | % ` {Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName External} ## $IC – Internal Count – Number of Internal networks $IC=0 Get-NetAdapter Wired* | Sort MacAddress | % { ` $IC++ Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName Internal$IC } ## $VM is the VM Number, between 1 and 5. Used as the last portion of the IP address. $VM=1 1..$IC | % { Set-NetIPInterface –InterfaceAlias Internal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 –Confirm:$false New-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -IPv4Address "192.168.10$_.$VM" -PrefixLength 24 -Type Unicast Set-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1 }
## External NIC is the only one with a DHCP server Get-NetIPAddress -PrefixOrigin “DHCP” | % ` {Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName External}
## $IC – Internal Count – Number of Internal networks $IC=0 Get-NetAdapter Wired* | Sort MacAddress | % { ` $IC++ Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName Internal$IC }
## $VM is the VM Number, between 1 and 5. Used as the last portion of the IP address. $VM=1 1..$IC | % { Set-NetIPInterface –InterfaceAlias Internal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 –Confirm:$false New-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 -IPv4Address "192.168.10$_.$VM" -PrefixLength 24 -Type Unicast Set-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1 }
5.6.GUI. Using Server Manager (For VM1, for instance)
5.7.PS. Using PowerShell
Get-WmiObject Win32_ComputerSystem Get-NetAdapter Get-NetIPAddress -AddressFamily IPv4 -Store Active | Sort IfIndex | FT
5.7.GUI. Using Server Manager
6.1.PS. Using PowerShell
Install-WindowsFeature DNS, AD-Domain-Services, RSAT-AD-PowerShell, RSAT-ADDS-Tools
6.1.GUI. Using Server Manager
6.2.PS. Using PowerShell
Import-Module ADDSDeployment Install-ADDSForest ` -CreateDNSDelegation:$false ` -DatabasePath "C:\Windows\NTDS" ` -DomainMode "Win2008R2" ` -DomainName "DEMO.TEST" ` -DomainNetBIOSName "DEMO" ` -ForestMode "Win2008R2" ` -InstallDNS:$true ` -LogPath "C:\Windows\NTDS" ` -RebootOnCompletion ` -SafeModeAdministratorPassword (Read-Host -AsSecureString -Prompt "Enter Password") ` -SYSVOLPath "C:\Windows\SYSVOL"
6.2.GUI. Using Server Manager
6.3.PS. Using PowerShell (for VM2 to VM5)
Add-Computer -DomainName DEMO.TEST -Restart
6.4.PS. Using PowerShell
New-ADUser -Name SQLService –Enabled $True -UserPrincipalName SQLService@DEMO.TEST ` -DisplayName SQLService -ChangePasswordAtLogon $False -PasswordNeverExpires $True ` -AccountPassword (Read-Host -AsSecureString "Enter password")
6.4.GUI. Using Server Manager
7.1.PS. Using PowerShell
Install-WindowsFeature FS-iSCSITarget-Server
7.1.GUI. Using Server Manager
7.2.PS. Using PowerShell
New-IscsiServerTarget -TargetName FileCluster ` -InitiatorID IPAddress:192.168.101.3, IPAddress:192.168.101.4 New-IscsiVirtualDisk -DevicePath C:\LUN0.VHD -Size 1GB 1..2 | % {New-IscsiVirtualDisk -DevicePath C:\LUN$_.VHD -Size 20GB} 0..2 | % {Add-iSCSIVirtualDiskTargetMapping -TargetName FileCluster -DevicePath C:\LUN$_.VHD}
7.2.GUI. Using Server Manager
7.3.PS. Using PowerShell
Set-Service MSiSCSI -StartupType automatic Start-Service MSiSCSI New-iSCSITargetPortal -TargetPortalAddress 192.168.101.2 Get-iSCSITarget | Connect-iSCSITarget Get-iSCSISession | Register-iSCSISession
7.3.GUI. Using Server Manager
7.4.PS. Using PowerShell
1..3 | % { $d = “-WXY”[$_] Set-Disk -Number $_ -IsReadOnly 0 Set-Disk -Number $_ -IsOffline 0 Initialize-Disk -Number $_ -PartitionStyle MBR New-Partition -DiskNumber $_ -DriveLetter $d –UseMaximumSize Initialize-Volume -DriveLetter $d -FileSystem NTFS -Confirm:$false }
7.4.GUI. Using Server Manager
8.1.PS. Using PowerShell (From both VM3 and VM4)
Install-WindowsFeature File-Services, FS-FileServer, Failover-Clustering Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature Install-WindowsFeature RSAT-File-Services -IncludeAllSubFeature
8.1.GUI. Using Server Manager
8.2.PS. Using PowerShell (From VM3, DEMO-F1)
Test-Cluster -Node DEMO-F1, DEMO-F2
8.2.GUI. Using Server Manager
8.3.PS. Using PowerShell (From VM3, DEMO-F1)
New-Cluster –Name DEMO-FC -Node DEMO-F1, DEMO-F2
8.3.GUI. Using Server Manager
8.4.PS. Using PowerShell (From VM3, DEMO-F1)
(Get-ClusterNetwork | ? Address -like 192.168.101.* ).Name = "Internal1" (Get-ClusterNetwork | ? Address -like 192.168.102.* ).Name = "Internal2” (Get-ClusterNetwork | ? Address -like 192.168.103.* ).Name = "Internal3” (Get-ClusterNetwork | ? Name -notlike Internal* ).Name = "External" (Get-ClusterNetwork Internal1).Role = 3 (Get-ClusterNetwork Internal2).Role = 3 (Get-ClusterNetwork Internal3).Role = 3 (Get-ClusterNetwork External).Role = 1
8.4.GUI. Using Server Manager
8.5.PS. Using PowerShell (From VM3, DEMO-F1)
Get-ClusterResource | ? OwnerGroup -like Available* | Add-ClusterSharedVolume
8.5.GUI. Using Server Manager
8.6.PS. Using PowerShell (From VM3, DEMO-F1)
Add-ClusterScaleOutFileServerRole -Name DEMO-FS
8.6.GUI. Using Server Manager
8.7.PS. Using PowerShell (From VM3, DEMO-F1)
MD C:\ClusterStorage\Volume1\DATA ICACLS.EXE C:\ClusterStorage\Volume1\DATA --% /grant DEMO.TEST\Administrator:(CI)(OI)F ICACLS.EXE C:\ClusterStorage\Volume1\DATA --% /grant DEMO.TEST\SQLService:(CI)(OI)F MD C:\ClusterStorage\Volume2\LOG ICACLS.EXE C:\ClusterStorage\Volume2\LOG --% /grant DEMO.TEST\Administrator:(CI)(OI)F ICACLS.EXE C:\ClusterStorage\Volume2\LOG --% /grant DEMO.TEST\SQLService:(CI)(OI)F New-SmbShare -Name DATA -Path C:\ClusterStorage\Volume1\DATA ` -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService New-SmbShare -Name LOG -Path C:\ClusterStorage\Volume2\LOG ` -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService
MD C:\ClusterStorage\Volume1\DATA ICACLS.EXE C:\ClusterStorage\Volume1\DATA --% /grant DEMO.TEST\Administrator:(CI)(OI)F ICACLS.EXE C:\ClusterStorage\Volume1\DATA --% /grant DEMO.TEST\SQLService:(CI)(OI)F
MD C:\ClusterStorage\Volume2\LOG ICACLS.EXE C:\ClusterStorage\Volume2\LOG --% /grant DEMO.TEST\Administrator:(CI)(OI)F ICACLS.EXE C:\ClusterStorage\Volume2\LOG --% /grant DEMO.TEST\SQLService:(CI)(OI)F
New-SmbShare -Name DATA -Path C:\ClusterStorage\Volume1\DATA ` -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService
New-SmbShare -Name LOG -Path C:\ClusterStorage\Volume2\LOG ` -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService
8.7.GUI. Using Server Manager
9.1.PS. Using PowerShell
Set-VMDvdDrive –VMName VM5 -Path C:\ISO\SQLFULL_ENU.iso
9.1.GUI. Using Hyper-V Manager
10.1.PS. Using PowerShell (from VM5, DEMO-DB)
Get-SmbConnection Get-SmbMultichannelConnection
10.2.PS. Using PowerShell (from VM3, DEMO-F1 or VM4, DEMO-F2)
Get-SmbSession Get-SmbOpenFile | Sort Path Get-SmbOpenFile | Sort Path | FT Path
10.3.PS. Using PowerShell (from VM3, DEMO-F1 or VM4, DEMO-F2)
Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F1 Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName
10.4.PS. Using PowerShell (from VM5, DEMO-DB)
Get-SmbMultichannelConnection Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20 Get-SmbMultichannelConnection Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 Get-SmbMultichannelConnection
Get-SmbMultichannelConnection Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20
Get-SmbMultichannelConnection
Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 Get-SmbMultichannelConnection
I hope you enjoyed these step-by-step instructions. I strongly encourage you to try them out and perform the entire installation yourself. It’s a good learning experience.
Jose,
As always, a very well written and informative blog. Thanks a ton for this instructional.
We have a new post that covers Windows Server "8" Beta and File Servers. It provides step-by-step instructions
by STB Blogger
New tools to support interoperability with SQL Server 2012
Microsoft has introduced a variety of tools that allow consistent data access to SQL Server 2012 across multiple platforms. These allow developers to build secure, highly
Great document! I had to make some changes to the powershell examples to get it to work correctly. Here's what I did:
At 5.6.PS, I changed:
Get-NetIPAddress -PrefixOrigin "DHCP"
to
Get-NetAdapter -InterfaceAlias “Wired Ethernet Connection”
At 8.3.PS I changed:
New-Cluster -Name DEMO-FC -Node DEMO-F1, DEMO-F2
New-Cluster –Name DEMO-FC -Node DEMO-F1, DEMO-F2 -StaticAddress 192.168.101.10 -IgnoreNetwork 192.168.102.0/24, 192.168.103.0/24
@Robb
Thanks for experimenting with Windows Server "8" beta!
On step 5.6.PS, it's probably because your external interface is not connected to a DHCP network.
On step 8.3.PS, the intent is to have all networks properly configured. Again, the issue is probably due to not having the External configured with DHCP, gateway, etc.
But it's great that you were able to tweak the PowerShell to fit your specific configuration requirements.
As it can be difficult to locate all of our public content related to Storage and FileSystems on various
was having few issues with gateway and ip addressing information as I am unable to talk to each vm for some reason. Can someone elaborate how IP addressing is used in the scenario.
i have 192.168.1.x address with GW:192.168.31.254.
@IP Networking Issue
In your case, it seems like your external network is already using the 192.168.x.x address space. I would suggest that you use another set of IP addresses for your internal networks so there is no conflict.
For instance, you could use 10.1.101.x, 10.1.102.x and 10.1.103.x instead of the 192.168.101.x, 192.168.102.x and 192.168.103.x used in the blog post. If you use both the 10.x.x.x and 192.168.x.x addresses in your network already, you can use 172.16.1.x, 172.16.2.x and 172.16.3.x for your three internal networks.
You can read more about IP addresses for private networks at en.wikipedia.org/.../Private_network