Chapter 5.Configure and deploy virtual machines and services - Exam Ref 70-247 Configuring and Deploying a Private Cloud (2014)

Exam Ref 70-247 Configuring and Deploying a Private Cloud

Chapter 5. Configure and deploy virtual machines and services

VMM allows you to rapidly deploy virtual machines, applications, and services by leveraging profiles, virtualized applications, and templates. In this chapter you will learn how to configure profiles, and how to virtualize applications. You’ll then learn how you can use templates and packages to deploy a service, as well as how to update a service that you have already deployed to your organization’s private cloud.

Objectives in this chapter:

Image Objective 5.1: Configure profiles

Image Objective 5.2: Create and configure Server App-V packages

Image Objective 5.3: Configure and deploy a service

Image Objective 5.4: Update a service

Objective 5.1: Configure profiles

This objective deals with configuring the various profile types supported by VMM. In this section you will learn how to use hardware profiles, guest operating system profiles, application profiles, and SQL Server profiles.


This section covers the following topics:

Image Hardware profiles

Image Guest operating system profiles

Image Application profiles

Image SQL Server profiles


Creating hardware profiles

A VMM hardware profile allows you to create a representation of a virtual machine’s hardware configuration that can be used by VMM. Hardware profiles include information about the number of processors, the amount of RAM available to the virtual machine, as well as the IDE and SCSI configuration that the VM will use. You can also use a VMM hardware profile configuration to specify whether a virtual machine will use generation 1, or generation 2 virtual hardware. While you could configure virtual machine hardware settings manually each time you use VMM to create a virtual machine, a VMM hardware profile allows you to create VMs that have a standardized virtual hardware configuration.

To create a hardware profile, perform the following steps:

1. In the Library workspace of the VMM console, right-click the Profiles node, and click Create Hardware Profile.

2. On the General page of the New Hardware Profile dialog box, shown in Figure 5-1, provide a name for the profile and select which VM generation you want to use. This can be Generation 1 or Generation 2. Remember that Generation 2 VMs can only be used with virtualization hosts running Windows Server 2012 R2 or later.

Image

FIGURE 5-1 New Hardware Profile

3. On the Hardware Profile page, you can configure the following settings:

Image Cloud Capability Profiles Allows you to specify which capability profile to use with the hardware profile. You can choose between XenServer, ESX Server, and Hyper-V. Figure 5-2 shows the selection of the Hyper-V profile.

Image

FIGURE 5-2 Cloud compatibility

Image Processor Allows you to configure the number of processors to be used by the VM. This also allows you to configure whether you want to allow migration to occur to a virtual machine host running a different processor version.

Image Memory Allows you to configure the amount of memory that will be allocated to the VM. You can choose to statically assign memory, or to allow the use of dynamic memory. Figure 5-3 shows the memory settings.

Image

FIGURE 5-3 Memory

Image Floppy Drive Allows you to configure a virtual floppy drive for generation 1 virtual machines.

Image COM 1 Allows you to configure Com Port 1 settings for generation 1 virtual machines.

Image COM 2 Allows you to configure Com Port 2 settings for generation 1 virtual machines.

Image Video Adapter Allows you to configure whether a standard video adapter will be used, or a RemoteFX 3D video adapter will be available to virtual machines. You can also configure the maximum number of monitors and the maximum monitor resolution when choosing the RemoteFX 3D video adapter. Figure 5-4 shows this setting.

Image

FIGURE 5-4 Video adapter

Image IDE Devices Allows you to configure virtual IDE devices used by the VM for generation 1 virtual machines.

Image SCSI Adapter Allows you to configure virtual SCSI adapter settings.

Image Network Adapter Allows you to configure the network that the virtual network adapters will be connected to, how they will obtain IP addresses and MAC addresses, as well as any virtual network port profiles. Figure 5-5 shows these options.

Image

FIGURE 5-5 Network adapter settings

Image Availability This option is for virtual machines that should be placed on highly available host clusters and ensures the VM is made highly available.

Image Firmware Allows you to configure VM startup order, as shown in Figure 5-6.

Image

FIGURE 5-6 Firmware

Image CPU Priority Allows you to configure the priority for the VM when the host is allocating CPU resources.

Image Virtual NUMA Allows you to configure the VM to span hardware NUMA nodes.

Image Memory Weight Allows you to configure how the VM is allocated memory when memory utilization on the virtualization host is high.


More Info: Hardware Profiles

You can learn more about hardware profiles at http://technet.microsoft.com/en-us/library/hh427289.aspx.


Creating guest operating system profiles

Guest operating system profiles allow you to configure guest operating system settings that are automatically applied to the virtual machine during deployment. Depending on the guest operating system that you are configuring the profile for, this can include the local administrator account password, what roles and features are installed, domain join information, and how to name the computer.

Guest operating system profiles aren’t limited to VMs running Windows. You can also configure a guest operating system profile for VMs running Linux operating systems. Using a guest operating system profile saves you from having to perform configuration steps manually on an operating system each time you deploy a virtual machine.

To create a guest operating system profile for a Windows operating system, perform the following steps:

1. In the Library workspace of the VMM console, right-click the Profiles node, and click Create Guest OS Profile.

2. On the General page of the New Guest OS Profile dialog box, provide a name, and select which operating system the guest operating system profile will apply to. Figure 5-7 shows a guest operating system profile named Example Windows Server 2012 R2 for use with Microsoft Windows operating systems.

Image

FIGURE 5-7 Guest operating system profile

3. On the Guest OS Profile page, specify the following settings:

Image Operating System Allows you to select which operating system the guest operating system profile applies to. Figure 5-8 shows some of the options that can be selected using the drop-down menu.

Image

FIGURE 5-8 Operating system

Image Identity Information Allows you to configure how the VM will be named.

Image Admin Password Allows you to configure the password of the built-in Administrator account.

Image Product Key Allows you to specify a product key.

