Windows Server 2012 Beta Scale-Out File Server for SQL Server 2012 - Step-by-step Installation

Windows Server 2012 Beta Scale-Out File Server for SQL Server 2012 - Step-by-step Installation

  • Comments 8
  • Likes

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

 


 

1. Introduction

1.1. Overview

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:

clip_image001

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:

  • Hyper-V
  • Networking
  • Domain Name Services (DNS)
  • Active Directory Domain Services (AD-DS)
  • iSCSI Target
  • iSCSI Initiator
  • Failover Clustering
  • File Servers
  • PowerShell

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.

1.2. Hardware

You will need the following hardware to perform the steps described here:

  • Computer capable of running Windows Server 2012 Beta and Hyper-V (64-bit, virtualization technology) with at least 8GB of RAM
  • An 8GB USB stick, if you’re installing Windows Server from USB and copying the downloaded software around (you can also burn the software to a DVD)
  • Internet connection for downloading software and updates (DHCP enabled)

1.3. Software

You will need the following software to perform the steps described here:

1.4. Notes and disclaimers

  • This document does not include a screenshot for every single step in the process. I focused the screenshots on specific decision points where defaults are not used or the course of action is not clear.
  • The text for each step also focuses on the specific actions that deviate from the default or where a clear default is not provided. If you are asked a question or required to perform an action that you do not see described in these steps, go with the default option.
  • Obviously, a single-computer solution can never be tolerant to the failure of that computer. So, the configuration described here is not really continuously available. It’s just a simulation.
  • The configuration described here is for demo, testing or learning. You would definitely need a different configuration for a production deployment.
  • A certain familiarity with Windows administration and configuration is assumed. If you're new to Windows, this document is not for you. Sorry...
  • There are usually several ways to perform a specific configuration or administration task. What I describe here is one of those many ways. It's not necessarily the best way, just the one I personally like best at the moment.

2. Install Windows Server 2012 Beta

2.1. Preparations

  • Format a USB disk using Windows 8 Consumer Preview or Windows Server 2012 Beta.
  • Copy the contents of the Windows Server 2012 Beta ISO file to the USB disk.
  • To read the files from within the ISO file using Windows 8 Consumer Preview or Windows Server 2012 beta, just double click the ISO file to mount it.
  • Make sure the computer BIOS is configured for Virtualization.
  • Each computer BIOS is different, so you need to find the right settings.

2.2. Install the OS

  • Use your computer’s BIOS option to boot from the USB disk.
  • After “Windows Setup” starts from the USB disk, enter the required information to install the OS:
  • Select language, time and currency format and keyboard. Then click “Next”.
  • Click “Install Now”.
  • Select the “Windows Server 8 Beta Datacenter - Server with a GUI” option and click “Next”.
     
    clip_image002[7]
     
  • Accept the license agreement and click “Next”.
  • Select the “Custom: Install Windows only” option.
  • Select the install location for Windows Server and click “Next”.
  • Wait for the installation to complete. This will take a few minutes.
  • After the installation is completed, the OS will boot.
  • Type the administrator password twice, then click on “Finish”.

2.3. Rename the computer

  • Login to the computer using the Administrator password and rename the computer.

2.3.PS. Using PowerShell

Rename-Computer DEMO-HV0 -Restart

2.3.GUI. Using Server Manager

  • In Server Manager, click on “Local Server” on the list on left.
  • Click on the default name next to “Computer Name”.
  • Click on “Change”.
  • Enter “DEMO-HV0” as the new Computer Name and click “OK”.
  • Accept the option to restart the computer.

2.4. Enable Remote Desktop

  • Log in using the Administrator account and enable Remote Desktop.
  • After completing this step, you will be able work from a Remote Desktop connection.

2.4.GUI. Using Server Manager

  • In Server Manager, click on “Local Server” on the list on left.
  • Click on the “Disabled” item next to “Remote Desktop”.
  • Select the option to “Allow connections from computers running any version…”
  • Click “OK” multiple times until you’re back to the “Local Server” screen.

3. Configure the Hyper-V Host

3.1. Install the Hyper-V role to the server

  • Install the Hyper-V role and the required management tools. The computer will restart.

3.1.PS. Using PowerShell

Install-WindowsFeature Hyper-V, Hyper-V-PowerShell, Hyper-V-Tools -Restart

