Virtualization - listVirtualGuestByServerIDandPowerState

Virtualization - listVirtualGuestByServerIDandPowerState

Description :

This command lists all the virtual guests that reside on a specified Virtual Center server, and that have a specified power state. The Virtual Center server is identified by its server ID.

Set PowerStatus to one of the valid PowerStatus values for the platform and the locale:

  • VMware - Started, Stopped, Suspended
  • Citrix - Halted, Paused, Running, Suspended
  • Solaris - running, installed, configured
  • IBM - Running, Not Activated, Open Firmware
  • RHEV - Stopped, Running, Suspended
  • HyperV - Stopped, Running, Suspended, Saved, Failed

Return type : String

Command Input :

Variable Name

Variable Type

Description

ServerId

Integer

The server ID of the Virtual Center server. This server must be managed by BMC Server Automation.

PowerStatus

String

The power status of the virtual guests you want to list. Can be either Started or Stopped.

Example

The following example lists all started virtual guests on a Virtual Center server.

Script

# Get the ID of the server by server name 

SERVER1_NAME="server1" 

SERVER1_ID=`blcli Server getServerIdByName $SERVER1_NAME` 

# List all the started virtual guests on this server 

blcli Virtualization listVirtualGuestByServerIDandPowerState $SERVER1_ID Started 

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

Comments