Image Time Zone Allows you to configure which time zone the virtual machine will be configured to use.

Image Roles Allows you to configure which roles and role services will automatically be installed on the virtual machine when used with a service template. Figure 5-9 shows the Web Server role selected.

Image

FIGURE 5-9 Roles section

Image Features Allows you to configure which features will be installed on the virtual machine when deployment is performed using a service template.

Image Domain / Workgroup Allows you to configure domain or workgroup settings. If specifying that the virtual machine be domain joined, you can provide credentials that allow this to occur. These options are shown in Figure 5-10.

Image

FIGURE 5-10 Domain information

Image Answer File Allows you to specify an answer file to automatically configure the virtual machine.

Image [GUIRunOnce] Command Allows you to specify a set of commands that will be run automatically the first time a user logs on to the virtual machine.


More Info: Guest Operating System Profiles

You can learn more about guest operating system profiles at http://technet.microsoft.com/en-us/library/hh427296.aspx.


Creating application profiles

Application profiles include information that VMM can use for installing Microsoft Web Deploy applications, SQL Server data-tier applications, Microsoft Server App-V applications, and instructions for running scripts when you deploy a VM as part of a service. You only use application profiles if you are going to deploy a VM as part of a service, and don’t use them when deploying standalone VMs. You can add multiple applications of the same type, or applications of different types to the same profile. You will learn more about services later in this chapter.

Before creating an application profile, you should ensure that all of the packages and scripts that you want to use with the profile are already present in a VMM library share. To create an application profile, perform the following steps:

1. In the Library workspace of the VMM console, right-click the Profiles node, and click Create Application Profile.

2. On the General page, shown in Figure 5-11, provide a name for the application profile and choose between one of the following compatibility options:

Image SQL Server Application Host Select this option if you will use the profile to deploy SQL Server DAC packages or SQL Server scripts to an existing SQL Server instance.

Image Web Application Host Select this option if you will use the profile to deploy Web Deploy packages to IIS.

Image General Select this option if you are deploying a combination of application types or Server App-V applications.

Image

FIGURE 5-11 Application profile

3. On the Application Configuration page, select the operating system compatibility, as shown in Figure 5-12.

Image

FIGURE 5-12 Operating system compatibility

4. Click Add, as shown in Figure 5-13, to add one of the following:

Image Script Application

Image SQL Server Data-Tier Application

Image Virtual Application

Image Web Application

Image Script To Application Profile

Image

FIGURE 5-13 Add application


More Info: Application Profiles

You can learn more about application profiles at http://technet.microsoft.com/en-us/library/hh427291.aspx.


Configuring SQL Server profiles

A SQL Server profile allows you to configure a sysprepped instance of SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014 for deployment through VMM. You use SQL Server profiles when deploying VMs that are part of a service. The SQL Server profile configures SQL Server according to the profile settings.

To configure a SQL Server profile, perform the following steps:

1. In the Library workspace of the VMM console, right-click the Profiles node, and click Create SQL Server Profile.

2. On the General page of the New SQL Server Profile dialog box, provide a name for the SQL Server profile.

3. On the SQL Server Configuration page, click Add SQL Server Deployment, and provide the following information, as shown in Figure 5-14.

Image

FIGURE 5-14 SQL Deployment

Image Name Name for the SQL Server deployment.

Image Instance Name The instance name. If left blank, it will use the default name MSSQLSERVER.

Image Instance ID The instance ID used when you sysprepped the SQL instance.

Image Installation Run As Account Account with the permission to deploy SQL Server.

Image Media Source Location of the SQL Server installation media, such as a VMM Library share.

Image SQL Server Administrators Users or groups that will be configured as SQL Server Administrators. You must specify at least one account.

Image Security Mode Select Windows or SQL Server authentication.

Image Service Accounts Configuration for the SQL Server service, SQL Server agent, and Reporting Services service accounts. You must select a Run As account for all three services.


More Info: SQL Server Profiles

You can learn more about SQL Server profiles at http://technet.microsoft.com/en-us/library/hh427294.aspx.



Image Thought experiment: Profiles at Wingtip Toys

In this thought experiment, apply what you’ve learned about this objective. You can find answers to these questions in the “Answers” section at the end of this chapter.

You are the virtualization administrator at Wingtip Toys. You are experimenting with VMM profiles and templates as a part of a private cloud pilot project. With this information in mind, answer the following questions:

1. What is the limitation, in terms of virtualization hosts, when using the generation 2 option in a hardware profile?

2. In what circumstances will the role and feature configuration of the guest operating system profile you are experimenting will be enacted?


Objective summary

Image Hardware profiles allow you to configure virtual machine hardware settings.

Image Guest operating system profiles allow you to configure operating system settings, including settings for local administrator accounts, computer name, and domain join information.

Image Application profiles allow you to configure Server App-V, SQL DAC, and Web Deploy settings for when you deploy services.

Image SQL Server profiles allow you to configure SQL Server settings for when you deploy services.

Objective review

Answer the following questions to test your knowledge of the information in this objective. You can find the answers to these questions and explanations of why each answer choice is correct or incorrect in the “Answers” section at the end of this chapter.

1. Which of the following do you use to configure the service account used by a SQL Server instance’s SQL Server service?

A. SQL Server profile

B. Hardware profile

C. Guest operating system profile

D. Application profile

2. Which of the following do you use to configure a virtual machine’s memory configuration?

A. Application profile

B. Guest operating system profile

C. Hardware profile

D. SQL Server profile

3. Which of the following do you use to configure the local administrator account password on a virtual machine?

A. SQL Server profile

B. Hardware profile

C. Guest operating system profile

D. Application profile

Objective 5.2: Create and configure Server App-V packages

Server App-V is an application virtualization technology that allows you to virtualize applications, usually web applications that run on server platforms. Once virtualized and packaged, application deployment and removal is simple, minimizing the amount of work required to add instances of an application as you scale out a service across additional VMs as a way of increasing capacity.


