Share via


Unattended installation of Virtual Machine Manager 2012 SP1 based on the IaaS PLA Fabric Management Guide

A few days ago we published what should be considered as the "golden rule" when it comes to guidance around architecting a System Center 2012 implementation for a Private Cloud solution. The guidance can be found here: https://www.microsoft.com/en-us/download/details.aspx?id=38813. In this document my colleagues describe what we call an IaaS PLA (Product Line Architecture). PLAs are reference architectures that combine Microsoft software, consolidated guidance, and validated configurations with partner technology such as compute, network, and storage architectures, in addition to value-added software components. The IaaS PLA utilizes the core capabilities of the Windows Server operating system, Hyper-V, and System Center to deliver a private cloud infrastructure as a service offering.

In short: If you are interested to architect a Private Cloud solution based on the above, the IaaS PLA is the place to start.

One of the interesting aspects of the PLA is that it offers precise guidance on how to deploy the various components forming your Private Cloud solution.

In this Blog Post I will focus on how to make an unattended installation of Virtual Machine Manager 2012 SP1 (along with its accompanying SQL Server 2012) in a way that is compliant with the IaaS PLA Fabric Management Architectural guidance.

Let's Start!

Part 1: Installing the SQL Server and the SCVMMDB database instance

The IaaS PLA provides the guidance below for the Virtual Machine Manager database instance:

Fabric Management Component

Instance Name (Suggested)

Components

Collation

Storage

Requirements

Virtual Machine Manager

SCVMMDB

Database Engine

SQL_Latin1_General_CP1_CI_AS

2 LUNs

