SCVMM: Creating System Center VMs using PDT for Hybrid Scenario

These are instructions on how to automatically build out the virtual machines related to the Hybrid IT camps we are running around the world using the PDT tool.  You will start with nothing other than a physical server running Windows Server 2012 R2 Hyper-V and at the end have 8 virtual machines (all System Center components and roles configured minus the Windows Azure pack and SCSM data warehouse server) which are able to connect up to the internet through the Gateway VM.  The focus of "hybrid" in this case is enabling all of the connection points from System Center 2012 R2 to Windows Azure.

After building out this environment, you can do labs to learn about all of the System Center + Azure hybrid scenarios enabled: http://aka.ms/hybridlabs

Hardware Requirements

The following minimum physical server requirements are recommended:

  • 1 Physical Server capable of running Hyper-V role on Windows Server 2012 R2
  • 2 CPU cores
  • Memory
    • 16GB minimum to run VMs after build.  In order to build the VMs at this RAM level, you’d have to customize the default variable.xml which is un-tested at this amount of RAM.  Running all 9 VMs post-build with only 16 GB of RAM you will likely experience performance degradation, so it is recommended you power off/on some VMs depending on what you would like to show for better performance.  In particular, SCSM and SCOM take up more memory to run optimally.
    • 24 GB of memory minimum to build the environment with un-customized provided variable.xml file (highly recommended).  All VMs post-deployment also run reasonably well with this amount of RAM.
  • 2 Physical NICs
  • ~250 GB of local storage space available - beyond what is taken up by the core OS install.

Hardware Recommendations

To ensure optimal performance, we additionally recommend.

  1. SSD based storage
  2. CPU: 4 cores
  3. Memory:
    • 32GB of memory recommended for build and post-deployment for optimal performance.
  4. Very high speed internet connection

Software Requirements

Most of the software required to deploy your lab environment and complete the labs in this guide is downloaded automatically for you. To build your lab environment, you will need to manually download the following:

  • System Center Build Tools - Additional build automation is provided by the System Center Build Tools.

    You can download these tools at http://aka.ms/HybridPDT  

Additional Software Tools and Prerequisites

The following additional tools and prerequisites are downloaded and installed for you automatically by the Hybrid IT Camp build tool scripts and the PowerShell Deployment Toolkit (PDT).

http://technet.microsoft.com/en-us/evalcenter/hh670538.aspx

 

Virtual Machines and System Center 2012 R2 Roles

The following virtual machines are created if you accept the default configuration in the PowerShell Deployment Toolkit Variable (SCBUILD).xml that is included in the SCBuildTools package.  The default size for the data disks is a 100 GB dynamically expanding vhdx.

Name

Function

CPU

Memory

# Data Disks

IP

DC01

Domain Controller

2 vCPU

2 GB

4

10.0.0.101

SCVMM01

VMM/App Controller

2 vCPU

2 GB

1

10.0.0.102

SCO01

Orchestrator

2 vCPU

2 GB

1

10.0.0.103

SCOM01

Operations Manager

2 vCPU

6 GB

1

10.0.0.104

SCSM01

Service Manager

2 vCPU

6 GB

1

10.0.0.105

SCSM02

Service Manager Self-service portal

2 vCPU

2 GB

1

10.0.0.106

SCDPM01

Data Protection Manager

2 vCPU

2 GB

1

10.0.0.107

Gateway01

External internet access for lab

1 vCPU

1 GB

1

10.0.0.108

Setup Guide Folder Structure

The following table shows the default folder structure used by this setup guide. It is not recommended at this time to modify the SCBuild or PDT paths defined in the Set-PrePDTSetup.ps1 script, but you can modify the paths for the other 3 folders based on your disk space requirements. Please note the potential disk space required when deciding on a location for your folder structure.

Description

Default Path

Defined In

System Center Build Tools

C:\SCBuild (~15 MB)

C:\SCBuild\Set-PrePDTSetup.ps1

PowerShell Deployment Toolkit

C:\PDT (~4 MB)

C:\SCBuild\Set-PrePDTSetup.ps1

System Center Installation Files