3.1.GUI. Using Server Manager

  • In Server Manager, click on “Dashboard” on the list on left.
  • Click on the “Add Roles and Features”, which is option 2 under “Configure this local server”.
  • On the “Before You Begin” page, just click “Next”.
  • On the “Installation Type” page, click “Role-base or feature-based installation” and click “Next”.
  • On the “Server Selection” page, select your server and click “Next”.
  • On the “Server Role” page, select “Hyper-V”.
  • On the “Add features that are required for Hyper-V” dialog, click “Add features”, then click “Next”.
     
    clip_image003
     
  • On the “Features” page, just click “Next”.
  • On the “Hyper-V” page, just click “Next”.
  • On the “Create Virtual Switches” page, just click “Next”.
  • On the “Virtual Machine Migration” page, just click “Next”.
  • On the “Default Stores” page, just click “Next”.
  • On the “Confirmation” page, click “Restart target machine automatically if needed”, click “Yes” to confirm and then click “Install”.
  • The role will be installed and the computer will restart in the end.

3.2. Create the VM switches

  • Create one external virtual network (VM switch that is connected to the external network interface).
  • Create three internal virtual networks (VM switches used just to communicate between the VMs).

3.2.PS. Using PowerShell

Get-NetAdapter

clip_image004

Rename-NetAdapter –InterfaceDescription *Gigabit* -NewName External
New-VMSwitch –Name External -NetAdapterName External
1..3 | % { New-VMSwitch -Name Internal$_ -SwitchType Internal }
Get-VMSwitch
Get-NetAdapter

clip_image005

  • Note: If you’re connected via “Remote Desktop” to the server, you might temporarily lose the connection when you create the External VMSwitch.
    If using DHCP on that interface, you will be able to reconnect. If you’re using static IP addresses, you should run this step locally, not via “Remote Desktop”.

3.2.GUI. Using Hyper-V Manager

  • In Server Manager, click on “Tools” in the upper left and select “Hyper-V Manager”
  • In Hyper-V Manager, click on the server name (DEMO-HV0) on the pane on the left
  • On the task pane on the right, click on the “Virtual Switch Manager”
     
    clip_image006
     
  • Use the “New virtual switch” option to add 1 network named “External”, select “External” for type and select your physical NIC. Click “Apply” to confirm.
  • Use the “New virtual switch” option to add 3 networks named “Internal1”, “Internal2” and “Internal3”, each of type “Internal”.

    clip_image007
  • After creating the four new NICs, you should see the four new NICs in Server Manager, under Local Server:
     
    clip_image008
     

3.3. Rename the network adapters

  • You should now configure the 4 virtual network interfaces on the parent.
  • This includes renaming them to the names of the switches and configuring static IP addresses for the 3 internal NICs (the external NIC should be DHCP enabled, so it does not need IP address configuration).

3.3.PS. Using PowerShell

1..3 | % {Rename-NetAdapter –InterfaceDescription Internal$_ -NewName Internal$_}
Rename-NetAdapter –InterfaceDescription External -NewName VirtualExternal
Get-NetAdapter

clip_image009
 

3.3.GUI. Using Server Manager

  • In Server Manager, click on “Local Server” on the list on left.
  • In the properties pane on the right, scroll to see the list of “Wired Internet Connections” (there will be 4 of them, as we showed in the previous Server Manager screenshot).
  • Click on the “Ipv4 address…” link next to one of the interfaces, the “Network Connections” window will show.
  • Select the interface that shows as “Enabled” and click on “Rename this connection” to rename it to “External”.
  • Rename the 3 interfaces on an “Unidentified network” to “Internal1”, “Internal2” and “Internal3”
     
    clip_image010
     
  • Close the “Network Connections” and refresh the “Local Server” view. You should see the results below:
     
    clip_image011
     

3.4. Assign static IP addresses for the Hyper-V host

  • In this step, you will assign a static IP address to the 3 internal virtual NICs on the parent partition.
  • These NICs initially use the default setting (DHCP), but there is no DHCP server for the internal network.
  • The table below shows the desired configuration for each interface.

Machine

Virtual
External

Internal1

Internal2

Internal3

Parent

DHCP

192.168.101.100

192.168.102.100

192.168.103.100

  • Note 1: The VirtualExternal network does not need any further configuration, since the default is already to use DHCP.
  • Note 2: The preferred DNS IP address for all 3 internal interfaces should be set to 192.168.101.1 (that will be the IP address of the DNS server we will configure later).

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 Unicast
Set-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1
}

Get-NetIPAddress –AddressFamily Ipv4 | FT
 
clip_image012
 

  • Note: The static IPv4 address has to be added twice because you need to add both to the active configuration and to the persistent configuration that is re-applied when you reboot.

