imageToday we have a real treat for you! In this blog post, Joshua Adams, who is a PM in the Microsoft EEC, shows you how to create a Windows Server 2012 based private cloud infrastructure using PowerShell scripts. We hadimage[4][1] the singular opportunity to work with Josh when we put together the collection of cloud infrastructure design patterns that you can find on TechNet. In this article, Josh shows you how to build out the infrastructure described in those articles. We had a great time working with Josh on that project and you’ll enjoy his PowerShell discussion here.

Make sure to comment and share this article Smile


imageComplementing the existing efforts to provide guidance around building a Cloud Infrastructure with Windows Server 2012, two additional pieces of collateral have been uploaded to the TechNet Gallery that help automate and streamline the overall scenario, showcasing not only great new features, but also the flexibility and utility of PowerShell.

Windows Server 2012 IaaS Build Tables: Step-by-Step with PowerShell Examples

Finding myself constantly building Windows Server 2012 IaaS clouds for both end-to-end scenario validation and customer presentations, I developed a macro-enabled Word document to help make the process repeatable, streamlined and easy to disseminate. The guide outlines all the needed steps to build various IaaS configurations along with the complete set of corresponding PowerShell commands. And the embedded macros make copying and pasting the cmdlets a snap, useful for both demos and deployments. In all, over 70 different PowerShell cmdlets are employed and described, many leveraging new features only found in Windows Server 2012, covering areas such as:

    • Networking (NIC Teaming, QoS, DCB, etc.)
    • Failover Clustering
    • Hyper-V
    • Storage Spaces
    • Disk Management (including MPIO)
    • Server Management
    • Active Directory
    • PowerShell

Below is an example section from a configuration leveraging shared SAS disks and Storage Spaces:

Cleaning Disks (some commands may be unnecessary depending on previous disk usage):

Download the guide now for a quick and concise reference for building IaaS clouds with Windows Server 2012!

Guide

SMB Share Configuration for Hyper-V Workloads

When leveraging SMB shares for Hyper-V storage (enabling separate scaling of compute and storage resources), specific permissions are needed on both the file system and share levels. In addition, remote management of the solution along with and Kerberos-based Live Migration (affording higher security) both require the configuration of Kerberos Constrained delegation. And although these settings can all be setup manually, either through the UI or PowerShell, combining all the steps into a single set of PowerShell scripts ensures reliability, repeatability and efficiency.

The SetupSMBSharesWithHyperV.ps1 script provides the main entry point and progresses through the following workflow, calling helper scripts as needed:

1. Setup necessary Active Directory groups, allowing permissions to be granted to groups rather than individual user objects

2. Setup Kerberos Constrained Delegation for remote scenario management and increased Live Migration security (based on Taylor Brown’s blog post)

3. Setup the SMB file share, exposed through the given Scale-Out File Server (based on Jose Barreto’s blog post)

4. Restart all Hyper-V nodes

5. Modify Hyper-V settings to reflect above modifications

And the only required script parameters are the:

    • Hyper-V Cluster Name (-HyperVClusterName)
    • Scale-Out File Server Name (-ScaleOutFSName)
    • SMB share Name (-ShareName)
    • AD Hyper-V Group Name (-HyperVObjectADGroupSamName)

SetupSMBSharesWithHyperV.ps1

Please keep the following notes in mind when using the scripts:

Download the scripts now to help streamline your Windows Server 2012 cloud deployments!

Enjoy!

Josh Adams
SENIOR PROGRAM MANAGER, WSSC PACE PM USA


I hope you enjoyed Josh’s article and if you have ideas for other automation tips and tricks for Josh to share, let us know!

HTH,

Tom Shinder
tomsh@microsoft.com
Principal Knowledge Engineer, SCD iX Solutions Group
Follow me on Twitter: http://twitter.com/tshinder
Facebook:
http://www.facebook.com/tshinder
image


Go Social with Building Clouds!
Building Clouds blog
Private Cloud Architecture Facebook page
Private Cloud Architecture Twitter account
Private Cloud Architecture LinkedIn Group
Cloud TechNet forums
TechNet Cloud and Datacenter Solutions Site
Cloud and Datacenter Solutions on the TechNet Wiki