Virtualization - changeVirtualGuestPowerStatus

Virtualization - changeVirtualGuestPowerStatus

Description :

This command changes the power status of a virtual guest.

To get the virtualEntityKey, use the getVirtualGuestKeyByServerName command. The virtualEntityKey contains spaces. Therefore, you need to enclose this key in double quotes each time you use it.

Set powerStatus to one of the following values:

  • VMware - Start, Suspend, Stop, GuestShutdown, GuestReboot, Reset
  • Citrix - Start, GuestReboot, Reboot, Suspend, Resume, Pause, Unpause, GuestShutdown, Stop
  • Solaris - boot, reboot, halt
  • IBM - Start, Restart, Stop, DelayedShutdown, DumpRestart
  • RHEV - Start, GuestShutdown, Stop, Suspend
  • HyperV - Start, GuestShutdown, Stop, Suspend

Return type : String

Command Input :

Variable Name

Variable Type

Description

virtualEntityKey

String

Virtual guest key for the guest you want to work with.

powerStatus

String

The power status to which you want to change this virtual guest.

Example

The following example shows how to change a virtual guest's power status to Stop. Note the use of double quotes around $VIRT_ENTITY_KEY.

Script

VIRTUAL_GUEST1_NAME="vm-w23-mar111" 

VIRT_ENTITY_KEY=`blcli Virtualization  getVirtualGuestKeyByServerName $VIRTUAL_GUEST1_NAME` 

blcli Virtualization changeVirtualGuestPowerStatus "$VIRT_ENTITY_KEY" Stop 

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

Comments