This section covers the following topics:

Image Server App-V

Image Server App-V packages

Image Sequencing applications

Image Deploying a Server App-V package


Server App-V

Server App-V allows you to create virtual application packages through a process termed sequencing. You can deploy sequenced applications to a computer that has the Server App-V agent installed. These sequenced applications will run without requiring local installation.

You create a virtual application package using Server App-V by capturing the following elements of an application running on Windows Server:

Image Information required to install the application

Image Application binary files

Image Registry settings

Image Runtime state of the deployed application

Image Registry settings

Image Log files

Image Application data

You can deploy sequenced Server App-V applications to a new server with the application’s last runtime state intact, which means you don’t need to go through installation and configuration steps when deploying the application.

Primarily, Server App-V will be used with custom in-house applications, and you’ll need to test whether Server App-V works with your organization’s applications. In general, you can use Server App-V to sequence applications that have the following characteristics:

Image Stores runtime state on a local disk

Image Adds services to Windows

Image Creates IIS applications

Image Adds or modifies registry settings

Image Installs or uses COM+ and DCOM

Image Uses text-format configuration files

Image Adds WMI providers

Image Uses SQL Server Reporting Services

Image Modifies local user and group accounts

Image Installs and uses Java-based applications

If the sequenced application is designed to function in a load-balanced configuration, you can use VMM to deploy the application across additional servers as a way of scaling out capacity.

Server App-V uses the following elements:

Image Application This is the binaries, configuration, and settings to be virtualized.

Image Server App-V Sequencer This tool allows you to virtualize the application. It functions by monitoring and storing every change that the application makes during the deployment process.

Image Server App-V Agent Software deployed on the server that will run the sequenced application.

Image Package A package contains the virtualized application and includes the binary files, configuration, and runtime state data.

Image Server App-V Virtual Drive (Q:\) This virtual drive stores the virtualized application’s binaries and settings. The App-V agent creates and will maintain the virtual drive using a folder on the host computer’s system drive.


More Info: Server App-V Overview

You can learn more about Server App-V at http://technet.microsoft.com/en-us/library/gg703262.aspx.


Understanding Server App-V packages

A Server App-V package contains the following files:

Image .SFT file The package payload file. This binary file is created by the Server App-V sequencer and stores the deployed files, folders, registry settings, and any other package data.

Image .OSD files Open Software Descriptor files. These XML-based files provide information to the Server App-V agent on how to import the package.

Image .SPRJ file The sequencer project file. This XML-based file is used by the Server App-V sequencer to modify or upgrade the package.

Image _Manifest.xml The Packagename_manifest.xml file stores information that describes the package. The Server App-V agent uses this file, in conjunction with the .OSD files, to import the package. The Packagename_manifest.xml file also includes information on how to run the package.

Image DeploymentConfig.xml This file stores data used to customize package settings that were specific to the environment in which the application was sequenced. For example, database connection strings, server names, and passwords for a specific deployment.

Sequencing applications

At a high level, sequencing an application involves performing the following steps:

1. Deploy the Server App-V sequencer to the computer that will host the application.

2. Start the Server App-V sequencer by running the New Virtual Application Package Wizard.

3. Install the application that you want to virtualize to the Server App-V virtual drive (Q:\).

4. Run any other installers necessary to finalize application configuration.

5. Once installation completes, stop the Server App-V sequencer.

6. Save the virtualized application as a package to a location external to the server used to perform the sequencing.

When preparing the server on which you will be sequencing the application, consider the following best practices:

Image Prepare the computer that will host the Server App-V sequencer to have a configuration as similar as possible to the computers that will host the sequenced application in a production environment.

Image Verify that the default sequencing drive is available. Server App-V uses volume Q: by default. If servers in your environment already map volume Q: for other purposes, adjust the default sequencing drive prior to attempting to sequence the application.

Image Disable unused applications. The computer that hosts the sequencer should have no anti-malware software active and no Windows Update activity pending.

Image If you are planning on deploying the virtualized application to multiple server operating systems, sequence the application on the earliest version of the operating system. For example, if you are deploying to servers running the Windows Server 2012 and Windows Server 2012 R2 operating systems, sequence the application on Windows Server 2012.

Image Configure ODBC or printer connections prior to sequencing. You’ll also need to configure ODBC and printer settings on computers with the Server App-V agent installed prior to importing the sequenced package.

Image Use a virtual machine with checkpoints to perform sequencing. This way you can revert to the checkpoints to sequence new applications as necessary.


More Info: Server App-V Sequencing

You can learn more about Server App-V sequencing at http://technet.microsoft.com/en-us/library/gg703265.aspx.


Deploying a Server App-V package

Before you deploy a Server App-V package to a server, you must first ensure that you have deployed the Server App-V agent. You also need to ensure that any roles, features, and other dependencies required by the application are also present. The dependencies that are required will depend on the application, with some being captured by the sequencing process, and others being required on the host computer.

The Server App-V PowerShell agent cmdlets allow you to test package deployment locally, including running tests to verify the functionality of a package. If you want to use the Server App-V PowerShell agent cmdlets, you need to set the execution policy on the computer that will host the virtualized application to RemoteSigned.

Server App-V has the following Windows PowerShell cmdlets:

Image Add-ServerAppvPackage Adds a new virtual application to a computer that has the Server App-V agent installed, or can be used to upgrade an existing virtual application.

Image Backup-ServerAppvPackageState Saves the runtime state of an existing Server App-V application to a designated location.

Image Get-ServerAppvAgent Provides information about the Server App-V agent.

Image Get-ServerAppvPackage Provides information about a deployed Server App-V package.

Image Remove-ServerAppvPackage Removes Server App-V package from a computer to which it has been deployed.

Image Remove-ServerAppvPackageState Removes the runtime state, returning the virtual application package to its initial state, but does not remove the virtual application package.

