Walkthrough: Provisioning a Linux VM on VMware

BMC BladeLogic Server Automation (BSA) can provision a Linux VM on VMware. 

This topic walks you through the process. It includes the following sections:

Introduction

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

BSA 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. A 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 BSA 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 virtual machine to a target host server. A VGJ is based on a VGP that must be created previously.

What do I need to do before I get started?

  • This example assumes that you have either existing VMs or VM Templates from which you want to deploy new VMs. For VMware, Microsoft Hyper-V, Citrix Xenserver, and RHEV Manager platforms, 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.
  • For this walkthrough, you log on as BLAdmin, the default superuser for BSA. 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 Linux VM on VMware

As a virtual infrastructure administrator, you may have requests for a new Linux VM. In this example, you will create the new VM based on an existing VM template by creating a VGP in the Depot workspace. You will then use the VGJ to deploy a new VM on the vCenter server (which must be a BSA managed server).

 StepExample screen
1

Right-click the depot folder called Virtualization and select New > Virtual Guest Package > VMWare.

To deploy a new VM, including the guest OS, use a VGP. This walkthrough shows how to manually create the VGP. You can also do this process in an automated fashion.

2

Enter a name for the VM and select a template from which to create the new VM.

When you are automating the deployment of new VMs into an infrastructure, you probably have either existing VMs or VM templates from which you deploy new VMs. BSA supports the cloning of VMs as well as the cloning of templates into new VMs.

3

Select the Linux template and click Finish.

You now have selected a Linux template and have created the new VGP.

4

The VGP automatically opens. On the first tab and on the last tab enter LinuxVM2 as the VM and host name.

Leave everything else as it is and save the VGP.

As you can see, because you created this VGP from an existing VM template, BSA knows everything about the configuration of the VM. In this case it is a Linux RedHat Enterprise Linux 5 VM. BSA knows the CPU, memory and disk configuration, network settings, and so forth. You are able to modify them if needed.

5

Now that the VGP is created, you are ready to deploy the new VM. Right-click the VGP and select Deploy Virtual Guest.

6

For the deployment of a VGP, create a VGJ. Enter a name for the job and store the job in the folder called Virtualization (for example). Then click Next.

7

Select a target where you can deploy the new VM. This can be a single ESX host, a cluster, and so on. Select the ESX host as the target for the VGP. Click OK and then click Next.

8

You can change the name of the VM or stick with the value defined in the VGP. You must specify where to store files for the VM. Because there is only one datastore, accept the defaults.

 Make sure the Customize OS checkbox is checked and click Next.

9

For the CPU, memory and disk configuration, accept the standards set in the VGP.

Click Next.

10

Click Edit.

11

It is important to configure the name resolution for this host, or it not work correctly and you will not be able to manage the newly created server.

Because the VGP was configured so any new server uses DHCP, change the option to give the server a fixed IP address.

Configure the IP details as shown in the example, click OK, then click Next

12

In this panel you can define the host name of the server you are going to create. You can define the name, or you can let BSA generate a random host name for every server you are going to deploy.

For this walkthrough, accept the default hostname LinuxVM2.

Click Next.

13

Click the green plus sign, select the Execute Job Now option and click Finish.

You can specify scheduling options, the job run notifications, properties and permissions for the job, but in this example just select Execute Job Now and launch the job.

14

While the job is running, switch from the BSA console to the VIM console.

As you can see, BSA instructed the vCenter to clone the Linux Template into a new VM called LinuxVM2. This process takes a while. Once the VM is created, BSA instructs vCenter to customize the VM, apply the changes you specified in the VGJ, and then boot the VM up again.

15

In the VIM client, select LinuxVM2 and select the Summary tab.

Here you can see that the DNS Name of the VM is LinuxVM2 and the IP address is set to the value defined in the VGJ.

16

Back in the BSA console, refresh the Virtualization > All Virtual Machines smart group, right-click the server LinuxVM2, and select Verify.

If the RedHat icon is not showing, live browse the server LinuxVM2, as shown in the example screen shot.

Wrapping it up

As you can see, LinuxVM2 is registered correctly and you can manage that server as if it were any other managed server. BSA has taken care of the creation/cloning of the template, the reconfiguration of the VM, the power off, power on process and the registration of the VM in the BSA database.

Any operator can now use the VGP and VGJ to deploy new VMs.

Where to go from here

For a walkthrough of provisioning an OS onto a bare metal machine, see Walkthrough: Provisioning Microsoft Windows 2012 on a bare metal machine.

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

Comments