Virtualization - addVMwareVCAMO

Virtualization - addVMwareVCAMO

Description :

This command enrolls an VMWare VC into the system. The VMware VC is the entity manager on which you can create VMware virtual guests. For information on creating VMware virtual guests, see the introductory chapter, Virtualization Concepts.

You can specify the following properties in the property list.

  • CUSTOMER: Optional customer name.
  • AGENTLESS_MANAGED_OBJECT_ICON_FILE*: Optional. This icon file appears in the extended properties panel in the BMC Server Automation GUI, and is normally consumed by other application code (for example, CSM). If you do not set this property, it is automatically set to VMware.ico.
  • AGENTLESS_MANAGED_OBJECT_PROXY_HOST* : Mandatory. Host name of the AMO proxy.
  • VIRTUALIZATION* : Optional. Sets the virtual entity type for the VMware VC you are creating. If you do not set this, it is automatically set to VMware VC.

Return type : String

Command Input :

Variable Name

Variable Type

Description

amoName

String

Host name of the AMO (in this case the VMware VC).

propertyList

String

Comma-separated property list.

Example

The following example creates a VMware VC and enrolls it in the system.

Script

# AMO_PROXY_HOST represents the Windows or Linux proxy server on which you have installed an RSCD agent.
AMO_PROXY_HOST=test_server

# VMWARE_VC_SERVER_NAME represents the VMware VC agentless device. This is an agentless managed object (AMO) that does NOT have an RSCD agent installed on it.
VMWARE_VC_SERVER_NAME=test_amo_vmware

# The connection details for the VMware VC.
VMWARE_VC_URL=test_vc_sdk_url
VMWARE_VC_USER=test_vc_user
VMWARE_VC_PASSWORD=test_vc_password
VMWARE_VC_ENCODED_PASSWORD=`blenc $VMWARE_VC_PASSWORD | grep ^BLencrypt: | cut -f2 -d: | tr -d '[:cntrl:]' `

# Add a new VMware VC agentless device. In the example below, the property CUSTOMER is not mandatory.
blcli Virtualization addVMwareVCAMO $VMWARE_VC_SERVER_NAME "AGENTLESS_MANAGED_OBJECT_PROXY_HOST*=Class://SystemObject/Server/$AMO_PROXY_HOST,CUSTOMER=BMC"

# As part of the creation process, the addVMwareVCAMO command creates a new Connection property set instance (in this example, Connection_$VMWARE_VC_SERVER_NAME).

# Update this newly created Connection property set instance
blcli PropertyInstance setOverriddenValue Class://SystemObject/Connection/Connection_$VMWARE_VC_SERVER_NAME CONNECTION_URL $VMWARE_VC_URL
blcli PropertyInstance setOverriddenValue Class://SystemObject/Connection/Connection_$VMWARE_VC_SERVER_NAME CONNECTION_USER $VMWARE_VC_USER
blcli PropertyInstance setOverriddenValue Class://SystemObject/Connection/Connection_$VMWARE_VC_SERVER_NAME CONNECTION_PASSWORD $VMWARE_VC_ENCODED_PASSWORD

# The steps below show an example of how to distribute a VMware VC custom object (CO) to the newly added VMware VC agentless device.
JOB_GROUP_ID=`blcli JobGroup groupNameToId /Distribute`

# Create a new Distribute CO Job in the given Job Group.
JOB_KEY=`blcli DistributeConfigurationObjectsJob createDistributeConfigurationObjectsJob "Distribute VMware VC CO" $JOB_GROUP_ID true`

# Add the VMware VC CO to the Distribute CO Job. Note that the VMware VC CO is represented by the constant BMC_VMware_VirtualInfrastructureManager. This always gets the most recent version of the VMware VC CO.
JOB_KEY=`blcli DistributeConfigurationObjectsJob addLatestGlobalConfigObjectVersionToJob $JOB_KEY BMC_VMware_VirtualInfrastructureManager`

# Add the VMware VC agentless device to the Distribute CO Job.
JOB_KEY=`blcli Job addTargetServer $JOB_KEY $VMWARE_VC_SERVER_NAME`
blcli Job execute $JOB_KEY

# To obtain the results of the Job Run, you can run the commands below after the job run is complete
JOB_RUN_ID=`blcli JobRun findLastRunKeyByJobKey $JOB_KEY`
JOB_RUN_RESULT=`blcli JobRun getJobRunHadErrorsById $JOB_RUN_ID`

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

Comments