Image Restore-ServerAppvPackageState Restores the runtime state of a virtual application. You can only use this cmdlet if you have a backup of the application’s runtime state.

Image Set-ServerAppvPackageConfiguration Configures an existing virtual application package to use a specific deployment configuration.

Image Start-ServerAppvPackage Starts an installed virtual application package and associated subsystem.

Image Stop-ServerAppvPackage Shuts down a virtual application package an associated subsystems.

The Server App-V sequencer uses the following Windows PowerShell cmdlets:

Image New-ServerAppVSequencerPackage This cmdlet is used to create a new virtual application package.

Image Protect-UpdateConfiguration This cmdlet encrypts sensitive values stored in the deployment configuration document.

Image Unprotect-UpdateConfiguration This cmdlet decrypts any encrypted sections of the deployment configuration document.

Image Update-ServerAppVSequencerPackage This cmdlet is used to update an existing virtual application package.

If you are going to use VMM to deploy the Server App-V package, ensure that you have copied the package to the VMM library as a custom resource. To do this, place the package contents in a folder that has the extension .CR, and copy the folder to the VMM library share.


More Info: Server App-V Windows Powershell Cmdlets

You can learn more about Server App-V Windows PowerShell cmdlets at http://technet.microsoft.com/en-us/library/hh393499.aspx.



Image Exam Tip

Remember what steps you need to take to add a Server App-V package to the VMM library.



Image Thought experiment: Server application virtualization at Tailspin Toys

In this thought experiment, apply what you’ve learned about this objective. You can find answers to these questions in the “Answers” section at the end of this chapter.

You are in the process of testing some virtualized applications. You need to be able to save the runtime state of these virtualized applications, so if there is a problem later on in the testing process, you can return them to a known state. With this information in mind, answer the following questions.

1. What Server App-V Windows PowerShell cmdlet would you use to save the runtime state of an existing Server App-V application to a designated location?

2. What Server App-V Windows PowerShell cmdlet would you use to restore the runtime state of an existing Server App-V application from a designated location?


Objective summary

Image Server App-V allows you to create virtual application packages through a process termed sequencing.

Image You can deploy sequenced Server App-V applications to a computer that has the Server App-V agent installed, and these sequenced applications will run without requiring local installation.

Image You can deploy sequenced Server App-V applications to a new server with the application’s last runtime state intact, which means you don’t need to go through installation and configuration steps when deploying the application.

Image An App-V package contains the virtualized application and includes the binaries, configuration, and runtime state data.

Image Server App-V uses virtual drive Q:\ to store the virtualized application’s binaries and settings. The App-V agent creates, and will maintain, the virtual drive using a folder on the host computer’s system drive.

Objective review

Answer the following questions to test your knowledge of the information in this objective. You can find the answers to these questions and explanations of why each answer choice is correct or incorrect in the “Answers” section at the end of this chapter.

1. Which of the following Server App-V related Windows PowerShell cmdlets can you use to remote the runtime state of a virtualized application, returning the virtual application package to its initial state? (Choose the best answer.)

A. Restore-ServerAppvPackageState

B. Start-ServerAppvPackage.

C. Remove-ServerAppvPackageState.

D. Stop-ServerAppvPackage.

2. Which of the following Server App-V related Windows PowerShell cmdlets can you use to upgrade an existing virtual application?

A. Remove-ServerAppvPackage.

B. Remove-ServerAppvPackageState.

C. Add-ServerAppvPackage.

D. Restore-ServerAppvPackageState.

3. Which of the following cmdlets should you use to update the contents of an existing Server App-V virtual application package?

A. Restore-ServerAppvPackageState.

B. Add-ServerAppvPackage.

C. Update-ServerAppVSequencerPackage

D. Start-ServerAppvPackage.

4. You have created a Server App-V package and saved it in a folder named ContosoApp. To which of the following should you rename the ContosoApp folder prior to copying it the VMM library so that you can configure it as part of an application profile?

A. ContosoApp.ZIP.

B. ContosoApp.CR.

C. ContosoApp.VMM.

D. ContosoApp.App-V.

Objective 5.3: Configure and deploy a service

This objective deals with configuring virtual machine templates, service templates, web deploy packages, and SQL DAC packages. These all form the basis of being able to build scalable applications in a private cloud.


This section covers the following topics:

Image Configuring virtual machine templates

Image Creating service templates

Image Web Deploy packages

Image SQL DAC packages


Configuring virtual machine templates

A Virtual Machine Manager VM template allows you to deploy a single virtual machine with a consistent set of settings. A VMM VM template is an XML object that is stored with a VMM library, and includes one or more of the following components:

Image Guest Operating System Profile A guest operating system profile that includes operating system settings.

Image Hardware Profile A hardware profile that includes VM hardware settings.

Image Virtual Hard Disk This can be a blank hard disk, or a virtual hard disk that hosts a specially prepared, sysprepped in the case of Windows based operating systems, version of an operating system.

You can create VM templates based on existing virtual machines deployed on a virtualization host managed by VMM, based on virtual hard disks stored in a VMM library, or by using an existing VM template.

VM templates have the following limitations:

Image A VM template allows you to customize IP address settings, but you can only configure a static IP address for a specific VM when deploying that VM from the template.

Image Application and SQL Server deployment are only used when you deploy a VM as part of a service.

Image When creating a template from an existing VM, ensure that the VM is a member of a workgroup and is not joined to a domain.

Image You should create a separate local administrator account on a VM before using it as the basis of a template. Using the built-in administrator account will cause the sysprep operation to fail.

Image You cannot create a virtual machine template for a Linux virtual machine based on an existing Linux VM deployed to a virtualization host.

To create a VM template based on an existing virtual hard disk (which can include a blank hard disk), or existing VM template, perform the following steps:

1. In the Library workspace of the VMM console, click Create VM Template on the ribbon.

2. On the Select Source page, click Browse next to Use An Existing VM Template For A Virtual Hard Disk Stored In The Library.

