Services, in the sense of virtual machines, are collections of virtual machines deployed together to provide an application. Central to this concept are tiers or a tier-based infrastructure in which multiple tiers provide the service and an individual tier has the configuration necessary for its portion of the service.
VMM service templates contain information about the service as a whole, including all tiers. VMM service templates are created and managed with the Service Template Designer, which is accessed through the VMs and Services workspace in the VMM Console.
Before using Service Template Designer, you should become familiar with creating Logical Networks, VM Templates, and other pieces of the given service template necessary for its configuration. Also, users creating service templates must be administrators or have the Author action in their user role scopes.
When Service Template Designer is launched, you can choose from certain predefined templates, called patterns, including single-, two-, and three-tier templates, or you can choose a blank template (see Figure 1-15).
FIGURE 1-15 Choosing a Single Machine Tier pattern in Service Template Designer.
Service Template Designer then presents a template based on your pattern selection. In the case of Figure 1-15, a Single Machine template was chosen; Figure 1-16 shows the template in Service Template Designer.
FIGURE 1-16 A Single Machine Tier template in Service Template Designer.
Service templates are created according to the specification you have for the service. You can drag additional VM templates onto the canvas and add them to the template as needed.
Figure 1-16 shows three VM templates defined (they were predefined outside Service Template Designer). You could drag these onto the canvas and add them to the service template being designed.
Double- or right-clicking a given tier reveals the Properties sheet for that tier, in which you can configure the tier’s properties. For example, Figure 1-17 shows that a Virtual Hard Disk was added, which is a requirement for the Single Tier application template. You also need to connect the predefined templates to a domain, which you accomplish also within the tier properties.
FIGURE 1-17 Changing the hardware configuration of a Single Tier template in Service Template Designer.
Connecting the host to a logical network is another requirement when creating a service template. You do this with the Add Logical Network component in Service Template Designer, and then use the Connector tool to connect the logical network to the network interface in the tier. The logical network component also must be associated with a logical network through its properties. In the case of Figure 1-18, the logical network is associated with Logical Network 1, which was predefined by the author.
FIGURE 1-18 Associating a logical network with a tier.
When you’ve made changes to the template, click Save and Validate. Service Template Designer then examines the configuration and looks for potential problems. When you’re ready to deploy the template, choose Configure Deployment from the toolbar. VMM then tries to place the service by examining the template and looking for available hosts on which to deploy the virtual host. This process includes examining the resources requested for the service template and comparing those against the available resources.
You can set service template properties through the canvas at the template level, including such properties as the name of the service template itself, its release number or version name,and who has access to deploy using the service template. You also can change tier properties including the tier name, the capability to scale or add machines to a deployed service, the service group or upgrade domain, the hardware, guest OS, application, and SQL Server configuration.You can also configure networking objects through the canvas in Service Template Designer.
For example, you might need to deploy additional virtual machines to a service tier to handle additional load. To scale a service out, the service template needs to allow scaling. This aspect is configured through Service Template Designer. Unless you have a business reason for not allowing scaling on a given tier, you should allow the tier to be scaled by checking the This Computer Tier Can Be Scaled Out check box and increasing the Maximum Instance Count accordingly. Also, increase the upgrade domains at the same time to enable VMM to
minimize service downtime for later upgrades.
Another task related to service templates is adding a tier. You can add a service tier in two ways: by dragging a virtual machine template onto the canvas or by using the Create Machine Tier Template Wizard. In practice, however, adding a tier to an existing service template is less common than creating a new template to handle the additional tier.