This topic walks you through the process of provisioning a virtual machine (VM) from a Hyper-V Generation 2 template. This 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.
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.
A VGJ deploys a VM to a target host server. A VGJ is based on a VGP that must be created previously.
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:
There are three basic steps to provision a VM from a Hyper-V Generation 2 template:
Step | Example screen | |
---|---|---|
1 | First, you need to create the VGP. | |
2 | Provide VM name and select the template Select the template from the host | |
3 | Complete creation of VGP | |
4 | Click Finish to save the VGP. | |
5 | Now that the VGP is created, edit the settings. The edit screen is displayed automatically when you save the VGP. Edit the VGP 6. | |
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.
| |
7 | 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. | |
8 | 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. | |
9 | On the VM Basic Config tab, enter Local Settings details | |
10 | 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. |
Step | Example screen | |
---|---|---|
1 | Select the VGP and create VGJ | |
2 | Provide Name for the VGJ | |
3 | Provide Target Host |
|
4 | Customize General Settings CPU, Memory if required | |
5 | Customize disk addition | |
6 | Customize Network | |
7 | Customize Local Settings | |
8 | Customize User Information | |
9 | Execute the Job |
|
Step | Example screen | |
---|---|---|
1 | Create BLPackage of VM:
The BLPackage wizard is displayed. | |
2 | On the Create BLPackage - Package Type panel, enter a name for the package and select Finish. | |
3 | 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.
| |
4 | Next, we save and deploy the package. Right-click the package and select Deploy. | |
5 | Verify that the memory modification is reflected for the VM.
|
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.
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.