Академический Документы
Профессиональный Документы
Культура Документы
All About Cloud OS Blogs Datacenter Client Virtualization, File & Storage & Windows Server Identity & Access
Windows Server Management Management VDI & Remote High Availability Management
Desktop
0) Overview
In this document, I am sharing the steps I used to create a Windows Server 2012 R2 Scale-Out File Server Cluster
environment using only Azure VMs, for demo, test or development purposes.
This includes a few important tips and tricks to install Active Directory and Windows Server Failover Clustering in an Azure
VM environment which are not well known.
Following these steps will probably requires a reasonable amount of work, but it is a great way to experiment with a large
set of Microsoft technologies in or related to Windows Server 2012 R2, including:
Azure VMs
Azure Virtual Networks
Domain Name Services (DNS)
Active Directory Domain Services (AD-DS)
Failover Clustering
Scale-Out File Servers
PowerShell
You will need the following to perform the steps described here:
Any computer with access to the internet that can connect to Azure
An active Azure subscription (you can get a free trial from http://azure.com)
No server hardware is required. No download of Windows Server 2012 R2 is required.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 1/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Enter the name for the virtual network, the region closest to you and an affinity group name for the new virtual network.
Click on the right arrow on the bottom right to continue.
Leave everything blank on the “DNS Servers and VPN Connectivity” page. Click on the right arrow to continue.
Accept the default 10.0.0.0/8 address space and configure a subnet for 10.1.1.0/24. Click on the Check icon to finish
creating the virtual network. Then wait until the virtual network is created (this will take a moment).
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 2/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Enter the name for the storage account (URL), the affinity group (same you used on the virtual network) and click on
“Create Storage Account”. Wait for the storage account to be created (this will take a moment).
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 3/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Instead of using the “Quick Create” option, click on the “From Gallery” option to bring in the full wizard.
On the “Choose an Image” page, click on “Windows Server 2012 R2 Datacenter”. Click on the right arrow on the bottom
right to continue.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 4/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Use the latest release date, enter a virtual machine name for your domain controller, select the small size, enter a user
name and type in a password twice. Click on the right arrow on the bottom right to continue.
On this page, keep the default to “create a new cloud service”, keep the cloud service DNS name the same as the virtual
machine name, select the virtual name we created previously, select the subnet that we created previously, select the
storage account we created previously and keep the availability set to “(None)”. Click on the right arrow on the bottom
right to continue.
Keep all the defaults for the virtual machine configuration. Click on the Check icon to finish creating the virtual machine.
Then wait until the virtual machine is created (this will take a moment).
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 5/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Click on the network we created previously, then click on the option to show the “Dashboard”.
Verify that the newly created virtual machine is using the 10.1.1.4 IP address on the subnet specified.
Click on the Storage Account we created previously, then click on the option to show the “Containers”.
Verify that you have the blobs for the virtual machine VHD file and its associated status.
Verify you have a cloud service associated with the newly created virtual machine, using the correct availability group.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 6/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
On the bar at the bottom of the screen, click on the “Connect” icon to connect to your virtual machine.
You will be offered a link to a Remote Desktop session file. Click on the “Open” button to start the remote desktop session.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 7/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
On the Window Security dialog, enter a dot (.), followed by a backslash (\) and the name of the user you specified when
creating the virtual machine. The dot means "this computer". Enter the password you specified previously and Click “OK” to
continue.
In the final “Remote Desktop Connection” dialog, click “Yes” to accept the certificate. You will be connected to the virtual
machine.
NOTE: To avoid this warning (and, more importantly, to be more secure), you can create certificates to use with these RDP
connections by checking this page: http://msdn.microsoft.com/en-us/library/windowsazure/gg432987.aspx .
Inside the virtual machine, bring up a PowerShell command line and use the following two cmdlets to load the Active
Directory Domain Services role and promote this machine to a domain controller. This will take a while.
You will be prompted for a Safe Mode Administrator password twice. You will also be asked to confirm the operation.
After this, the configuration will start. This will take a while and you will see a few warnings.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 8/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
After the script finishes, the virtual machine will reboot and your Remote Desktop session will be disconnected.
Reconnect to the Azure VM using the instructions on step 6, this time using the new domain name instead of the dot (.)
used in the first logon. You should use the same username, though. Note that the first logon on the freshly installed
domain controller will take a little longer than usual.
Use the DNS Manager tool to verify that the DNS was properly configured:
Use the Active Directory Users and Computers tool to verify that the domain was properly configured:
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 9/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Click on the network we created previously, then click on the option to “Configure”.
Add a DNS Server to the empty list, specifying the name and IP address of the virtual machine you configured (10.1.1.4).
Click on the “Save” button on the bottom bar (shown above) to save the changes.
Confirm the changes to the virtual network. Wait for the configuration to complete (this will take a moment).
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 10/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Use the “+ New” link on the bottom left of the screen to add two virtual machines that we’ll use as file server cluster nodes.
Use steps similar to what you did in item 4, being careful to use the same Image, Storage Account, Virtual Network and
Subnet as the first one. Use an FS1 and FS2 suffix for their names.
Here’s what the configuration should look like after you create them:
Click on the network we created previously, then click on the option to show the “Dashboard”.
Make sure the VMs all use the same subnet. Note the IP addresses used by each one.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 11/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Using steps similar to item 6, connect to each of the two new virtual machines. Note that, on the first boot, you must use
the computer name when logging in.
The steps are described here just once, but you must perform them for both VMs.
After the first login, verify that the DNS configuration received via DHCP is correct by running this cmdlet from PowerShell
inside the virtual machine:
Next, configure the roles and features to be used (File Server and Clustering) using these PowerShell cmdlets:
Enter the domain credentials when prompted. The virtual machine will restart after that and you will be disconnected.
Reconnect to the Azure VM using the instructions on step 6, this time using the new domain name instead of the dot (.)
used in the first logon. You should use the same username, though.
Note that the first logon after you joined the domain will take a little longer than usual.
11) Confirm that the two file server nodes have joined the domain
Reconnect to the Azure VM running the DNS/domain controller using the instructions on step 8.
Use the DNS Manager tool to verify that the DNS is showing all three virtual machines:
Use the Active Directory Users and Computers tool to verify that the two file servers are now part of the domain:
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 12/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Connect to the Azure VM running the DNS/domain controller using the instructions on step 8.
Enable the iSCSI Target Server and configure it using the following PowerShell cmdlets:
Install-WindowsFeature FS-iSCSITarget-Server
MD C:\LUN
New-IscsiServerTarget -TargetName FileCluster -InitiatorID IPAddress:10.1.1.5,
IPAddress:10.1.1.6
New-IscsiVirtualDisk -DevicePath C:\LUN\LUN0.VHDX -Size 1GB
1..2 | % {New-IscsiVirtualDisk -DevicePath C:\LUN\LUN$_.VHDX -Size 20GB}
0..2 | % {Add-iSCSIVirtualDiskTargetMapping -TargetName FileCluster -DevicePath
C:\LUN\LUN$_.VHDX}
Verify using Server Manager that the iSCSI Target Server was properly created and that the LUNs are properly associated
with it. See sample below:
13) Configure the iSCSI Initiator on the File Server virtual machine
Configure them to use the newly created iSCSI Target using the following PowerShell cmdlets:
IMPORTANT: The next step should be performed only on first of the File Server VM, not both.
On the first File Server VM, initialize the iSCSI LUNs (disks 2, 3 and 4) using the following PowerShell cmdlets:
2..4 | % {
$d = “--WXY”[$_]
Set-Disk -Number $_ -IsReadOnly 0
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 13/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Set-Disk -Number $_ -IsOffline 0
Initialize-Disk -Number $_ -PartitionStyle MBR
New-Partition -DiskNumber $_ -DriveLetter $d –UseMaximumSize
Start-Sleep –Seconds 10
Initialize-Volume -DriveLetter $d -FileSystem NTFS -Confirm:$false
}
Verify using the Disk Management tool that you see the
From one of the two File Server cluster nodes, run cluster validation using the following PowerShell cmdlet:
Validation will take a while to complete. Here’s what you should expect as the output of that cmdlet:
Note that you have a warning. If you look into the report, you’ll see that it relates to the fact that you have a single network
for the cluster. Since this is a test configuration only, that’s fine.
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 14/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Now go ahead and create the cluster using the following PowerShell cmdlet:
There is one issue you will see in this environment, which is the fact that the DHCP address assigned to the Cluster Name
resource is invalid.
The Azure Network will give you the same IP that is already in use by one of the existing nodes, creating an IP Address
conflict. I assume this issue is caused by the fact that this Cluster Name resource is not known to Azure.
You can confirm the issue using the Failover Cluster Manager tool to view the Cluster Core Resources:
If you dig deeper in the event log, you will find the message about the duplicate IP address:
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 15/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
You can do this via the GUI or you can run the following PowerShell script:
With the cluster created, you can go ahead and configure it for a Scale-Out File Server and create a few continuously
available file shares.
You can do it from either of the two File Server cluster nodes, using the following PowerShell cmdlets:
MD C:\ClusterStorage\Volume1\DATA1
New-SmbShare -Name Share1 -Path C:\ClusterStorage\Volume1\DATA1 -FullAccess
JOSE.TEST\Jose
Set-SmbPathAcl –ShareName Share1
MD C:\ClusterStorage\Volume2\DATA2
New-SmbShare -Name Share2 -Path C:\ClusterStorage\Volume2\DATA2 -FullAccess
JOSE.TEST\Jose
Set-SmbPathAcl –ShareName Share2
You can check the configuration using the Failover Cluster Manager:
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 16/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
Get-ClusterResource | FT -AutoSize
Get-ClusterSharedVolume | FT -AutoSize
Get-SmbShare | FT -AutoSize
After you’re done with the demo/test/dev environment, don’t forget shutdown the VMs to save on your Azure
resources.
When bringing the VMs up again, make sure to start the DC VM first, so it gets the 10.1.1.4 IP address. The other
option would be to use a separate subnet just for the DC VM.
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.
Let me know how these steps worked for you using the comment section. If you run into any issues or found
anything particularly interesting, don’t forget to mention the number of the step.
Comments
31 Mar 2014 7:34 PM
Eric
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 17/18
4/16/2014 Deploying a Windows Server 2012 R2 Scale-Out File Server Cluster using Azure VMs - Jose Barreto's Blog - Site Home - TechNet Blogs
@Eric
http://blogs.technet.com/b/josebda/archive/2014/03/29/deploying-a-windows-server-2012-r2-scale-out-file-server-cluster-using-azure-vms.aspx 18/18