Hi everyone, Biddappa Berera here, and today I’d like to talk about the scaling of services deployed to hostgroups and private clouds in System Center Virtual Machine Manager 2012. A service in VMM 2012 is a logical grouping of virtual machines that the user can manage as a single entity. Each service is backed with a service template that contains the configuration details pertinent to the service.
A service can contain one or more tiers, each of which is made up of a number of virtual machines with identical configurations. The minimum, maximum and default number of virtual machines (instances) per tier can be configured on the computer tier template for that tier. A service is initially deployed using the default instance count for each tier.
During periods of higher load on the service it may be necessary to increase the number of virtual machine instances for the tier. Similarly, the number can be brought down during leaner load periods. To achieve these goals, VMM 2012 has two new operations. The number of virtual machines can be increased using the Scale Out action on a tier or the number of virtual machines can be decreased by removing a virtual machine (Scale In).
We will take a look at both these operations.
This section will use a single tier Web service that is configured behind a load balancer as an example.
In the Services workspace, a ‘Scale Out’ action is available on the ribbon via the Service tab. The same action is available on the context menu (displayed by right-clicking the selected object) after you select the service that you want to scale out. In VMM 2012, a single virtual machine can be scaled out per service at a time.
To scale out a service, just select the service and use the Scale Out action on the context menu or on the ribbon.
This action will launch the Scale Out Virtual Machine Tier Wizard.
Since the service has only one tier, we will select that tier from the Machine Tier drop-down list and proceed to the next wizard page.
On the next page, let us provide a name for the scaled out virtual machine instance and proceed.
On the next page, let us select a host for the instance based on the placement ratings and proceed.
The next wizard page provides us configuration settings for the new virtual machine, which can be edited as required. We shall retain the defaults and proceed.
The following wizard page specifies additional properties for the virtual machine instance which specify what action to take on the virtual machine when the host is started or stopped. We shall again choose the defaults and proceed to the summary screen.
The last wizard page displays a summary of settings.
After we are satisfied with the settings, we shall proceed to scale out the tier by clicking the Scale Out button. This action also closes the wizard.
We can monitor the progress of the job by viewing it in the Jobs workspace.
The scale-out operation creates a new virtual machine with a configuration that is identical to other virtual machines in the tier. It also deploys any applications, OS roles/ features that are required for that tier. Once this is done, the virtual machine that we are using in this example is configured behind the load balancer that is on the tier.
VMM 2012 automatically calculates the Upgrade Domain value for this virtual machine instance based on the Number of upgrade domains for the tier as well as the existing number of instances on the tier. Upgrade domains provide a partitioning of the virtual machines on a tier when servicing the service. All virtual machines in the same upgrade domain are serviced together. This allows virtual machines in other upgrade domains to remain connected to the service (allows the service to be up) during the servicing.
After the job is completed, the scaled out virtual machine instance is listed under the service in the VM and Services workspace.
Windows PowerShell Method
To perform the same operation using the Windows PowerShell – Virtual Machine Manager command shell, we can use the following cmdlets:
New-SCVMConfiguration -ComputerTier -Name
This call will create a VMConfiguration for the computer tier that is being scaled out.
After this is done, we shall invoke placement on this VMConfiguration by using the following cmdlet:
This will result in the VMConfiguration being updated with placement information such as the target and virtual machine path.
Finally, we can run the next cmdlet to scale out the tier:
New-SCVirtualMachine -ScaleOutVMConfiguration -Name
In VMM 2012, a tier is scaled in by using the Delete virtual machine action. In the VMs and Services workspace, a Delete virtual machine action is available on the context menu (displayed by right-clicking the selected object) after you select the virtual machine. The action is also available on the ribbon.
In order to scale in a service tier, the virtual machine must to be in a Powered off state.
When you select the Delete action, you will see a confirmation prompt. Selecting Yes causes the virtual machine to be deleted. Selecting No cancels the operation.
Deleting a virtual machine in VMM 2012 will remove all the configuration files and disks associated with it on the host.
After the operation is completed, the virtual machine will no longer be listed under the tier in the VM and Services workspace.
To perform the same operation using Windows PowerShell, we can use the following cmdlets:
The VM parameter is the virtual machine that is being scaled in.
For services that are deployed in a private cloud, the scale-out action is available, albeit in a slight different form to account for the private cloud environment.
We will consider a single tier service that is deployed in a private cloud by a member of self-service user role as an example.
Selecting the Scale Out action from the context menu for a service or from the ribbon launches the Scale Out Virtual Machine Tier Wizard.
Since the service has a single tier, let us select that tier and proceed.
On the next wizard page we can provide any additional properties for the virtual machine and proceed. Notice that when a self-service user scales out a virtual machine in a private cloud, there was no host selection screen.
The next wizard page is the summary of settings.
To complete the operation, click the Scale Out button.
As with administrators, self-service users can monitor the job in the Jobs workspace.
After completion of the operation, the virtual machine will be listed under the tier in the VM and Services workspace.
New-SCVirtualMachine -ComputerTier -Name
This call will create a scaled out virtual machine for the computer tier using the name that was specified.
Scale-in for private cloud services is similar to that of services deployed to a host group. The operation is performed by using the Delete action for the virtual machine.
The virtual machine needs to be in a powered off state to be scaled in.
The Delete virtual machine action is available in the context menu or on the ribbon.
Similar to the hostgroup case, a warning is shown upon selection of the action. Selecting Yes on the dialog will result in the virtual machine being scaled in. After operation is completed, the virtual machine is no longer listed in the VM and Services workspace.
This call will remove the virtual machine that was input via the VM parameter.
Biddappa Berera | VMM Software Development Engineer
The App-V Team blog: http://blogs.technet.com/appv/ The WSUS Support Team blog: http://blogs.technet.com/sus/ The SCMDM Support Team blog: http://blogs.technet.com/mdm/ The ConfigMgr Support Team blog: http://blogs.technet.com/configurationmgr/ The SCOM 2007 Support Team blog: http://blogs.technet.com/operationsmgr/ The SCVMM Team blog: http://blogs.technet.com/scvmm/ The MED-V Team blog: http://blogs.technet.com/medv/ The DPM Team blog: http://blogs.technet.com/dpm/ The OOB Support Team blog: http://blogs.technet.com/oob/ The Opalis Team blog: http://blogs.technet.com/opalis The Service Manager Team blog: http: http://blogs.technet.com/b/servicemanager The AVIcode Team blog: http: http://blogs.technet.com/b/avicode The System Center Essentials Team blog: http: http://blogs.technet.com/b/systemcenteressentials The Server App-V Team blog: http: http://blogs.technet.com/b/serverappv
<p>I get that with Scaling Out in host groups or private clouds that the new VM is automatically added to the load balancer used for that particular service, but you don't mention what happens when the VM is Scaled In/deleted. Is the configuration of the load balancer also automatically updated?</p>
<p>Yes, a scale in operation will result in the VM being removed from the load balancer's VIP pool.</p>