Managing virtualization sprawl
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 TrueSight Server Automation, you can discover the virtual infrastructure inventory, and identify any virtual machines or zones that are contributing to virtualization sprawl. 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).
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
- Recommendations for setting up the job
- Creating a properties mapping file
- Extended server properties created or populated by the Job
- To create a Virtual Infrastructure Discovery Job
- To schedule a Virtual Infrastructure Discovery Job
- To review the results of the job
- Where to go from here
- Capabilities by environment
Capabilities by environment
Use the Virtual Infrastructure Discovery Job to perform the following tasks:
Environment | Task |
---|---|
VMware |
|
VMware environments only |
|
Recommendations for setting up the job
- When setting up the Virtual Infrastructure Discovery Job, ensure that you have listed all of the host servers (vCenter servers, global zones, or AIX servers) in your environment as Targets for the Job. To accurately capture the entire virtual infrastructure, you must include all of the host servers.
- If you have asset management information available for your virtual infrastructure (for example, you capture specific information about the assets, such as location or owner), you can leverage that information by creating a mapping file and employing that mapping file in the Virtual Infrastructure Discovery Job.
Creating a properties mapping file
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.
Note the following considerations when creating the file:
- You must store the file in a depot folder so that it is accessible across Application Server instances.
- The Import Lifecycle Properties option on the Virtual Infrastructure Discovery Job imports only the three supported lifecycle properties (OWNER, EXPIRY_DATE, 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.
To create a properties mapping file for the Import Lifecycle Properties option:
Create an XML file with the format shown in the following figure:
<?xml version="1.0"?>
<CustomPropertyMapping>
<VirtualEntityManagerList>
<VirtualEntityManager>
<name>_hostname_1_</name>
<type>VMware vCenter</type>
<property name="location" defaultValue="Boston" isMap="false" customProperty="" />
<property name="owner" defaultValue="BMC" isMap="false" customProperty="" />
<property name="expiry date" defaultValue="2009-08-21 14:07:20" isMap="false" customProperty="" />
</VirtualEntityManager>
<VirtualEntityManager>
<name>_hostname_2_</name>
<type>VMware vCenter</type>
<property name="location" defaultValue="" isMap="true" customProperty="VM location" />
<property name="owner" defaultValue="" isMap="true" customProperty="VM owner" />
<property name="expiry date" defaultValue="" isMap="true" customProperty="VM expiry date"/>
</VirtualEntityManager>
</VirtualEntityManagerList>
</CustomPropertyMapping>Where <hostname> is the fully qualified VMware vCenter server name or IP address.
- Do one of the following:
- Specify that the lifecycle property values be imported from the default values specified in the mapping file. The example shown for hostname_1 in the above example shows how you would enter the default values in the mapping file.
- Specify that the lifecycle property values be retrieved from the virtual entity manager (for example, the vCenter server) by mapping custom properties on the virtual entity manager to each of the supported properties. The example shown for hostname_2 in the aboce example shows how you would retrieve properties from the virtual entity manager using the isMap attribute.
- 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.
- Save the file in a depot folder so that it is accessible across Application Server instances.
- Create the Virtual Infrastructure Discovery Job as described in Creating-the-Virtual-Infrastructure-Discovery-Job, selecting the Import Lifecycle Properties option, and specifying the mapping file on the Select Lifecycle Properties Mapping panel.
Run the job.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 TrueSight Server Automation are also updated.
Extended server properties created or populated by the Job
The Virtual Infrastructure Discovery Job also creates or populates the following extended server properties that are used to populate the TrueSight Smart Reporting for Server Automation reports:
Property type | Property Name | Supported for |
---|---|---|
Virtualization class properties created | ||
CPU | VIRTUAL_ENTITY_NO_OF_CPUS* | VMware |
Memory | VIRTUAL_ENTITY_MEMORY_IN_MB* | VMware |
OS | VIRTUAL_ENTITY_GUEST_OS* | VMware |
Resource pool | VIRTUAL_ENTITY_RESOURCE_POOL* | VMware |
Tools installed | VMWARE_TOOLS_STATUS* | VMware |
Datastore | VMWARE_DATASTORE* | VMware |
Cluster | VMWARE_CLUSTER* | VMware |
Server properties populated | ||
IP Address | IP_ADDRESS | VMware |
FQ_HOST | FQ_HOST | VMware |
To create a Virtual Infrastructure Discovery Job
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.- Define the Virtual Infrastructure Discovery Job, as described in the following sections:
- Virtual-Infrastructure-Discovery-Job-General
- Virtual-Infrastructure-Discovery-Job-Targets
- Virtual Infrastructure Discovery Job - Destination Selection
- Virtual Infrastructure Discovery Job - Select Lifecycle Properties Mapping
- Virtual-Infrastructure-Discovery-Job-Notifications
- Virtual-Infrastructure-Discovery-Job-Schedules
- Virtual-Infrastructure-Discovery-Job-Properties
- Virtual-Infrastructure-Discovery-Job-Permission
- Click Finish after completing the last step of the wizard, or click OK to save your revisions to an existing job.
- To run the job, right-click the job and select Execute.
To schedule a Virtual Infrastructure Discovery Job
Using the Schedule panel, you can schedule a 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:
- Scheduling a job that executes immediately — To schedule a job that executes immediately, select Execute job now.
- Scheduling a job — The Schedule tab lets you schedule a job so it can run one time, recur daily, weekly, or monthly, or recur at some arbitrary interval.
While scheduling, you can set the time zone for the job. You can also set an execution priority level for the job. - Defining scheduled job notifications — The Scheduled Job Notifications tab lets you set up notifications that are generated when a scheduled job runs.
To review the results of the job
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.
Missing Servers
In the Job Results pane, expand the Missing Servers node.
This view shows servers that are present in TrueSight Server Automation inventory but not in virtual environment. This view shows the following information:
- Name — Shows the name of the server.
- Entity Type — Shows the type of virtual asset for the server. For example, VMware Virtual Machine, IBM LPAR, and so on.
- Entity Manager — Shows the server name of the host server, on which the virtual system is running.
- Status — Possible values are Still exist in BladeLogic or Decommissioned.
You can then select one or more servers from the table, right-click and select Decommission Server (s) to remove the servers from the TrueSight Server Automation inventory.
Unregistered Servers
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.
Unregistered Templates
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.
Where to go from here