3. On the Select VM Template Source dialog box, select the hard disk that will serve as the basis for the VM template.

4. On the VM Template Identity page, provide a name for the VM template, and choose between a Generation 1 and a Generation 2 VM. This page is shown in Figure 5-15.

Image

FIGURE 5-15 Template name

5. On the Configure Hardware page, you can select an existing hardware profile, or create a new hardware profile using the steps outlined earlier in this chapter. If you choose to create a new hardware profile, you can save this profile for use in the future. Figure 5-16 shows the selection of the Example Hardware Profile.

Image

FIGURE 5-16 Select hardware profile

6. On the Configure Operating System page, select a guest operating system profile, or configure a new guest operating system profile using the steps outlined earlier. If you choose to create a new guest operating system profile, you can save it for use again later. Figure 5-17 shows the Example Windows Server 2012 R2 profile selected.

Image

FIGURE 5-17 Select the guest operating system profile

7. On the Application Configuration page, you can select an existing application profile. This will only be used if the VM is deployed as a service, and you don’t have to select an application profile when configuring a VM template.

8. On the SQL Server Configuration page, you can select an existing SQL Server profile. This will only be used if the VM is deployed as a service and you don’t have to select a SQL Server profile when configuring a VM template.

9. Complete the wizard, which creates the profile.

When creating a VM template from a VM that is already deployed, you’ll be asked to select an existing VM from a list of those that are deployed on a virtualization host managed by VMM.


More Info: Virtual Machine Templates

You can learn more about virtual machine templates at http://technet.microsoft.com/en-us/library/hh427282.aspx.


Creating service templates

Service templates differ from virtual machine templates in the following ways:

Image Service templates allow you to deploy multiple virtual machines rather than a single virtual machine.

Image Service templates can include settings for Windows Server roles and features. If a VM template includes role and feature settings, they will only be used if the VM is deployed as part of a service.

Image Service templates can include application profiles and SQL server profiles. These profiles are not available when deploying a VM from a VM template.

To create a service template, perform the following steps:

1. In the Library workspace of the VMM console, click the Create Service Template item on the ribbon.

2. In the New Service Template dialog box, specify a Name, a Release version, and select between a Blank, Single Machine, Two Tier Application, or Three Tier Application pattern. Figure 5-18 shows the selection of a Two Tier Application.

Image

FIGURE 5-18 New Service Template

3. In the Virtual Machine Manager Service Template Designer, shown in Figure 5-19, use the drag-and-drop interface to add applications and configure which VM templates will be used with the multiple tier application. You can also add VM networks and load balancers, as well as adding additional machine tiers using the designer.

Image

FIGURE 5-19 VMM Service Template Designer

4. When you have competed configuring the service template, click Save And Validate. This will check the service template for errors which must be resolved before the template can be saved and used for deployment.


More Info: Service Templates

You can learn more about creating service templates at http://technet.microsoft.com/en-us/library/gg675105.aspx.


Understanding Web Deploy packages

Microsoft Web Deploy allows you to deploy, migrate, and manage IIS websites, web servers, and web applications. Web Deploy has the following features:

Image Web application packaging This feature allows you to package a web application, complete websites, associated databases, registry settings including Access Control Lists (ACLs), Element Object Model (COM), and global assembly cache (GAC).

Image Web application deployment This feature allows you to deploy web applications without requiring local administrative privileges on the server hosting IIS and configure parameters to change how the package is deployed, such as modifying database connection strings.

Image Web server migration and synchronization This feature allows you to synchronize or migrate web servers, websites, or web applications from one host to another.

To create a web deploy package, you need to first install the Web Deployment Tool and the IIS Manager UI module on the server that hosts the website or web application you intend to package. Once the Web Deployment Tool is installed, you can use the IIS Manager console to export a website or web application as a Web Deploy package.

When exporting an application, you can choose which elements to export, whether to include an encryption password, and whether to include ACLs as part of the package. The package is exported to a .zip file, which you can then paste into the VMM library share. Once present in the library share, the Web Deploy package can be used with an application profile.

SQL DAC packages

Data-tier application (DAC) packages include database and SQL Server instance objects that can be used by an application. The advantage of a DAC is that it provides a single entity for authoring, managing, and deploying a data-tier object. A DAC package is a zip file that stores multiple XML files that describe the following elements:

Image DAC metadata This includes the name and version of the DAC.

Image Database object definitions This includes database schema, tables, views, and stored procedure.

Image Instance level object definitions Includes database login information.

Image Prerequisites A set of prerequisites for hosting the DAC, such as collation.

Image Scripts and files Can include application documents, data-generation plans, pre and post deployment scripts.

DACs are usually created in Visual Studio by developing a data-tier application.


More Info: Understanding Data-Tier Applications

You can learn more about data-tier applications at http://msdn.microsoft.com/en-us/library/ee240739%28SQL.105%29.aspx.



Image Exam Tip

Remember what you use a SQL DAC and a Web Deploy package for.



Image Thought experiment: VMM service deployment at Contoso

In this thought experiment, apply what you’ve learned about this objective. You can find answers to these questions in the “Answers” section at the end of this chapter.

You are in the process of configuring service deployment using VMM at Contoso. You want to automate the deployment of VMs, applications, and multi-tier services using VMM profiles and templates. With this in mind, answer the following questions:

1. What should you configure to automate the deployment of Microsoft Server App-V applications to a virtual service in VMM?

2. What should you configure so that you can simplify the deployment of a multi-tier application using VMM?


Objective summary

Image Virtual machine templates allow you to create templates that serve as the basis for virtual machine deployment. These include hardware and guest operating system settings. You can create VM templates based on an existing virtual hard disk, virtual machine, or existing VM template.

Image Service templates allow you to deploy multiple virtual machines and applications in multi-tier configurations.

Image Microsoft Web Deploy allows you to deploy, migrate, and manage IIS websites, web servers, and web applications.

