Virtualization sprawl is an uncontrolled growth of virtual systems, which leads to un-managed virtual systems that consume IT resources without being productive systems (for example, a virtual machine which is no longer associated with a host server, but still exists on the datastore).As an administrator of a virtual infrastructure, you want to know the state of the virtual machines in your environment at any given time. With BMC Server Automation, you can discover the virtual infrastructure inventory, and identify any virtual machines or zones that are contributing to virtualization sprawl.
You can run a Virtual Infrastructure Discovery Job to query the virtual environment for existing virtual machines. If the discovered virtual assets are not already enrolled in the inventory, you can choose to auto-enroll them by selecting an option in the Job configuration. Running the Virtual Infrastructure Discovery Job enables you to see what the virtual inventory looks like, without having to manually find and register each virtual asset. Being able to manage this inventory effectively enables you to control resource waste and optimize the use of the available hardware.
The following sections provide an overview of the Virtual Infrastructure Discovery Job, recommendations for setting up the job, and a description of how to create the job.
Capabilities by environment
Use the Virtual Infrastructure Discovery Job to perform the following tasks:
VMware environments only
To use the Import Lifecycle Properties option on the Virtual Infrastructure Discovery Job, you must create a properties mapping file for the lifecycle properties. The mapping file contains a list of mappings for the targets and VMware vCenter servers against which the Virtual Infrastructure Discovery Job is run.
Lifecycle Properties are not imported for ESX Hosts.
Note the following considerations when creating the file:
LOCATION) for all registered virtual machines.
The Name parameter for the VirtualEntityManagerelement must match the name provided in the CONNECTION_URL of the Connection property set instance of the virtual entity manager.
If a server has been renamed, you must manually change the Connection property set instance value to the renamed server name for the Virtual Infrastructure Discovery Job remediation target and Import Lifecycle options to execute successfully.
To create a properties mapping file for the Import Lifecycle Properties option:
Create an XML file with the format shown in the following figure:
Where <hostname> is the fully qualified VMware vCenter server name or IP address.
Set the isMap attribute for each property.
If the isMap attribute for a property in the mapping file is set to false then the default value specified for the property is used, as shown for hostname_1 in the above example.
If the isMap attribute for a property in the mapping file is set to true, then the specified customProperty must match the name of the custom property defined in the virtual entity manager whose value is to be imported for this property. For example: if the isMap attribute for the location property is set to true and the custom property defined on the virtual entity manager (VMware vCenter in this example) is VM location, then the customProperty attribute in the mapping file must also be VM location.
The imported lifecycle properties are listed under the Lifecycle property set instance for each virtual machine under the vCenter. If the update all servers properties option is selected, then the three lifecycle properties of the servers existing in BMC Server Automation are also updated.
Although lifecycle properties are not retrieved from the virtual entity manager in a Solaris zones or IBM LPAR environment, the default values specified in the mapping file for the properties are imported, and the Lifecycle property set instance is created for non-global zones or IBM LPAR.
The Virtual Infrastructure Discovery Job also creates or populates the following extended server properties that are used to populate the BMC BladeLogic Decision Support for Server Automation reports:
Virtualization class properties created
Server properties populated
Create and run a Virtual Infrastructure Discovery Job to automatically discover and register the virtual machines in your environment.
Open the Jobs folder and navigate to a Job folder.
Right-click the Job folder and select New > Virtual Infrastructure Discovery Jobfrom the pop-up menu. The Virtual Sprawl Discovery Job wizard opens.
For VMware platforms, if an ESX host is in the disconnected state and has not been removed from VMware vCenter, the options in the Virtual Infrastructure Discovery Job are not supported against the vCenter server which manages the disconnected ESX host.
Using the Schedule panel, you can schedule a Virtual Guest Job or Virtual Infrastructure Discovery Job so that it runs once or recurs on an hourly, daily, weekly, monthly, or runs on an arbitrary time interval. In the Schedules panel, define any number of schedules for the Virtual Infrastructure Discovery Job in the list of schedules, and then click Next. You can use any of the following options:
After the Virtual Infrastructure Discovery Job completes, right-click the job and select Show Results. You can then review the information discussed in the following sections.
In the Job Results pane, expand the Missing Servers node.
This view shows servers that are present in BMC Server Automation inventory but not in virtual environment. This view shows the following information:
You can then select one or more servers from the table, right-click and select Decommission Server (s) to remove the servers from the BMC Server Automation inventory.
The Missing Servers node is available only if you selected the Run Virtual Infrastructure Update job option.
In the Job Results pane, expand the Unregistered Servers node.
This view displays any unregistered Virtual Machines discovered by the Virtual Infrastructure Discovery Job. Review the systems and register those which you want to manage.
The unregistered server node is available only if you selected the Discovered Unregistered Virtual Systems job option.
In the Job Results view, expand the Unregistered Templates node.
This view displays any unregistered templates discovered by the Virtual Infrastructure Discovery Job. Each entry contains the name of the template, the entity manager (vCenter name) and the path of the template on the datastore.
The unregistered server node is available only if you selected the Discovered Unregistered Virtual System Templates job option.