3.4.GUI. Using Server Manager

  • In Server Manager, click on “Local Server” on the list on left.
  • In the properties pane on the right, scroll to see the list of Ethernet interfaces (there will be 4 of them)
  • Click on the “Ipv4 address…” link next to one of the interfaces, the “Network Connections” window will show
  • On the list of network connections, right click the Internal1 interface and click “Properties”
  • On the “Internal1 Properties” window, select “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties”.
  • On TCP/IPv4 Properties window, select the option to “Use the following IP address”.
  • Enter the IP address 192.168.101.100 and the subnet mask 255.255.255.0 (as shown below).
  • Select the option “Use the following DNS server address”, enter 192.168.101.1 and click “OK”
  • Repeat this for the Internal2 and Internal3 networks, making sure to use the correct IP address (see table shown in item 3.4) and use the same Preferred DNS server IP address.
  • Close the “Network Connections” and refresh the “Local Server” view.

4. Create the Base VM

4.1. Preparations

  • Create a folder for your ISO files at C:\ISO and a folder for your VMs at C:\VMS
  • Copy the Windows Server 2012 Beta ISO file to C:\ISO

4.2. Create a Base VM

  • Create a new VM that will be used as the base image for our 5 VMs.
  • Store it in the C:\VMS folder and attach the Windows Server 2012 Beta ISO file to it.

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

  • In Windows Explorer, create a new C:\VMS folder.
  • In Server Manager, click on “Tools” in the upper left and select “Hyper-V Manager”.
  • In Hyper-V Manager, click on the server name on the pane on the left.
  • On the task pane on the right, click on “New”, then click on “Virtual Machine…”.
  • On the “Before you begin” page, just click “Next”.
  • On the “Specify Name and Location” page, use “Base” for the name, and “C:\VMS” for location. Click “Next”.
     
    clip_image013
     
  • On the “Assign Memory” page, use “1024” MB and click “Next”.
  • On the “Configure Networking” page, use “External”.
  • On the “Connect Virtual Disk” page, select the option to “Create a virtual hard disk”.
  • Use “Base.vhdx” for name, “C:\VMS” for location and “127” GB for size. Click “Next”.
     
    clip_image014
     
  • On the “Installation Options” page, select the option to install from DVD, select the option to use an ISO file and enter the path to the Windows Server 2012 beta ISO file on your C:\ISO folder. Click “Finish”.
     
    clip_image015
     
  • In Hyper-V Manager, right-click the VM and select “Start”

4.3. Install Windows Server 2012 Beta on the VM

  • In Server Manager, click on “Tools” in the upper left and select “Hyper-V Manager”.
  • In Hyper-V Manager, click on the server name on the pane on the left.
  • On the list of VMs, right-click the VM called “Base” and click on “Connect…”
  • Follow the instructions on the screen, as you did in item 2.2.
  • Set a password, but don’t install any roles.
  • Don’t bother renaming the computer, since we’re sysprep’ing the VM anyway.

4.4. Sysprep the VM

  • After you have the OS installed on the VM, sign in and run C:\Windows\System32\Sysprep\Sysprep.exe
  • Select the options to run the OOBE, generalize and shutdown:
     
    image
     
  • After Sysprep completes, the VM will be shut down.

4.5. Remove the base VM

  • Remove the BASE VM, leaving just the BASE.VHDX.
  • You should have a new base VHD ready to use at C:\VMS\BASE.VHD. Its size should be around 9GB.

4.5.PS. Using PowerShell

Remove-VM Base

4.5.GUI. Using Hyper-V Manager

  • In Hyper-V Manager, click on the server name on the pane on the left
  • On the list of VMs, right-click the VM called “Base” and click on “Delete”

5. Configure the 5 VMs

5.1. Create 5 new differencing VHDs using the Base VHD

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

  • In Hyper-V Manager, click on the server name on the pane on the left.
  • On the task pane on the right, click on “New”, then click on “Hard disk…”
  • On the “Before you begin” page, just click “Next”.
  • On the “Choose disk format” page, select “VHDX” and click “Next”.
  • On the “Choose disk type” page, select “Differencing”.
     
    clip_image018
     
  • On the “Specify Name and Location” page, use “VM1.VHDX” for name and “C:\VMS” for location. Click “Next”.
  • On the “Configure disk” page, use “C:\VMS\BASE.VHDX” for the location of the parent VHD.
  • After this, you will have a new differencing VHD at VM1.VHD that’s 4MB in size.
  • Since we’re creating 5 VMS, copy that file into VM2.VHD, VM3.VHD, VM4.VHD and VM5.VHD.
     
    clip_image019
     