C:\Installer (~40 GB)

C:\PDT\Variable.xml

Virtual Hard Disk Parent Files

C:\VHD (~14GB)

C:\PDT\Variable.xml

Virtual Machines

C:\VMs (~150GB)

C:\PDT\Variable.xml

 

PDT Build Process

These procedures assume you are starting with an un-configured physical server that meets the minimum requirements outlined at the beginning of this document.

Task 1: Prepare lab host server for deployment

  1. Install Microsoft Windows Server 2012 R2 Datacenter on a physical server.  Make sure you are using the (Server with a GUI) option.

  2. After the Hyper-V role and features are installed, restart your lab server using the following PowerShell command. Restart-Computer

  3. Add a new internal Hyper-V switch with the following command from PowerShell run as an administrator:

    New-VMSwitch -Name CorpNet01 -SwitchType Internal

  4. Download ITCamps-Hybrid.zip and extract the contents to the C:\SCBuild directory.  The file structure should look like this:

  5.  

  6. Move the C:\SCBuild\PDT folder to C:\PDT.  Now your C:\SCBuild directory should look like this:

Task 2: Modify the PowerShell Deployment Toolkit variable.xml to customize lab deployment.

  1. Edit the C:\PDT\Variable.xml and review current settings
    1. Modify Installer folder location based on disk space requirements.

<Variable Name="Download" Value="C:\Installer" />

  1. Modify location of VM folder based on disk space requirements.

<VMFolder>D:\VMs</VMFolder>

  1. Modify location of parent differencing disks based on disk space requirements.
  2. <VHDFolder>D:\VMs</VHDFolder>
  3. Modify location of parent differencing disks based on disk space requirements.

<Parent>D:\VHD\WS12R2D.vhdx</Parent>

  1. If you are installing the Service Manager Self Service Portal, you will also need to modify the location of the Windows Server 2008 R2 SP1 parent disk.

<Parent>D:\VHD\WS08R2E-SP1.vhdx</Parent>

  1. Optional – for faster deployment performance you may consider increasing the default CPU cores and adding additional max RAM for SCOM and SCSM.
  1. Based on this lab, no other modifications should be required as long as you meet the recommended memory requirements listed in the Hardware Requirements section. If you lab server only has 16GB of RAM, you will need to insure the Maximum memory of all virtual servers do not exceed 12GB.

Task 3: Download System Center 2012 R2 Installation media and prerequisites.

  1. Right-click on Windows PowerShell in the Taskbar and select Run as Administrator.
  2. CD C:\PDT and run ./Downloader.ps1 –DeploymentOnly
    • The DeploymentOnly switch tells the downloader to only download the System Center 2012 R2 installation media and requirements based on the roles you defined in the Variable.xml file.
  3. This process will take anywhere from 3-6 hours depending on network speed.
  4. While this process runs, you can create your parent VHDX disks.

Task 4: Create the Parent VHD disks

  1. On a drive with adequate disk space, create a folder called VHD, example D:\VHD. This location should match location you specified in the Variable.xml.
  2. Right-click on Windows PowerShell in the Taskbar and select Run as Administrator.
  3. Execute the following command to create your Windows Server 2012 R2 parent disk. This command assumes you kept the default folder locations.

C:\PDT\Convert-WindowsImage.ps1 -SourcePath C:\Installer\Download\WindowsServer2012R2\Windows_Server_2012_R2-Evaluation-Datacenter_Edition–EN-US-X64.ISO -VHDFormat VHDX -SizeBytes 80GB –SKU ServerDataCenterEval -VHDPath C:\VHD\WS12R2D.vhdx

 

  1. Confirm the parent disk was created. The path and name should match EXACTLY the parent value you chose in the Variable.xml
  2. If you are deploying the Service Manager SharePoint Self Service portal, repeat and create a parent disk for Windows Server 2008 R2 SP1 and again, make sure the VHD filename matches the value for Parent in the Variable.xml

Task 5: Run VM Creator

