Walkthrough: Provisioning a Linux VM on VMware
TrueSight Server Automation can provision a Linux VM on VMware.
This topic walks you through the process. It includes the following sections:
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.
TrueSight 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. 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 TrueSight 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 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 TrueSight Server Automation. 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 TrueSight Server Automation managed server).
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.
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. TrueSight Server Automation supports the cloning of VMs as well as the cloning of templates into new VMs.
Select the Linux template and click Finish.
You now have selected a Linux template and have created the new VGP.
The VGP automatically opens. On the first tab and on the last tab enter
Leave everything else as it is and save the VGP.
As you can see, because you created this VGP from an existing VM template, TrueSight Server Automation knows everything about the configuration of the VM. In this case it is a Linux RedHat Enterprise Linux 5 VM. TrueSight Server Automation knows the CPU, memory and disk configuration, network settings, and so forth. You are able to modify them if needed.
Now that the VGP is created, you are ready to deploy the new VM. Right-click the VGP and select Deploy Virtual Guest.
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.
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.
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.
For the CPU, memory and disk configuration, accept the standards set in the VGP.
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.
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 TrueSight Server Automation generate a random host name for every server you are going to deploy.
For this walkthrough, accept the default hostname LinuxVM2.
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.
While the job is running, switch from the TrueSight Server Automation console to the VIM console.
As you can see, TrueSight Server Automation instructed the vCenter to clone the Linux Template into a new VM called LinuxVM2. This process takes a while. Once the VM is created, TrueSight Server Automation instructs vCenter to customize the VM, apply the changes you specified in the VGJ, and then boot the VM up again.
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.
Back in the TrueSight Server Automation 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. TrueSight Server Automation 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 TrueSight Server Automation 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.