Image The web application packaging feature allows you to package a web application, complete websites, associated databases, registry settings including Access Control Lists (ACLs), Element Object Model (COM), and global assembly cache (GAC).

Image Data-tier application (DAC) packages include database and SQL Server instance objects that can be used by an application.

Objective review

Answer the following questions to test your knowledge of the information in this objective. You can find the answers to these questions and explanations of why each answer choice is correct or incorrect in the “Answers” section at the end of this chapter.

1. Which of the following can you use as the basis for creating a virtual machine template?

A. Deployed virtual machine

B. VMM VM template

C. Virtual hard disk

D. Guest OS profile

2. In which format is a SQL DAC package stored in the VMM library?

A. VHD

B. ZIP

C. CAB

D. XML

3. Which of the following can you include in a VM template?

A. Physical profile

B. Application profile

C. SQL Server profile

D. Guest operating system profile

4. Which of the following can you include in a VMM service template?

A. SQL Server profile

B. VM template

C. Physical profile

D. Application profile

Objective 5.4: Update a service

Once deployed, a service is likely to need to be updated, either because there have been changes to the application it hosts, because you want to replace the underlying operating system, or another aspect of the service such as the SQL Server tier.


This section covers the following topics:

Image Updating services in VMM

Image Scaling out a service tier


Updating Services in VMM

Each time you deploy a service using VMM, VMM will record which service template you used as the basis of that deployment. If you update that service template later, VMM allows you to update the service in deployment based on the changes that you made to the service template.

VMM supports the following methods of updating a deployed service:

Image Apply updates to the in-place virtual machines that comprise the service.

Image Deploy new virtual machines with updated settings to replace the existing virtual machines that comprise the service.

Performing an in-place upgrade is usually the quickest option. To reduce the chance of disruption when performing an in-place upgrade, you can configure multiple upgrade domains to segment each tier. When configuring upgrade domains, you specify the number of upgrade domains you want to use and VMM will arbitrarily sort virtual machines across that number of upgrade domains. When VMs are segmented into upgrade domains, VMM will apply updates to one upgrade domain at a time, only moving on to the next upgrade domain once the updates are applied to the current upgrade domain.

Deploying new VMs is usually more time consuming. You choose this method when you want to perform an operating system replacement. For example, you want to upgrade the operating system from Windows Server 2012 to Windows Server 2012 R2. This becomes more complicated if applications are installed on the virtual machines you want to replace. In this case, if the application has a method of saving and restoring application state, you can configure a script in the application profile to save that state to a separate location before replacing the VM. An additional script will then restore the application state once the replacement VM is running. If you are using Server App-V virtualized applications, the applications automatically support the saving and restoration of state data without requiring scripts.


More Info: Updating Services in VMM

You can learn more about updating services in VMM at http://technet.microsoft.com/en-us/library/gg675089.aspx.


Updating service templates

Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value. You then make the appropriate updates to the service template.

To update an existing service template, perform the following steps:

1. In the Library workspace of the VMM console, click Service Templates under the Templates node.

2. Select the service template that you want to update. On the Service Template tab of the VMM console ribbon, click Create, and then click Copy.

3. Right-click the newly created copy, and click Properties.

4. On the General page of the Service Template Properties dialog box, specify a new release value.

5. Make the changes to update the template in the Service Template Designer.

If you are using Service Template Designer with a service template that is the basis for a service that is already deployed, you’ll be prompted by VMM to save the service template with an incremented release value.


More Info: Updating Service Templates

You can learn more about updating service templates at the following address: http://technet.microsoft.com/en-us/library/gg675120.aspx.


Modifying templates for updated resources

If you update a resource in VMM that is referenced by a service template, you’ll need to copy and update the service template to reference the newly updated resource.

To update an existing service template to use an updated resource, perform the following steps:

1. In the Service templates node of the Library workspace of the VMM console, locate the service template that uses the resource that you have updated. Service templates that utilize outdated resource have “Outdated” listed in the Update Status column.

2. Right-click the service template and click View Updated Resources. This will display the most up-to-date version or resources referenced by the template.

3. Right-click the template, and select Copy And Update. The new copy will reference the updated resources.

4. Publish the updated template by selecting it, and in the Actions group of the VMM Console ribbon, click Publish.

Once published, you can then apply the updated template to the deployed service. You’ll learn how to do this in the next section.


More Info: Updating Templates for Updated Resources

You can learn more about updating service templates to use updated resources at http://technet.microsoft.com/en-us/library/jj860435.aspx.


Apply updates to deployed services

Once you’ve published an updated template, you can apply updates to an existing service using the updated service template.

To apply updates to a deployed service using an updated service template, perform the following steps:

1. In the VMs and Services workspace of the VMM console, select the service that you want to update using the updated service template.

2. On the Service tab of the Update group of the VMM console ribbon, click Set Template.

3. On the Updated Service Template page of the Change Service Template Wizard, select Replace The Current Template With An Updated Template For This Service.

4. Browse to, and select, the updated service template.

5. On the Settings page, configure any listed application settings.

6. On the Update Method page, select between applying the updates in-place to the existing VMs, or whether you want to deploy new VMs with updated settings.

7. Complete the wizard.

Once you have set the new template and configured the update method, you can click Apply Template on the ribbon to trigger the update job. When the update job completes, the Template Release value will have updated.


More Info: Apply Updates to Deployed Services

You can learn more about applying updates to deployed services at http://technet.microsoft.com/en-us/library/gg675106.aspx.


Scaling out a service tier

Scaling out a service tier is the process of adding additional virtual machines to a tier of a service as a method of increasing capacity. When creating a tier in a service template, you configure whether the tier can be scaled out. You also configure the minimum and maximum number of VMs that can be deployed in the tier. VMM will not prevent you from scaling out a tier beyond the number of VMs that you specify here, but once you exceed the limit you configured, the tier and the service will display a Needs Attention status in the VMM console’s VMs And Services workspace.