5.2. Create 5 similarly configured VMs

  • You should create five VMs as follows:

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

  • Note 1: Each VM will use one of the VHD files we created in the previous step.
  • Note 2: Each VM will use 1GB of memory.

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

  • In Hyper-V Manager, click on the server name on the pane on the left.
  • On the task pane on the right, click on “New”, then click on “Virtual Machine…”
  • On the “Before you begin” page, just click “Next”.
  • On the “Specify Name and Location” page, use “VM1” for the name, and “C:\VMS” for location. Click “Next”.
  • On the “Assign Memory” page, use “1024” MB and click “Next”.
  • On the “Configure Networking” page, use “External”.
  • On the “Connect Virtual Disk” page, select the option to “Use an existing virtual hard disk”.
  • Use “C:\VMS\VM1.vhdx” for name. Click on “Finish”.
  • In Hyper-V Manager, click on the server name on the pane on the left.
  • On the list of VMs, right-click the VM you just created (VM1) and click on “Settings…”
  • On the “Settings for VM1” window, select “Add Hardware”, then “Network Adapter”.
  • Select the “Internal1” interface and click OK.
  • Repeat the process for VMs 2 to 5.
  • For VMs 3 to 5, make sure to add networks Internal2 and Internal3 as well Internal1.

5.3. Start the 5 VMs

5.3.PS. Using PowerShell

Start-VM VM*

5.3.GUI. Using Hyper-V Manager

  • In Hyper-V Manager, click on the server name on the pane on the left
  • In Hyper-V Manager, multi-select VMs 1 to 5, right click them and click on “Start”

5.4. Complete the mini-setup for the 5 VMs

  • Using Hyper-V manager, multi-select VMs 1 to 5, right click them and click on “Connect…”
  • Let the mini-setup complete, and configure each of the five VMs.
  • You will be prompted for a product key (you can skip that), license agreement, clock/language/region settings and a password.

5.5. Change the computer name for each VM

  • Change the computer name for each VM, using the names defined in item 5.2
  • The examples below are for VM1 (the DNS and Domain Controller).
  • You should repeat this for each of the 5 VMs.
  • At this point, you can also use this opportunity to enable Remote Desktop for each VM.
  • This would be done for each VM as you did for the host in item 2.4, if you want to access the VMs remotely.

5.5.PS. Using PowerShell (for VM1, for instance)

Rename-Computer DEMO-DC -Restart

5.5.GUI. Using Server Manager (for VM1, for instance)

  • In Server Manager, click on “Local Server” on the list on left.
  • Click on the default name next to “Computer Name”.
  • Click on “Change”.
  • Enter the new computer name as “DEMO-DC”.
  • Click “OK” accept the changes.
  • Click “OK” to acknowledge that you need to restart to apply changes.
  • Click “Restart Now”.

5.6. For each VM, configure the networks

  • In this step you will configure the network for each VM as shown on the table in item 5.2
  • We first rename the Network Connections in each guest for easy identification.
  • The External network is identified as being the only one with a DHCP address.
  • The remaining networks are renamed to Internal1, Internal2 and Internal3.
  • For internal networks static IPs are configured, with mask 255.255.255.0 and DNS set to 192.168.101.1.
  • The Internal 1 network will be used for DNS, Active Directory and the iSCSI Target.
  • The External network is useful for downloading from the Internet and remotely connecting to the 5 VMs.
  • You could configure a DHCP server for the internal interfaces.
  • However, due to the risk of accidentally creating a rogue DHCP server in your network, fixed IPs are used.

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
}

5.6.GUI. Using Server Manager (For VM1, for instance)

  • This step is similar to step 3.4, but this time performed on the 5 VM.
  • Inside the VM, in Server Manager, click on “Local Server” on the list on left.
  • In the properties pane on the right, Click on the “Ipv4 address…” link next to one of the interfaces.
  • The “Network Connections” window will show.
  • As you did with the Hyper-V host, rename the NIC with the DHCP connection to “External”.
    This NIC needs no further configuration.
  • Rename the remaining NIC to “Internal1”. (Other VMs will also have Internal2 and Internal3).
  • For each internal NIC, right click the Internal1 interface and click “Properties”.
  • On the “Internal1 Properties” window, select “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties”.
  • On TCP/IPv4 Properties window, select the option to “Use the following IP address”.
  • Enter the corresponding IP address (see table on item 5.2) and the subnet mask 255.255.255.0.
  • Select the option “Use the following DNS server address”, enter 192.168.101.1 and click “OK”.
  • Repeat this for the Internal2 and Internal3 networks using the corresponding IP address and the DNS above.
  • Close the “Network Connections” and refresh the “Local Server” view.

 

  • Note: If you can’t tell which Internal network is which inside the VMs with multiple Internal networks, you can temporarily set one of the adapters to “Not Connected” in the VM Settings and verify which one shows as “Network cable unplugged”.

5.7. Review VM name and network configuration

  • After renaming the computer, renaming the network and configuring IP addresses, review the configuration on each VM to make sure you did not miss any step. Examples are shown below for VM1 and VM3.

