Installing a Full SharePoint 2013 Load Balanced Lab
As an MCT and SharePoint Architect, I find myself creating a lot of SharePoint labs over the years and then prepping the labs
with exercises for my students or clients. In addition to that, I have to do the same for my continual studies on the
SharePoint platform and found that I waste a lot of time performing repetitive tasks.
Anyone familiar with SharePoint will know that once something goes wrong in an install, it is often a time consuming task to
find the cause of the issue to fix it. Something I do not want to do only days before I have to deliver a presentation or a class.
So I decided to document the creation of a small N-tier environment of an N-tier SharePoint farm. The rest of the article
illustrates how I went about doing this.
Installing and Configuring Hyper-V
My host laptop has the following specifications:
Brand: Lenovo ThinkPad W530
Processor: Intel Core i7-3740QM Processor (6M Cache, up to 3.70 GHz)
Memory: 16G currently (upgradeable to 32G)
I used Hyper-V version 6.2.9200.16384 for my virtualization software.
Go into virtual switch manager by right-clicking on your host name and selecting "Virtual Switch Manager…"
Click on "Create Virtual Switch"
In the name field, type "Internal" and select "Internal Network" under "Connection type"
The SharePoint farm will share some common components so that I do not have to recreate the same servers over and over
again. The shared components are the domain controller and database servers.
I have also used the "headless" or Server Core install for the database server and the domain controller since it is
less memory intensive and quite frankly, does not need the Windows GUI.
Here is a list of the machines and their roles:
Windows 2012 Server Standard Full
Windows 2012 Server Standard Full
Windows 2012 Server Standard Core
Windows 2012 Server Standard Core
Figure 1 : Physical Architecture of SharePoint Farm
Create virtual machines for the machines identified above and use the Operating System versions indicated in the
Once created, log into each machine and perform the following common tasks:
Disable Firewall - Open the PowerShell command prompt and type in this command:
netsh advfirewall set allprofiles state off
Set the IP Addresss by running the following command from the command prompt on each machine.
Remember to change highlighted IP address before running the command:
$NetIPIF = Get-NetIPInterface -AddressFamily IPv4 -ConnectionState Connected | ? InterfaceAlias -ne 'Loopback Pseudo-Interface 1'
If ($NetIPIF) {
$NetIPIF | Set-NetIPInterface -Dhcp Disabled
New-NetIPAddress -InterfaceAlias $NetIPIF.InterfaceAlias -IPAddress 10.0.10.132 -DefaultGateway 10.0.10.41 -AddressFamily IPv4 -PrefixLength 24
Set-DnsClientServerAddress -InterfaceAlias $NetIPIF.InterfaceAlias -ServerAddresses ('10.0.10.40','127.0.0.1')
}
Enable the Remote Desktop by doing the following
Type sconfig.cmd on the PowerShell command prompt
Change the Machine Name as specified in the table above:
From PowerShell, type sconfig.cmd
Enter new computer name (see table above)
For elevated user, type local admin user and password
Set the Host the IP address:
Go to Network Sharing Center on the host machine
Click on "Change Adapter Settings"
Select the adapter for the internal switch. It will be called something like "vEthernet (Internal Switch)"
Right click the adapter and select "Properties"
Select "Internet Protocol Version 4 (TCP/IP) and then click on Properties
Set the IP address to 10.0.10.1 and the subnet mask to 255.255.255.0 and click Ok. The virtual machines can now
communicate to the host and share files and you should be able to remote desktop into the Guest machines from the host.
This section contains instructions for performing some common tasks throughout this exercise.
Copying files from Host to Guest
Whether the Guest OS is Windows Server Core 2012 or Windows Server 2012 with the full GUI, start with:
Make sure that the Host drives are shared in remote desktop settings
You should be able to browse the shared drive from Windows Explorer on Guest VMs with a GUI
On a guest with a Windows Server 2012 Core OS, all you get is the command prompt. In order to access the Host drives,
you need to map the Host drives to a path. Type this at the command prompt:
Then you will get a drive letter that you can browse to
Joining a machine to the domain
Open the PowerShell command prompt
Add-computer -DomainName sukul.local -Credential sukul\Administrator -Restart
Wait for the machine to reboot and sign in as a domain user, like sukul\administrator
We will setup the domain controller and setup the following user and service accounts:
Chief Information Officer
Account for running the SQL Service
SharePoint farm service account
Mysites application pool account
The default Service Account to be used as the Application Pool account for most Service Applications
Account used to sync user data
The account used for crawling content
Object cache user accounts are user accounts which are given FullControl and FullRead privileges on Web Applications
so items can be cached by ASP.Net to improve performance
SUKUL\SP_CacheSuperReader
Object cache user accounts are user accounts which are given FullControl and FullRead privileges on Web Applications
so items can be cached by ASP.Net to improve performance
Start the DC machine, which has the Windows Server 2012 Core OS
Log in and you should see the command prompt
Type: Install-WindowsFeature -name AD-Domain-Services,DNS,DHCP
Copy the DC.ps1 powershell file to the c:\. Refer to section Copying files from Host to Guest on how to do this
Edit the default values in the script to customize it, for ex. like the domain name
From the PowerShell command prompt, navigate to C:\
Type .\DC.ps1 to execute the domain controller script
The database server is a Windows Server 2012 Core install. In order to install SQL Server 2012, the installation must be run in
"silent" mode. Here are the steps:
Join the SQL Server VM to the domain. Refer to section "Joining a machine to the domain"
Before you run the SQL Server installation on Windows Server 2012 Core, you will need to install the .Net Framework.
Otherwise, the installation will fail. To do so, attach the Windows Server 2012 Core ISO image to the DVD drive and run
Add-WindowsFeature NET-Framework-Core -Source D:\sources\sxs
Edit the "SQL Server Installation.config" file and optionally update the database instance name, service accounts,
product key and password. For more information, refer to this article.
Copy the "SQL Server Installation.config" file to the c:\ of the SQL Server virtual machine. To access the host drive,
refer to the section titled "Copying files from Host to Guest"
From the command prompt, type this to run the command prompt as the Administrator:
c:\ cmd /user:administrator
Then type the following command to run the SQL Server install in silent mode:
Setup.exe /QS /ConfigurationFile=c:\Config.INI
The client machine will be used to interact with SharePoint. It will have the Windows 8.1 OS and be domain joined. Steps:
Join the client machine to the domain. Refer to section "Joining a machine to the domain"
Log in as the sukul\administrator user
Install SQL Server 2012 Management studio
Verify that you can connect to the database created above
Edit the hosts file and add the following entries:
#10.0.10.131 intranet.sukul.com
#10.0.10.131 my.sukul.com
#10.0.10.132 intranet.sukul.com
#10.0.10.132 my.sukul.com
10.0.10.129 intranet.sukul.com
Join the SQL Server box to the domain. Refer to section "Joining a machine to the domain"
Download and extract AutoSPInstaller from here
Download and extract the AutoSPInstaller GUI from here
Download the sample AutoSPInstallerInput.xml config file from here and save it to the "SP\AutoSPInstaller" folder
that you created in step 1
Edit the AutoSPInstallerInput.xml file and enter the Product Key. You may also change any other details at this time.
Mount the SharePoint 2013 installation ISO to a DVD drive and copy its contents to the "SP\2013\SharePoint" folder
The installation is set to offline mode, which means that there is no expectation that the SharePoint server will be
connected to the internet. You will need to download all the pre-requites files to the
"SP\2013\SharePoint\PrerequisiteInstallerFiles" folder and you can use this script to do so from your host machine.
The folder should look like this:
Copy the SP folder containing the config files and the SharePoint installation files to the C:\ of the SharePoint
Open the PowerShell command prompt in the SharePoint virtual machine and select "run as administrator"
Navigate to the "SP\AutoSPInstaller" folder
Type AutoSPInstallerLaunch.bat [InputFile]
Wait for it to finish. If you get an error message, make sure that there are no spaces in the folders names
Repeat on the other SharePoint VM
Verify that you can access the SharePoint urls by uncommenting the WFE-A and WFE-B section and commenting out
the other sections in the Client Computer hosts file
If you have issues connecting to SQL Server and have enabled aliases, try this:
Run cliconfig in c:\Windows\System32, you will find the connection aliases. Once you delete them, you can test the connection to the server
by creating a .udl file on the desktop, and specifying server, Windows Auth, etc. and clicking the Test Connection button.
Ref: http://autospinstaller.codeplex.com/workitem/19412
Now that we have the Domain Controller, SQL Server and SharePoint installed across the 2 web servers, we need to load
balance them. We will install the Windows NLB software on both web front ends for this:
Copy the NLB.ps1 file to the c:\ of the first SharePoint server
Open the PowerShell command prompt
Repeat the process for the second SharePoint server
To verify, type the following in the PowerShell window:
You should see this output
In the client computer uncomment the NLB section in the hosts file and comment all the others.
You should be able to browse to intranet.sukul.com and my.sukul.com successfully
Copyright 2012 Shailen Sukul
Copyright 2012 Shailen Sukul