To scale out a service tier, perform the following steps:

1. In the VMs And Services workspace of the VMM console, click the private cloud or host group to which you deployed the service.

2. On the VMM console ribbon, click Services.

3. In the Services pane, click the service that you wish to scale out.

4. In the Service tab of the VMM console ribbon, click Scale Out.

5. On the Select Tier page of the Scale Out Tier Wizard, in the list of tiers, select the tier that you want to scale out.

6. On the Specify Virtual Machine Identity page, provide a name for the new virtual machine that will join the tier.

Image If the tier is deployed to a private cloud, you only need to provide the computer name for the VM.

Image If the tier is deployed to a host group, you’ll have to specify which host to deploy the VM to as well as provide the name to the VM.

7. On the Add Properties page, select what actions to perform on the VM if the virtualization host starts or stops.

8. Review the settings on the wizard and click Scale Out.


More Info: Scale Out a Service Tier

You can learn more about scaling out a service tier at http://technet.microsoft.com/en-us/library/gg675080.aspx.



Image Exam Tip

Remember that you need to publish an updated template before you can apply an updated template.



Image Thought experiment: Managing services at Contoso

In this thought experiment, apply what you’ve learned about this objective. You can find answers to these questions in the “Answers” section at the end of this chapter.

You are in the process of testing upgrade and scale out procedures at Contoso. You have noticed that when you scale out certain tiers of the service, the Needs Attention status is displayed for the tier and service in the VMM console. You are also interested in ensuring that tiers remain available during upgrade operations. With this information in mind, answer the following questions:

1. How can you ensure that some parts of each tier of the service remain available during upgrade operations?

2. How can you ensure that the Needs Attention status isn’t displayed when you scale out a tier?


Objective summary

Image If you update that service template that was used to deploy a service, VMM allows you to update the service in deployment based on the changes that you made to the service template.

Image VMM supports updating a deployed service by either applying updates to the in-place virtual machines that comprise the service or deploy new virtual machines with updated settings to replace the existing virtual machines that comprise the service.

Image When VMs are segmented into upgrade domains, VMM will apply updates to one upgrade domain at a time, only moving on to the next upgrade domain once the updates are applied to the current upgrade domain.

Image Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value.

Image If you update a resource in VMM that is referenced by a service template, you’ll need to copy and update the service template to reference the newly updated resource.

Image Once you’ve published an updated template, you can apply updates to an existing service by configuring the service to use the updated service template.

Objective review

Answer the following questions to test your knowledge of the information in this objective. You can find the answers to these questions and explanations of why each answer choice is correct or incorrect in the “Answers” section at the end of this chapter.

1. You need to update the service template of a service you deployed in VMM. Which of the following steps do you need to take to accomplish this goal?

A. Specify a new release value on the original template.

B. Specify a new release value on the template copy.

C. Create a copy of the original service template and make changes to the copy.

D. Make changes to the original template.

2. You want to apply updates to a deployed service. On the Updated Service Template page of the Change Service Template Wizard, which step should you take?

A. Edit the current template.

B. Delete the current template.

C. Replace the current template with the updated template for the service.

D. Replace the updated template with the current template.

3. You’ve created an updated template that references updated resources. Which of the following steps must you take before you can apply updates to an existing service using the updated service template?

A. Delete the template.

B. Publish the template.

C. Export the template.

D. Import the template.

Answers

This section contains the solutions to the thought experiments and answers to the objective review questions in this chapter.

Objective 5.1: Thought experiment

1. If you choose to use generation 2 in a hardware profile, you’ll only be able to use virtualization hosts running Windows Server 2012 R2 or later.

2. In what circumstances will the role and feature configuration of the guest operating system profile you are experimenting will be enacted? [Role and feature configuration applies when the guest operating system profile is enacted as part of a service template.]

Objective 5.1: Review

1. Correct answer: A

A. Correct: You can use the SQL Server profile to configure SQL Server configuration settings such as the SQL Server service account.

B. Incorrect: You use a hardware profile to configure a VM’s hardware configuration, including the VM’s memory configuration.

C. Incorrect: A guest operating system profile allows you to configure settings including the local administrator account password settings for a VM.

D. Incorrect: Application profiles include information that VMM can use for installing Microsoft Web Deploy applications, SQL Server data-tier applications, Microsoft Server App-V applications, and instructions for running scripts when you deploy a VM as part of a service.

2. Correct answer: C

A. Incorrect: Application profiles include information that VMM can use for installing Microsoft Web Deploy applications, SQL Server data-tier applications, Microsoft Server App-V applications, and instructions for running scripts when you deploy a VM as part of a service.

B. Incorrect: A guest operating system profile allows you to configure settings, including the local administrator account password settings for a VM.

C. Correct: You use a hardware profile to configure a VM’s hardware configuration, including the VM’s memory configuration.

D. Incorrect: You can use the SQL Server profile to configure SQL Server configuration settings such as the SQL Server service account.

3. Correct answer: C

A. Incorrect: You can use the SQL Server profile to configure SQL Server configuration settings such as the SQL Server service account.

B. Incorrect: You use a hardware profile to configure a VM’s hardware configuration, including the VM’s memory configuration.

C. Correct: A guest operating system profile allows you to configure settings including the local administrator account password settings for a VM.

D. Incorrect: Application profiles include information that VMM can use for installing Microsoft Web Deploy applications, SQL Server data-tier applications, Microsoft Server App-V applications, and instructions for running scripts when you deploy a VM as part of a service.

Objective 5.2: Thought experiment

1. What Server App-V Windows PowerShell cmdlet would you use to save the The Backup-ServerAppvPackageState cmdlet saves the runtime state of an existing Server App-V application to a designated location.

2. The Restore-ServerAppvPackageState cmdlet restores the runtime state of a virtual application. You can only use this cmdlet if you have a backup of the application’s runtime state.

Objective 5.2: Review

1. Correct answer: C