Once the Downloader process is complete, you are ready to deploy your System Center 2012 R2 lab environment. The VMCreator script including with the Powershell Deployment Toolkit will create all the VM’s required for you labs, install Active Directory on the domain controller VM and then install all System Center 2012 R2 prerequisites, including Microsoft SQL Server 2012 and all the System Center roles defined in the Variable.xml. There is no need to run the PDT Installer script in this mode.

  1. The VMCreator.ps1 script uses settings from the C:\PDT\Variable.xml file. You should have already reviewed the settings in this file and made adjustments base on your lab requirements.
  2. Right-click on Windows PowerShell in the Taskbar and select Run As Administrator.
  3. CD C:\PDT and execute ./VMCreator.ps1
  4. VMCreator will perform the following tasks for you:
    • Create all Hyper-V virtual machines
    • Install and configure Active Directory on DC01
    • Wait for Active Directory to be enabled, the start the rest of the VM’s
    • Once VM’s are started, they will self-join to the Contoso domain and install System Center prerequisites and roles.
  5. Once all the VM’s are started, you can monitor the process of the deployment by connecting to DC01.
  6. Depending on the CPU and Disk speed and amount of memory installed, the deployment process can taking anywhere from 1-3 hours.

Post PDT Build

Task 1: Run Post PDT Configuration

  1. Logon to your Hyper-V host as Administrator.
  2. Edit C:\SCBuild\Set-SCPostPDTSetup.ps1 and confirm the correct path of your installation files. Locate the line $Installerdir = “C:\Installer”. This value should match what is defined in the C:\PDT\Variable.xml file.
  3. Right-click on Windows PowerShell in the Taskbar and select Run as Administrator.
  4. CD C:\SCBuild and execute ./Set-SCPostPDTSetup.ps1. This script performs the following tasks:
    • Copies additional lab prerequisites file from your Hyper-V host to the C:\SCBuild folder on DC01
  5. Once this script has completed and all the virtual machines have restarted, you are ready for the next build task.

VM Configuration

Task 1: Run Post System Center Deployment Configuration Script

The next step is to run a PowerShell script that will preconfigure all your lab virtual machines to decrease the time needed for configuration during your labs.

  1. Logon to DC01 as Contoso\Administrator.
  2. If you changed the names of the virtual servers as defined in the PDT Variable.xml file, you will need to edit C:\SCBuild\Set-SCPostDeploymentConfig.ps1 and update the server names in the $ConfigurationData section of the script.

$FileShr = "\\DC01\Data\Files"

 

$ConfigurationData = @{

AllNodes = @(

@{NodeName = 'SCOM01';Role='SCOMRole'},

@{NodeName = 'SCSM01';Role='SCSMRole'},

@{NodeName = 'SCO01';Role='SCORole'},

@{NodeName = 'SCVMM01';Role='SCVMMRole'},

@{NodeName = 'DC01';Role='DCRole'},

@{NodeName = 'SCDPM01'},

@{NodeName = 'GATEWAY01';Role='GatewayRole'}

)

}

  1. Verify that WMI is working from DC01 to all of the Windows Server 2012 R2 VMs by opening up Server Manager, clicking on "All Servers", Right-Click Add Servers, click "find now", then add all servers except SCSM02.  If any of them don't say "Online - Performance Counters not started", then please see Troubleshooting section.
  2. Right-click on Windows PowerShell in the Taskbar and select Run as Administrator.
  3. CD C:\SCBuild and execute ./Set-SCPostDeploymentConfig.ps1. This script performs the following tasks for you:
    • DC01
      1. Creates file share on DC01 and copies prerequisite lab files to this location.
      2. Grants Operations Manager modify permissions on this share to enable the Alert Attachment management pack.
    • All Virtual Machines
      1. Disables IE Enhanced Security on all lab virtual machines.
      2. Installs ZoomIt on all virtual machines.
      3. Installs BGInfo on all virtual machines.
    • SCOM01 (Operations Manager)
      1. Installs Windows Identify Foundation Windows role
      2. Imports the Alert Attachment management pack.
      3. Installs and imports the Global Service Monitor management packs.
      4. Installs and imports the Management Packs for Windows Azure
    • SCSM01 (Service Manager)
      1. Installs Silverlight
      2. Creates an Active Directory connector to Contoso.com
    • SCO01 (Orchestrator)
      1. Copies down the Azure Management scripts required for Azure VM deployment.
      2. Installs Windows Azure Powershell module
    • Gateway01 (External access router)
      1. Installs Remote Access Windows Feature
      2. Installs Routing Windows Feature
      3. Installs Remote Access Management Tools
      4. Installs Remote Access PowerShell