5.7.PS. Using PowerShell

Get-WmiObject Win32_ComputerSystem
Get-NetAdapter
Get-NetIPAddress -AddressFamily IPv4 -Store Active | Sort IfIndex | FT
 
clip_image020
 
clip_image021
 

5.7.GUI. Using Server Manager

  • In Server Manager, click on “Local Server” on the list on left.
  • Verify the network configuration.

6. Configure DNS and Active Directory

6.1. Install DNS and Active Directory Domain Services

  • Install the required DNS and Active Directory Domain Services roles to VM1 (DEMO-DC)

6.1.PS. Using PowerShell

Install-WindowsFeature DNS, AD-Domain-Services, RSAT-AD-PowerShell, RSAT-ADDS-Tools

6.1.GUI. Using Server Manager

  • In Server Manager, click on “Dashboard” on the list on left.
  • Click on the “Add Roles and Features”, which is option 2 under “Configure this local server”.
  • On the “Before You Begin” page, just click “Next”.
  • On the “Installation Type” page, click “Role-base or feature-based installation” and click “Next”.
  • On the “Server Selection” page, select your server and click “Next”.
  • On the “Server Role” page, select “Active Directory Domain Services”.
  • On the dialog about adding required services, click “Add Features”.
  • On the “Server Role” page, select “DNS Server” and click “Next”.
  • On the dialog about adding required services, click “Add Features”. 
     
    clip_image022
     
  • On the “Feature” page, just click “Next”.
  • On the “Active Directory Domain Services” page, just click “Next”.
  • On the “DNS Server” page, just click “Next”.
  • On the “Confirmation” page, click “Install”.
  • The roles will be installed.

6.2. Configure Active Directory

  • Create a new domain and forest for the DEMO.TEST domain.

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

  • Open Server Manager and click on the “AD DS” option on the right.
  • On the yellow band showing “Configuration Required for Active Directory...” click “More…”
  • On the “All Server Task Details”, click on the action to “Promote this server…”
  • The “Active Directory Domain Services Configuration Wizard” will start.
  • On the “Deployment Configuration” page, select “Add a new forest”.
  • Enter “DEMO.TEST” as the root domain name and click “Next”.
  • On the “Domain Controller Option”, enter the password twice and click “Next”.
  • On the “DNS Options” page, click “Next”.
  • On the “Additional Options” page, click “Next”. (NETBIOS name check takes a while)
  • On the “Paths” page, click “Next”.
  • On the “Review Options” page, click “Next”.
  • On the “Pre-requisites” page, click “Next”. (Pre-requisite checks takes a while)
  • Click “Install”.

6.3. Join the other VMs to the domain

  • After the Domain Controller reboots, for every one of the other 4 VMs, join the domain
  • You will need to provide the domain name (DEMO.TEST) and the Administrator credentials
  • From now on, always log on to any of the VMs using the domain credentials: DEMO.TEST\Administrator

6.3.PS. Using PowerShell (for VM2 to VM5)

Add-Computer -DomainName DEMO.TEST -Restart

6.4. Create the SQL Service account

  • In the Domain Controller, use Active Directory Users and Computers to create a new user account for SQL.
  • The account should be called SQLService and should not require change in the next logon.
  • Set a password for the SQLService account.

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

  • Open Server Manager
  • In the Tools menu on the upper right, select “Active Directory Users and Computers”
  • Right click the “Users” container on the tree on the left, then select “New”, then “User”
  • Enter “SQLService” as Full Name and User Logon Name, then click “Next”
  • Enter the password twice as required
  • Uncheck “user must change password at next logon” and check “Password never expires”
  • Click “Next”, then click “Finish”

7. Configure iSCSI

  • We’ll create a single Target with 3 Devices (LUNs or VHD files) and used by 2 initiators (DEMO-F1 and DEMO-F2).
  • The devices will include a 1GB VHD for the Cluster Witness volume and two 20GB VHDs for the data volumes.
  • We’ll then configure the initiators and volumes from the File Server side.

7.1. Add the iSCSI Software Target

  • Add the iSCSI Software Target role service to VM2 (DEMO-IT.DEMO.TEST)

7.1.PS. Using PowerShell

Install-WindowsFeature FS-iSCSITarget-Server

7.1.GUI. Using Server Manager

  • In Server Manager, click on “Dashboard” on the list on left
  • Click on the “Add Roles and Features”, which is option 2 under “Configure this local server”
  • On the “Before You Begin” page, just click “Next”
  • On the “Installation Type” page, click “Role-base or feature-based installation” and click “Next”
  • On the “Server Selection” page, expand “File and Storage Services”, then “File Services”
  • Select the “iSCSI Target Server”
  • On the dialog about adding required services, click “Add Features” 
     
    clip_image023
     
  • Click “Next”
  • On the “Feature” page, just click “Next”
  • On the “Confirmation” page, click “Install”
  • The role will be installed