We are going to deploy SQL Server 2012 on a highly-available Virtual Machine (not on a Guest Cluster). You can follow the guidance of the IaaS PLA on the VM specifications. In case you want to only host the VMM database instance then 4 GB of RAM and 4 vCPUs should be enough (unless you will manage more than 150 Physical Hosts, in which case you will need 8 GB of RAM and 8 vCPUs and also consider deploying a SQL Failover Cluster, see the IaaS PLA and here: https://technet.microsoft.com/en-US/library/gg610574.aspx). Do not use Dynamic Memory for this VM. The layout of the Virtual Hard Disks should be as follows:

  • IDE Controller 0: Dynamically expanding or Static VHDX of 60 GBs (hosting the OS and the common components of the SQL Server).
  • SCSI Controller: Dynamically expanding or Static VHDX of 6 GBs (hosting the VMM Database)
  • SCSI Controller: Dynamically expanding or Static VHDX of 3 GBs (hosting the VMM Database Logs)

The recommended version is SQL Server 2012 Enterprise Edition with SP1 (or later).

To make an unattended installation of the SQL Server we can use a Configuration File like the following:

;SQL Server 2012 Configuration File
[OPTIONS]
IACCEPTSQLSERVERLICENSETERMS="True"
ACTION="Install"
ENU="True"
QUIET="True"
QUIETSIMPLE="False"
UpdateEnabled="True"
FEATURES=SQLENGINE,SSMS,ADV_SSMS
UpdateSource="MU"
HELP="False"
INDICATEPROGRESS="True"
X86="False"
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
INSTANCENAME="SCVMMDB"
INSTANCEID="SCVMMDB"
SQMREPORTING="False"
ERRORREPORTING="False"
INSTANCEDIR="M:\Program Files\Microsoft SQL Server"
AGTSVCACCOUNT="DCS\SQLAgent"
AGTSVCPASSWORD=P@ssw0rd
AGTSVCSTARTUPTYPE="Manual"
COMMFABRICPORT="0"
COMMFABRICNETWORKLEVEL="0"
COMMFABRICENCRYPTION="0"
MATRIXCMBRICKCOMMPORT="0"
SQLSVCSTARTUPTYPE="Automatic"
FILESTREAMLEVEL="0"
ENABLERANU="False"
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
SQLSVCACCOUNT="DCS\SQLDatabase"
SQLSVCPASSWORD=P@ssw0rd
SQLSYSADMINACCOUNTS="DCS\Domain Admins"
SQLUSERDBLOGDIR="N:\Program Files\Microsoft SQL Server\MSSQL11.SCVMMDB\MSSQL\Data"
SQLTEMPDBLOGDIR="N:\Program Files\Microsoft SQL Server\MSSQL11.SCVMMDB\MSSQL\Data"
ADDCURRENTUSERASSQLADMIN="False"
TCPENABLED="1"
NPENABLED="0"
BROWSERSVCSTARTUPTYPE="Automatic"

You can find more info about Configuration Files for SQL Server 2012 unattended installations, here: https://msdn.microsoft.com/en-us/library/dd239405.aspx

The most important parameters, where a decision should be made, are the following:

  • Name of Instance: You set this on the INSTANCENAME and INSTANCEID parameters. "SCVMMDB" is the name recommended by the PLA.
  • Components: You should only select the Database Engine here (as per PLA). The Management Tools are also included for convenience.
  • Collation: SQL_Latin1_General_CP1_CI_AS
  • Location of the Database LUN: Replace M: with the drive letter of the LUN where you wish to place the Database files.
  • Location of the Logs LUN: Replace N: with the drive letter of the LUN where you wish to place the Database Log files.
  • SQL Server Agent account name: Replace "DCS\SQLAgent" in the AGTSVCACCOUNT parameter with a Domain Account of your choice (you can also use a local system account).
  • SQL Server Database Engine account name: Replace "DCS\SQLDatabase" in the SQLSVCACCOUNT parameter with a Domain Account of your choice (you can also use a local system account). If using a Domain Account also provide the password (in AGTSVCPASSWORD).
  • SQL Server System Administrators: Replace "DCS\Domain Admins" in the SQLSYSADMINACCOUNTS parameter with a Domain Account or Security Group of your choice. If using a Domain Account also provide the password (in SQLSVCPASSWORD).

Replace the values above as you see fit and save the file as: C:\Config\SCVMMDB.ini

On the SQL Server from the SQL Server 2012 installation media execute the following command:

setup.exe /ConfigurationFile="C:\Config\SCVMMDB.ini"

During installation verbose output will be displayed in the command prompt (enable or disable this with the INDICATEPROGRESS parameter):

Untitled picture

After successful installation we see the following:

Untitled picture

We can verify successful installation by running SQL Server Management Studio and connecting to the Database Instance (SCVMMDB):

Untitled picture

Untitled picture

Part 2: Installing Virtual Machine Manager 2012 SP1

We are going to deploy VMM 2012 SP1 on a highly-available Virtual Machine (and not a VMM Failover Cluster). For managing less than 150 physical hosts create a VM with 4 GB of RAM and 4 vCPUs, for managing more consider creating a VMM Failover Cluster and follow the sizing guidance in the IaaS PLA and here: https://technet.microsoft.com/en-us/library/gg610562.aspx). The layout of the Virtual Hard Disks should be as follows:

  • IDE Controller 0: Dynamically expanding or Static VHDX of 60 GBs (hosting the OS and the VMM installation).
  • SCSI Controller: Dynamically expanding or Static VHDX with enough disk space to host your VMM Library (ISOs, VM Templates, VHDXs files, etc.). You can also utilize a pass-through disk for the VMM Library in which case you can enable Disk Deduplication (on the Storage System).

Before setup you need to open the Firewall to allow communication between the VMM server and the SQL server. There are various ways to achieve this. One of them is to create a custom rule which opens all communications between the two IP addresses.

The command to do that on the SQL Server is:

netsh advfirewall firewall add rule name="SQL01-VMM01" dir=in action=allow enable=yes profile=domain localip=10.100.100.2 remoteip=10.100.100.3 interfacetype=any

The command to do that on the VMM Server is:

netsh advfirewall firewall add rule name="VMM01-SQL01" dir=in action=allow enable=yes profile=domain localip=10.100.100.3 remoteip=10.100.100.2 interfacetype=any

Replace any of the values above as needed to reflect your IP configuration and the rule name you want to assign.

VMM has three prerequisites when installed on Windows Server 2012:

Download the web installer (adksetup.exe) from the link above. Execute the web installer on your workstation (not the VMM server) and select "Download the Assessment and Deployment Kit for installation on a separate computer" and select a folder. Use the downloaded folder to install WADK to VMM by selecting the "Deployment Tools" and "Windows Preinstallation Environment (Windows PE)" only.

Untitled picture

You also need to add the VMM Domain Service account on the local admins group:

net localgroup administrators DCS\VMMService /add

Using a Domain Service account (vs. a local account) has several advantages one of them being that you can use sharing with ISO images (to attach them to VMs).

You can install VMM from the command prompt by using the guidance here: https://technet.microsoft.com/en-us/library/hh852761.aspx

We need a configuration file (VMM.ini) that is similar to the following:

[OPTIONS]
ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
SqlInstanceName=SCVMMDB
RemoteDatabaseImpersonation=1
SqlMachineName=SQL01
LibrarySharePath=E:\VMMLibrary
MUOptIn=1
VmmServiceLocalAccount=0

Provide your Product Key, configure the database details and set the location of your VMM Library. Save the file as: C:\Config\VMM.ini

On the Virtual Machine Manager server insert the media and execute the following command:

setup.exe /server /i /f c:\Config\VMM.ini /VmmServiceDomain DCS /VmmServiceUserName VMMService /VmmServiceUserPassword P@ssw0rd /SqlDBAdminDomain DCS /SqlDBAdminName Administrator /SqlDBAdminPassword P@ssw0rd /IACCEPTSCEULA

You need to provide credentials for the VMM Service (a Domain Account) and for a SQL Server Admin (from the group we configured earlier, for example the Domain Admins).

During installation observe (through Task Manager) the two processes running: "SetupVM" and "Virtual Machine Manager Setup".

Untitled picture

You can troubleshoot setup by investigating the Log Files at: C:\ProgramData\VMMLogs

For example opening SetupWizard.log we observe the following:

Untitled picture

Opening PrereqCheck.log we find the following issue:

Untitled picture

In this case the solution is obvious: There is a pending restart prohibiting our installation. Restart the VM and retry.

If everything went ok, opening SetupWizard.log we would read the following:

Untitled picture

Your installation of VMM is now finished successfully! Verify the installation by opening the VMM console:

Untitled picture

Panos Macheras
Architect
Microsoft Consulting Services

Follow me on twitter: https://twitter.com/panosmacheras

Comments

  • Anonymous
    January 01, 2003
    Hi Mike,

    Check to see if the Domain Admin account you used (vi-admin) is actually a SQL Server administrator (you have to explicitly specify this either during the SQL Server setup phase or afterwards). If this is indeed the case then please provide the relevant snippet from the log file to investigate further.
  • Anonymous
    May 12, 2014
    The comment has been removed