Note: Look for any red text coming up on the screen and fix the errors.  The only expected red error text is below and to fix the problem, simply run the same script a second time.

Task 2: Enable internet access for your lab virtual machines.

The Gateway01 virtual machine has already been defined as the Default Gateway for your lab virtual machines. The last step is to setup a NAT router so that your lab virtual machines can connect to the internet.

  1. If you have not already done so, create an external virtual switch on your Hyper-V host called “External”.
    1. From Server Manager on your Hyper-V host, select Hyper-V Manager from the Tools menu.
    2. From the Actions bar on the right, select Virtual Switch Manager.
    3. Select External as the switch type and click Create Virtual Switch
    4. Type External for the Name and confirm External Network is selected, along with your host adapter that is attached to your external network.
    5. Click Ok to create your External switch.
  2. Add the external NIC to the Gateway01 VM
    1. While still in Hyper-V Manager, right-click on Gateway01 and select Shutdown.
    2. Once the virtual machine has stopped, right-click on Gateway01 and select Settings.
    3. From Add Hardware, select Network Adapter and click Add
    4. Connect your new network adapter to your External virtual switch and click OK to save.
    5. Right-click on Gateway01 and select Start.
  3. Configure Gateway01 to enable internet access for all internal VMs
    1. Logon to Gateway01 and select Routing and Remote Access from the Tools menu in Server Manager.

    2. Right-click on Gateway01 and select Configure and Enable Routing and Remote Access

    3. Select Network address translation (NAT) from the list.

    4. Select your 2nd adapter you just created for Use this public interface to connect to the Internet

    5. Click Next, the Finish.

      Note: Ignore the warning, just click OK.

  1. Configure DNS on DC01 to enable external DNS name resolution
    1. Logon to DC01 and open up dnsmgmt.msc.

    2. Right-click on DC01 and then go to the forwarders tab.

    3. Add forwarder IP addresses to the DNS servers your external NIC is using on the Gateway01 VM.

      Note: You could use root-hints (enabled by default), but this typically is much slower for name resolution and in some cases this traffic is blocked.

Task 3: Prepare Orchestrator server for Lab 1.1

In this task you will complete the Orchestrator configuration and Service Manager portal request management pack configuration and import for Lab1.1.

Steps 7-15 below address a known issue in System Center 2012. Because Orchestrator does not maintain the same GUID for runbooks when imported into new Orchestrator installations, steps 7-14 are necessary to update the GUIDs referenced in the Service Manager Management pack containing the self-service offering created for this exercise. If you do not complete these steps, students will not be able to complete Lab 1.1 successfully.

 

Perform Steps 1-15 on the Orchestrator Server – SCO01

  1. Log onto SCO01 as contoso\administrator.
  2. Verify that the C:\AzureManagement folder exists and is populated. The folder contents should look like this:
  1. If the C:\AzureManagement folder does not exist.  Follow the steps below to create the folder:
    1. Copy the AzureManagement.zip package to the root of the C: drive on SCO01 (zip package is included in the build files on the \DC01\Data\Files share)
    2. Extract the package to C:\AzureManagement.
  2. Open PowerShell prompts using the Run As Administrator option for both x86 and x64 and set the execution policy to Unrestricted by typing Set-executionpolicy  unrestricted.  Hit enter to accept.
  3. Open up IIS manager and click on Sites - Microsoft System Center 2012 Orchestrator Web Service.  Then click Basic Settings, click Select the application pool, and change or ensure the Application Pool is set to "System Center 2012 Orchestrator Web Features".  After you click OK out of all of the dialog boxes, run iisreset.exe from an elevated command prompt.

 

  1. Open Orchestrator Deployment Manager. Hint: Search for "Deployment manager"