A. Incorrect: This cmdlet restores the runtime state of a virtual application. You can only use this cmdlet if you have a backup of the application’s runtime state. As the question did not state that such a backup existed, this is not the best answer.

B. Incorrect: This cmdlet starts an installed virtual application package and associated subsystem.

C. Correct: This cmdlet removes the runtime state, returning the virtual application package to its initial state, but does not remove the virtual application package.

D. Incorrect: This cmdlet shuts down a virtual application package and associated subsystems.

2. Correct answer: C

A. Incorrect: This cmdlet removes a Server App-V package from a computer to which it has been deployed.

B. Incorrect: This cmdlet removes the runtime state, returning the virtual application package to its initial state, but does not remove the virtual application package.

C. Correct: This cmdlet adds a new virtual application to a computer that has the Server App-V agent installed, or can be used to upgrade an existing virtual application.

D. Incorrect: This cmdlet restores the runtime state of a virtual application. You can only use this cmdlet if you have a backup of the application’s runtime state.

3. Correct answer: C

A. Incorrect: This cmdlet restores the runtime state of a virtual application. You can only use this cmdlet if you have a backup of the application’s runtime state.

B. Incorrect: This cmdlet adds a new virtual application to a computer that has the Server App-V agent installed, or can be used to upgrade an existing virtual application.

C. Correct: Use this cmdlet to update an existing virtual application package.

D. Incorrect: This cmdlet starts an installed virtual application package and associated subsystem.

4. Correct answer: B

A. Incorrect: To add a Server App-V application to a VMM library as a custom resource, which allows you to deploy it using VMM, place the package files in a folder with the extension .CR and copy that folder to the VMM library.

B. Correct: To add a Server App-V application to a VMM library as a custom resource, which allows you to deploy it using VMM, place the package files in a folder with the extension .CR and copy that folder to the VMM library.

C. Incorrect: To add a Server App-V application to a VMM library as a custom resource, which allows you to deploy it using VMM, place the package files in a folder with the extension .CR and copy that folder to the VMM library.

D. Incorrect: To add a Server App-V application to a VMM Library as a custom resource, which allows you to deploy it using VMM, place the package files in a folder with the extension .CR and copy that folder to the VMM library.

Objective 5.3: Thought experiment

1. You should configure an Application Profile to automate the deployment to Microsoft Server App-V applications to virtual services.

2. You should configure a service template so that you can automate the deployment of multi-tier applications. Service templates include VM templates, application, and SQL Server profiles.

Objective 5.3: Review

1. Correct answers: A, B and C

A. Correct: You can use a deployed virtual machine, an existing virtual machine template, or a virtual hard disk as the basis for a virtual machine template

B. Correct: You can use a deployed virtual machine, an existing virtual machine template, or a virtual hard disk as the basis for a virtual machine template

C. Correct: You can use a deployed virtual machine, an existing virtual machine template, or a virtual hard disk as the basis for a virtual machine template

D. Incorrect: You can use a deployed virtual machine, an existing virtual machine template, or a virtual hard disk as the basis for a virtual machine template

2. Correct answer: B

A. Incorrect: SQL DAC packages are stored in the VMM library in zip format.

B. Correct: SQL DAC packages are stored in the VMM library in zip format.

C. Incorrect: SQL DAC packages are stored in the VMM library in zip format.

D. Incorrect: While SQL DAC data is written in XML format, the package itself is stored in the library as a zip file.

3. Correct answer: D

A. Incorrect: Physical profiles are used with PXE deployment of virtualization hosts.

B. Incorrect: Service templates can include application profiles and SQL server profiles. These profiles are not available when deploying a VM from a VM template.

C. Incorrect: Service templates can include application profiles and SQL server profiles. These profiles are not available when deploying a VM from a VM template.

D. Correct: You can include a guest operating system profile in a VM template.

4. Correct answers: A, B, and D

A. Correct: Service templates can include VM templates, SQL Server profiles, and application profiles.

B. Correct: Service templates can include VM templates, SQL Server profiles, and application profiles.

C. Incorrect: Physical profiles are used with PXE deployment of virtualization hosts and cannot be included in VMM service templates.

D. Correct: Service templates can include VM templates, SQL Server profiles, and application profiles.

Objective 5.4: Thought experiment

1. Configure upgrade domains so that only a portion of the servers in the tier are upgraded at any one time.

2. Adjust the tier settings and increase the maximum number of VMs that can be deployed in the tier.

Objective 5.4: Review

1. Correct answers: B and C

A. Incorrect: Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value. You then make the appropriate updates to the service template.

B. Correct: Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value. You then make the appropriate updates to the service template.

C. Correct: Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value. You then make the appropriate updates to the service template.

D. Incorrect: Updating the service template of a deployed service in VMM involves creating a copy of the original service template and specifying a new release value. You then make the appropriate updates to the service template.

2. Correct answer: C

A. Incorrect: To apply updates to a deployed service, on the Updated Service Template page of the Change Service Template Wizard, you need to select the option to Replace the current template with an updated template for this service.

B. Incorrect: To apply updates to a deployed service, on the Updated Service Template page of the Change Service Template Wizard, you need to select the option to Replace the current template with an updated template for this service.

C. Correct: To apply updates to a deployed service, on the Updated Service Template page of the Change Service Template Wizard, you need to select the option to Replace the current template with an updated template for this service.

D. Incorrect: To apply updates to a deployed service, on the Updated Service Template page of the Change Service Template Wizard, you need to select the option to Replace the current template with an updated template for this service.

3. Correct answer: B

A. Incorrect: Before you can apply updates to an existing service using an updated service template, you must publish the service template.]

B. Correct: Before you can apply updates to an existing service using an updated service template, you must publish the service template.

C. Incorrect: Before you can apply updates to an existing service using an updated service template, you must publish the service template.

D. Incorrect: Before you can apply updates to an existing service using an updated service template, you must publish the service template.