7.2. Create the LUNs and Target

  • Create the 1st LUN with the file at C:\LUN0.VHD, 1GB in size, description “LUN0”.
  • Create the 2nd and 3rd LUNs at C:\LUN1.VHD and C:\LUN2.VHD, both with 20GB.
  • Add those to a single target, exposed to two initiators by IP address (192.168.101.3 and 192.168.101.4)

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

  • In Server Manager, click on “File and Storage Services” on the list on left
  • Click on “iSCSI Virtual Disks”
  • On the “Tasks” menu on the right, select “New Virtual Disk…”
  • The “New iSCSI Virtual Disk Wizard” will start
  • On the “Virtual Disk Location” page, with the DEMO-IT server and “C:” volume selected, click “Next”
  • On the “Virtual Disk Name” page, enter “LUN0” as the Name, then click “Next”
  • On the “Virtual Disk Size” page, enter 1GB as the size, then click “Next”
  • On the “iSCSI Target” page, with the “New iSCSI target” option selected, click “Next”
  • On the “iSCSI Target Name” page, enter “FileCluster” as the name, then click “Next”
  • On the “Access Servers” page, click on “Add…”
  • Select “Enter a value...”, select “IP Address”, enter “192.168.101.3”, then click “OK”
  • On the “Access Servers” page, click on “Add…” again
  • Select “Enter a value...”, select “IP Address”, enter “192.168.101.4”, then click “OK”
  • With the two iSCSI Initiators specified, click “Next”
  • On the “Enable Authentication” page, click “Next”
  • On the “Confirmation” page, click “Create”
  • When the wizard is done, click “Close”.
  • On the “Tasks” menu on the right, select “New Virtual Disk…”
  • The “New iSCSI Virtual Disk Wizard” will start
  • On the “Virtual Disk Location” page, with the DEMO-IT server and “C:” volume selected, click “Next”
  • On the “Virtual Disk Name” page, enter “LUN1” as the Name, then click “Next”
  • On the “Virtual Disk Size” page, enter 20GB as the size, then click “Next”
  • On the “iSCSI Target” page, with the “Select Existing iSCSI target” option selected, click “Next”
  • On the “Confirmation” page, click “Create”
  • When the wizard is done, click “Close”.
  • Repeat the steps above to create a LUN2 with 20GB and add to the same target.

7.3. Configure the iSCSI Initiators

  • Now we shift to the two File Servers, which will run the iSCSI Initiator.
  • We’ll do this on VM3 and VM4 (or DEMO-F1 and DEMO-F2).
  • Make sure to log on using the domain administrator (DEMO\Administrator), not the local Administrator.
  • You will then start the iSCSI Initiator, configuring the service to start automatically.
  • You will then connect the initiator to the iSCSI Target we just configured on DEMO-IT

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

  • Open Server Manager
  • In the Tools menu on the upper right, select “iSCSI Initator”
  • Click on “Yes” on the prompt about automatically starting the iSCSI Initiator.
  • Enter “192.168.101.2” on the Target field and click the “Quick Connect…” button next to it.
  • Verify the status shows as “Connect” and click on “Done”
  • Click on the “Volume and Devices” tab and click on the “Auto Configure” button.
  • Verify that three volumes show up on the Volume List.
  • Click “OK” to close the iSCSI Initiator.

7.4. Configure the disks

  • In only one of the two file server nodes, configure the three disks (the iSCSI LUNs).
  • They first need to be onlined, initialized and partitioned (we’re using MBR partitions, since the disks are small).
  • Then you will format them and assign each one a driver letter (W:, X: and Y:).
  • Drive W: will be the used as witness disks, while X: and Y: will be data disks for the file server cluster.

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

  • Open the Disk Management tool
  • Online all three offline disks (the iSCSI LUNs)
  • Initialize them (you can use MBR partitions, since they are small)
  • Create a new Simple Volume on each one using all the disk space on the LUN
  • Quick-format them with NTFS as the file system
  • Assign each one a drive letter (W:, X: and Y:)

8. Configure the File Server

8.1 Install the required roles and features

  • Now we need to configure VM3 and VM4 as file servers and cluster nodes

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

  • For both DEMO-F1 and DEMO-F2, from Server Manager, select Add Role and check File and Storage Services.
  • Next, select Add Feature and check Failover Clustering

8.2. Validate the Failover Cluster Configuration