Register the System Center Integration Pack for Azure – the file to use is C:\AzureManagement\SC2012R2_Integration_Pack_for_Azure.oip. In the left navigation pane, right-click on Orchestrator “Integration Packs” and select Register IP with the Orchestrator Management Server. Accept the EULA.

 

  1. Deploy the System Center Integration Pack for Azure to SCO01 by right-clicking the package and selecting Deploy IP to Runbook Server or Runbook Designer.  Follow the prompts, type SCO01 and then click Add, choose the default options for the rest of the wizard and then click finish.
  1. Open the Runbook Designer (find by searching from start).  Pin it to the taskbar. Go to Actions - import the C:\AzureManagement\AzureLabEnvironmentRunbooks.ois_export file. 

IMPORTANT:  Do a default import which includes importing global configurations.  The Azure IP runbook requires a global configuration included in the runbook export.

  1. Run the C:\AzureManagement\Coretech.SCSM.TransferToolFree.exe application.
  2. Accept the EULA.
  3. Update the SCO Web Service URL at the top of the GUI to point to the web service on the local Orchestrator server (http://localhost:81/Orchestrator2012/Orchestrator.svc/).
  4. Click Update Management Pack (Target).
  5. The runbook list will be retrieved from Orchestrator.  An Open Runbook Info File dialog box will open.  Select C:\AzureManagement\ITCHOL.Azure.VM.Deployment.runbookInfo and click Open.
  6. A Select Management Pack dialog box will open.  Select C:\AzureManagement\ITCHOL.Azure.VM.Deployment.xml and click Open.
  7. The tool will make a backup of the MP, and update the runbook GUID and path, and activity GUIDS.
  1. Once you see the Processing Complete and Management Pack Ready for Import messages, close the application.

Perform steps 16 – 29 on the Service Manager Management Server – SCSM01

  1. Log onto the SCSM01 as contoso\adminstrator
  2. Open the Service Manager Console. Pin it to the taskbar.
  3. Synchronize the Orchestrator connector by double-clicking on Administration – Connectors and then choose sco01.contoso.com and click “synchronize now” in the right task bar.
  4. Go to Library – Runbooks and verify that the Deploy ITCHOL Env to Azure runbook CI has been created and the Status of the runbook is Active.

NOTE: It may be a couple of minutes before the runbook appears. You may also try refreshing the runbooks view or rebooting the SCSM01 server if the runbook does not appear after 2 or 3 minutes.

  1. Go to Administration – Management Packs and then Import the \SCO01\C$\AzureMangement\ITCHOL.Azure.VM.Deployment.xml MP into Service Manager.

  2. Under Library – Service Catalog – Service Offerings – Published Service Offerings - Go to the properties of the Azure Cloud Services service offering.  Add the Deploy ITCHOL Azure VM Environment request offering and save the service offering.

    Note: If the window pops up blank, resize the main Service Manager Console to not be maximized and restart this step.

  3. Open the SMPortal at http://SCSM02:81/SMPortal.  Logon as Contoso\Administrator.  Add this webpage as the homepage in internet explorer.

  4. Under the General category, click the Azure Cloud Services service offering.

  5. Click the Deploy ITCHOL Azure VM Environment request.

  6. Click Go to request form.

  7. Verify that the request form shows all 5 user prompts.

  1. Close Internet Explorer.
  2. Tasks Complete.

Perform these steps on SCVMM01:

  • Change App pool for the App Controller website in IIS to "App Controller App Pool" and reboot VM
  • Copy the Fabrikam Fiber deployment files from the DC01 server on c:\SCBuild to \scvmm01.contoso.com\msscvmmlibrary

 

Optional cosmetic changes you may consider on the VMs which the labs people login to (SCVMM01, SCO01, SCSM01, SCDPM01):

  • Remove Server Manager run at startup
  • Open IE, accept IE prompts, set homepage

Optional performance change you may consider:

  • On SCOM01 - go into services and change SQL Server Reporting Services AND SQL Server Analysis Services to manually start and stop the services.