Updates included in Service Pack 3


BMC BladeLogic Server Automation version 8.1 SP3 provides the updates described in the following sections:

Support for new platforms

BMC BladeLogic Server Automation now supports SUSE Linux Enterprise Server 11 for IBM zSeries and Red Hat Enterprise Linux 6 for IBM zSeries platforms.

BLCLI command updates

BMC BladeLogic Server Automation version 8.1 SP3 provides the following BLCLI command updates:

Virtualization commands use different delimiters

Many commands in the Virtualization namespace use a virtual guest key or a virtual entity key to identify elements such as virtual machines, templates, clusters, and hosts.

In earlier releases, the virtual guest key and virtual entity key had the following comma-delimited format:


<ServerId>,<EntityTypeName>,<EntityIdentifier>

Starting with BMC BladeLogic Server Automation 8.1 SP2 Patch 3, the virtual guest key and virtual entity key have a space-delimited format:


<ServerId> <EntityTypeName> <EntityIdentifier>

The following commands produce virtual guest keys or virtual entity keys as output:

  • getVirtualGuestKeyByServerName
  • listVirtualEntitiesByEntityManagerServerIdAndEntityType
  • listVirtualEntitiesByEntityManagerServerNameAndEntityType

     


    SERVER1_NAME="server1"
    blcli Virtualization
    listVirtualEntitiesByEntityManagerServerNameAndEntityType
    $SERVER1_NAME VMwareVirtualMachine true
    Name::Entity Key
    VM1::1 VMwareVirtualMachine vm-179
    VM2::1 VMwareVirtualMachine vm-25

The following commands take virtual guest keys or virtual entity keys as input:

  • changeVirtualGuestPowerStatus
  • getVirtualGuestPowerStatus
  • deleteVirtualGuest
  • createVirtualGuest
     This command takes a Virtual Guest Job (VGJ) XML file as input. This XML file includes a destination statement, which now uses spaces as delimiters.

     


    <VirtualGuestDestination>1 VMWareCluster domainc192</VirtualGuestDestination>
  • createVirtualGuestPackage
     This command takes a Virtual Guest Package (VGP) XML file as input. This XML file includes various elements that use virtual entity keys, which now use spaces as delimiters.

     


    <VMOrTemplateId>1 VMWareVirtualMachine vm-13434</VMOrTemplateId>

Impact on scripting

If you use a virtual guest key or virtual entity key in a script, you must enclose it within
 double quotation marks to accommodate the spaces.

The following example shows how to get a virtual guest's power status. Note the use of double quotation marks around $VIRT_ENTITY_KEY.

Example

 


VIRTUAL_GUEST1_NAME="vm-w23-mar111"
VIRT_ENTITY_KEY=`blcli Virtualization getVirtualGuestKeyByServerName&nbsp;$VIRTUAL_GUEST1_NAME`
blcli Virtualization getVirtualGuestPowerStatus "$VIRT_ENTITY_KEY"

Impact on XML files

To create a virtual machine, you must create the following XML files:

  • VGP XML file
  • VGJ XML file

Both of these XML files contain virtual entity keys. Ensure that you use spaces as delimiters in the keys in the XML files.

VGP example

 


<VMOrTemplateId>1 VMWareVirtualMachine vm\-13434</VMOrTemplateId>

 

VGJ example

 


<VirtualGuestDestination>1 VMWareCluster domainc192</VirtualGuestDestination>

For detailed information about creating and using the VGP and VGJ files, see the Virtualization Concepts section of the BLCLI Help. The section refers to the now deprecated comma delimiters, but is otherwise correct.

New synchronous undoDeploy command

BMC BladeLogic Server Automation version 8.1 SP2 Patch 3 included a new synchronous command for undoing the most recent run of a Deploy Job. The new command is:
DeployJob : undoDeployByDBKeyAndRunId

This command creates an undo job and waits until the undo job finishes before returning a run key. You can use the run key to view the real status of the undo job by using commands in the JobRun namespace.

Command summary:

  • Namespace: DeployJob
  • Command name: undoDeployByDBKeyAndRunId
  • Input arguments:
    • jobKey = DBKey of the job that you want to undo
    • jobRunID = ID of the specific job run to undo. If (as shown in the following example) you are using the DeployJobRun:findLastRunIdByJobKey command to get the job run ID, this is the latest run associated with the specific version of the job that the jobKey represents.
  • Returns: Run key of the undo job
Example

 


\# Obtain the DBKey of the Deploy Job you want to undo.
\# Obtaining the JOB_KEY in this way provides you with the latest version of the job.
JOB_FOLDER="/DeployJobs"
JOB_NAME="Deploy to all Servers"
JOB_KEY=`blcli DeployJob getDBKeyByGroupAndName "$JOB_FOLDER"  "$JOB_NAME"`

\# Get the ID of the last run of the Deploy Job you want to undo
JOB_RUN_ID=`blcli DeployJobRun findLastRunIdByJobKey "$JOB_KEY"`


\# Undo the last run of the Deploy Job
UNDO_RUN_KEY=`blcli DeployJob undoDeployByDBKeyAndRunId $JOB_KEY $JOB_RUN_ID`

blcli JobRun getJobRunHadErrors $UNDO_RUN_KEY
\# This command returns true if errors occurred, and false otherwise. You can also use
additional JobRun commands to get more status information.

New BLCLI Utility exportDeployRunStatusbyGroup command

BMC BladeLogic Server Automation version 8.1 SP3 includes a BLCLI command that exports the status of the latest runs of Deploy Jobs in a group to a file. The new command is:
Utility : exportDeployRunStatusByGroup

Command summary:

  • Namespace: Utility
  • Command name: exportDeployRunStatusByGroup
  • Input argument:
    • jobGroupName = String containing the fully qualified domain name (FQDN) of the Job group whose
       Deploy Jobs information needs to be captured (for example, /testGroup)
  • Output argument:
    • exportFileName = String containing the fully qualified path name to a CSV file that will hold the status of the latest runs of Deploy Jobs in the specified Job group (for example, C:/tmp/exportResults.csv)
       The structure of each row in the CSV file is:
       <jobID, server name, job run start time, job run end time, simulate status, stage status, commit status>
Example

 


blcli Utility exportDeployRunStatusByGroup /testGroup "c:/tmp/exportResults.csv
\#This command exports the status of the latest runs of the
 Deploy Jobs in the /testGroup folder to the C:/tmp/exportResults.csv file. 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*