8.2.PS. Using PowerShell (From VM3, DEMO-F1)

Test-Cluster -Node DEMO-F1, DEMO-F2

8.2.GUI. Using Server Manager

  • On VM3 (DEMO-F1), open Server Manager.
  • On the Tools menu on the upper right, select “Failover Cluster Manager”
  • In Failover Cluster Manager and click on the option to “Validate a Configuration…”
  • The “Validate a Configuration Wizard” will start. Click “Next”
  • Add the two file servers: DEMO-F1 and DEMO-F2. Then click “Next”
  • Select the option to “Run all tests”. Click “Next”. Click “Next” again to confirm.
  • Let the validation process run. It will take a few minutes to complete.
  • Validation should not return any errors.
  • If it does, review the previous steps and make sure to address any issues listed in the validation report.

8.3. Create a Failover Cluster

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

  • On VM3 (DEMO-F1), open Server Manager.
  • On the Tools menu on the upper right, select “Failover Cluster Manager”
  • In Failover Cluster Manager and click on the option to “Create a Cluster…”
  • The “Create a Cluster Wizard” will start. Click “Next”
  • Add the two file servers: DEMO-F1 and DEMO-F2. Then click “Next”
  • Enter the Cluster Name: DEMO-FC. Then click “Next”
  • Click “Next” again to confirm.
  • Click “Finish” after the cluster is created.

8.4. Configure the Cluster Networks

  • For consistency, you should rename the Cluster networks to match the names used previously.
  • You should also configure the Internal networks to be used by cluster, but not the External one.

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

  • In Failover Cluster Manager, expand the nodes until you find the “Networks” node.
  • For each network, right-click the name and click “Properties”.
  • Enter the name Internal1, Internal2, Internal3 or External, according to their IP addresses.
  • For the External network, make sure “Allow cluster…” is selected and “Allow clients…” is *not* checked.
  • For all Internal networks, select “Allow cluster…” and check the “Allow clients…” checkbox.

8.5. Add data disks to Cluster Shared Volumes (CSV)

  • Add the disks to the list of Cluster Shared Volumes.

8.5.PS. Using PowerShell (From VM3, DEMO-F1)

Get-ClusterResource | ? OwnerGroup -like Available* | Add-ClusterSharedVolume

8.5.GUI. Using Server Manager

  • In Failover Cluster Manager, expand the nodes until you find the “Storage” node.
  • Select the two disks currently assigned to “Available Storage”.
  • Right click the two selected disks and click on “Add to Cluster Shared Volumes”

8.6. Create the Scale-Out File Server

  • Create a Scale-Out File Server.

8.6.PS. Using PowerShell (From VM3, DEMO-F1)

Add-ClusterScaleOutFileServerRole -Name DEMO-FS

8.6.GUI. Using Server Manager

  • On the Failover Cluster Manager, select the main node on the tree (with the cluster name)
  • On the actions menu on the right, select “Configure Role…”
  • The “High Availability Wizard” will start. Click “Next”
  • On the “Select Role” page, select “File Server” and click “Next”
  • On the “File Server Type” page, select “File Server for scale-out application data” and click “Next”
  • On the “Client Access Point” page, specify the name of the service as DEMO-FS
  • On the “Confirmation” page, click “Next”.
  • Click “Finish” after the configuration is completed.

8.7. Create the folders and shares

  • In this step, you will create two shares: one for database files and one for log files

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

8.7.GUI. Using Server Manager

  • On the Failover Cluster Manager, select the Roles node on the tree on the left.
  • Click on the DEMO-FS role and then click on “Add Shared Folder” on the actions menu on the right.
  • The “New Share Wizard” will start.
  • On the “Select Profile” page, select “SMB Share – Server Application” and click “Next”
  • On the “Share Location” page, select “C:\ClusterStorage\Volume1” as the location. Click “Next”.
  • On the “Share Name” page, enter “Data” as the share name, click “Next”.
  • On the “Other Settings” page, just click “Next”
  • On the “Permissions” page, click on “Customize permissions…”
  • Click on “Add”, then click on “Select a Principal”.
  • Enter “DEMO\Administrator”, click on “Check Names” and then click “OK”.
  • Click “Full Control” and click “OK”.
  • Click on “Add”, then click on “Select a Principal”.
  • Enter “DEMO\SQLService”, click on “Check Names” and then click “OK”.
  • Click “Full Control” and click “OK”.
  • Click “OK”, then click on “Next”, then click on “Create”
  • Click on “Close” after the wizard finishes creating the share.
  • Repeat the process for a share called “LOG” on Volume2.

9. Configure the SQL Server

