Starting version 8.9.03, BMC Server Automation is renamed to TrueSight Server Automation. This space contains information about BMC Server Automation 8.9.02 and previous versions. For TrueSight Server Automation 8.9.03 and later releases, see TrueSight Server Automation 8.9.

Walkthrough: Provisioning a VM from a Hyper-V Generation 2 template

This topic walks you through the process of provisioning a virtual machine (VM) from a Hyper-V Generation 2 templateThis topic includes the following sections:


Manually creating and deploying VMs takes a great deal of time and effort. It is also a potentially error prone process, as there are so many steps that must be repeated during the installation of each VM, some of which vary by virtualization platform. However, using a Virtual Guest Package (VGP) and Virtual Guest Job (VGJ) provides a repeatable process for creating new VMs according to a specific configuration that you define or clone from a template.

BMC Server Automation supports the cloning of VMs as well as the cloning of templates into new VMs.

What is a Virtual Guest Package?

A VGP bundles configuration changes so they can be deployed to hosts/clusters using a Virtual Guest Job. The VGP consists of an instruction set and any files needed for implementing configuration changes. Configuration changes can consist of additions, deletions, and modifications to any of the server objects BMC Server Automation supports on all operating systems. You can create multiple VGPs, each designed and tailored for a specific use. For example, you can create one VGP that defines a VM for a SQL Server used in development, while another can be tailored for use by QA as a web server. 

What is a Virtual Guest Job?

A VGJ deploys a VM to a target host server. A VGJ is based on a VGP that must be created previously.

What does this walkthrough show?

As a virtualization administrator, you need to be able to provide a template-based approach to deploying Hyper-V based VMs.

Your organization wants to use Generation 2 Hyper-V templates for provisioning both Microsoft Windows 2012 R2 and RedHat Enterprise Linux version 7 and 7.1 VMs.

Your organization also needs to customize the VM host name, and also support standard VM actions post deployment. For example, with Generation 2 Hyper-V you can perform online memory upgrades (hot swappable memory).

This walkthrough shows how to:

  • Create and customize a Virtual Guest Package
  • Create and run a Virtual Guest Job with basic parameters to provision a Microsoft Windows Hyper-V VM.
  • Create and run a BLPackage that upgrades the memory of the VM.

What do I need to do before I get started?

  • This example assumes that you have existing VM Templates from which you want to deploy new VMs. To set up the templates, see Creating Generation 2 Virtual Machine Templates on SCVMM. You can use a Virtual Guest Template Enrollment Job to automatically discover operating system templates on those systems, and create VGPs for the discovered templates. See Automatically creating a Virtual Guest Package.
  • Prior to provisioning, you need to add the Microsoft System Center Virtual Machine Manager (SCVMM) to the BMC Server Automation environment, set up the properties for the connection instance, and distribute the SCVMM configuration object. See Adding the Microsoft SCVMM server to BMC Server Automation
  • For this walkthrough, you log on as BLAdmin, the default superuser for BSA. Ensure that the BLAdmin user has the VirtualGuestJob.Create, VirtualGuestJob.Read, VirtualGuestPackage.Create, and VirtualGuestPackage.Read authorizations. Note that in live deployments, BMC recommends you grant access based on roles with a narrower set of permissions that is typically granted to BLAdmin.

How to provision a VM from a Hyper-V Generation 2 template

There are three basic steps to provision a VM from a Hyper-V Generation 2 template:

  • Create the VGP
  • Create and run a VGJ.
  • Create and run a BLPackage that upgrades the memory of the VM.

Create the VGP

 StepExample screen
1First, you need to create the VGP.

Provide VM name and select the template 

Select the template from the host

3Complete creation of VGP
4Click Finish to save the VGP.

Now that the VGP is created, edit the settings. The edit screen is displayed automatically when you save the VGP.

Edit the VGP 6.


In the storage tab provide the storage location 

On the Storage tab, click the plus sign to add a virtual disk. The Virtual Disk Settings dialog box is displayed.

Click the Browse button next to the Storage field.


On the Select Storage dialog box:

Select a server from the Select Server drop-down list.

Select the Virtual Guest Storage host and storage 

Click OK.

On the The Virtual Disk Settings dialog box, click OK to save the storage settings for the virtual disk.


On the Network tab, click the plus sign to add a network. The Virtual Network Interface Settings dialog box is displayed.

Click the Browse button next to the Network field.

Select a server from the Select Network drop-down list.

Select the network settings of your choice.  

Click OK to save the network settings.

9On the VM Basic Config tab, enter Local Settings details 

On the VM Computer Settings tab, enter User Information.

Close the VGP and save your changes when prompted.

Next, we need to create the VGJ that will use this VGP as the base for the new VM.

Create and run the VGJ

 StepExample screen

Select the VGP and create VGJ

2Provide Name for the VGJ

3Provide Target Host

4Customize General Settings CPU, Memory if required

5Customize disk addition

6Customize Network


Customize Local Settings

8Customize User Information

9Execute the Job

Create and run a BLPackage that upgrades the memory of the VM.

 StepExample screen

Create BLPackage of VM:

  1. In the BMC Server Automation console, right click the VM that you provisioned in the previous section.
  2. Select Add to Depot as > BLPackage.

The BLPackage wizard is displayed.

2On the Create BLPackage - Package Type panel, enter a name for the package and select Finish.


Open the BLPackage and modify the parameters, as needed. You can modify the number of virtual CPUs, add memory, add a NIC, and add a disk.

In this example, we want to increase the amount of memory for the VM.

  1. Select the Memory option.
  2. In the Action field, enter Modify.
  3. In the Memory field, use the arrows to increase the amount of memory.
  4. In this example, we increase the memory to 1256 MB.

Next, we save and deploy the package.

Right-click the package and select Deploy.


Verify that the memory modification is reflected for the VM.

  1. In Live Browse, select the SCVMM.
  2. Locate the VM in the tree, and select it.
  3. In the right-hand pane, verify that the memory has been increased to 1256 MB.

Wrapping it up

In this walkthrough, you went through the process of provisioning a VM from a Hyper-V Generation 2 template, and then used a BLPackage to upgrade the memory on the VM after it was provisioned.

Where to go from here

Check out Walkthrough: Provisioning Linux and Walkthrough: Provisioning Microsoft Windows 2012 on a bare metal machine to see how to provision other types of VMs.

Was this page helpful? Yes No Submitting... Thank you