9.1. Mount the SQL Serve ISO file

  • Copy the SQL Server 2012 ISO file to the C:\ISO folder.
  • Mount that in the DVD for VM5, DEMO-DB.

9.1.PS. Using PowerShell

Set-VMDvdDrive –VMName VM5 -Path C:\ISO\SQLFULL_ENU.iso

9.1.GUI. Using Hyper-V Manager

  • In Server Manager, click on “Tools” in the upper left and select “Hyper-V Manager”
  • In Hyper-V Manager, click on the server name on the pane on the left
  • Right-click VM5 and click on “Connect…”
  • In the “Media” menu, select “DVD Drive” and then “Insert Disk…”
  • Point to the SQL Server 2012 ISO file under the C:\ISO folder.

9.2. Run SQL Server Setup

  • From VM5 (DEMO-DB), run SQL Server 2012 setup from the DVD.
  • In the “SQL Server Installation Center”, click on “Installation”, then select “New SQL Server stand-alone…”
  • Let it verify the SQL Server Setup Support Rules pass and click “OK”
  • Select “Evaluation” under “Specify a free edition” and click “Next”
  • Review the licensing terms and click “Next”
  • “SQL Server 2012 Setup” will start. Let it verify Setup Support Rules pass and click “Next”.
  • In the “Setup Role” page, select “SQL Server Feature Installation” and click “Next”.
  • In the “Feature selection” page, select only the “Database Engine Services” and the “Management Tools”.
  • Use the default directories. Click “Next”.
  • In the “Installation Rules” page, click “Next”.
  • In the “Instance Configuration” page, click “Next”
  • In the “Disk Space Requirements” page, click “Next”.
  • In the “Server Configuration” page, enter “DEMO.TEST\SQLService” as the account name for the SQL Server Database Engine and the SQL Server Agent, set them both to start automatically. Click “Next”
     
    clip_image024
     
  • In the “Database Engine Configuration” page, click on “Add Current User”.
  • Click on the “Data Directories” tab. Enter “\\DEMO-FS\DATA” as the “Data Root Directory”.
  • Fix the two path for Log directories to use “\\DEMO-FS\LOG” instead of the data folder.
     
    clip_image025
     
  • You will be prompted to confirm the right permissions are assigned on the share. Click “Yes”.
     
    clip_image026
     
  • On the “Error reporting” page, click “Next”
  • On the “Installation Configuration Rules” page, click “Next”
  • On the “Ready to Install” page, click “Install”
  • The installation will complete.

9.3. Create a database using the clustered file share

  • On the SQL Server VM, open SQL Server Management Studio.
  • On the “Connect to Server” window, accept the default server name and authentication. Click “Connect”.
  • Right click the main node, select Properties and click on the “Database Settings”.
  • Verify that that the “Database default locations” point to the file shares entered earlier.
     
    clip_image027
     
  • Click “OK” to close the “Server Properties”.
  • Expand the tree on the left to find the Databases node.
  • Right-click “Databases” and select “New Database…”
  • Enter “Orders” as the database name and note the path pointing to the clustered file share.
  • Scroll the bar to the right to see the Path column:
     
    clip_image028
     
  • Click “OK” to create the database.

10. Verify SMB features

10.1. Verify that SMB Multichannel is working

  • Use PowerShell to verify that SMB is indeed using multiple interfaces.

10.1.PS. Using PowerShell (from VM5, DEMO-DB)

Get-SmbConnection
Get-SmbMultichannelConnection
 
clip_image029

10.2. Query the SMB Sessions and Open Files

  • Use PowerShell to verify sessions and open files.

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
 
clip_image030
 

10.3. Transparently move SQL Client between file server nodes

  • Use SMB Transparent Failover and Witness to move the SMB Client (SQL Server) between the two File Server cluster nodes.

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
 
clip_image031

10.4. Survive the loss of a client NIC

  • Observe that SMB Multichannel will protect the SQL Server from the failure of a NIC.

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
 
clip_image032[4]

11. Shut down, startup and install final notes

  • Keep in mind that there are dependencies between the services running on each VM.
  • To shut them down, start with VM5 and end with VM1, waiting for each one to go down completely before moving to the next one.
  • To bring the VMs up, go from VM1 to VM5, waiting for the previous one to be fully up (with low to no CPU usage) before starting the next one.
  • You might want to also take a snapshot of the VMs after you shut them down, just in case you want to bring them back to the original state after experimenting with them for a while.
  • If you do, you should always snapshot all of them, again due to dependencies between them. Just right-click the VM and select the “Snapshot” option.
  • As a last note, the total size of the VHD files (base plus 5 diffs), after all the steps were performed, was around 19 GB.
     
    clip_image033

12. Conclusion

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.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 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

    to

    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