NAME

hostops.pl - Performs "add standalone", disconnect, reconnect, enter in maintenance mode, exit from the maintenance mode, reboot and shutdown host operations.


SYNOPSIS

    hostops.pl --operation <disconnect|reconnect|enter_maintenance|
                 exit_maintenance|reboot|shutdown|add_standalone> [options]


DESCRIPTION

This scripts allows users to perform basic operations on the host server. The supported operations are: add_standalone ,disconnect, reconnect, enter_maintenance,exit_maintenance, reboot, and shutdown.


OPTIONS

GENERAL OPTIONS

operation
 Required. Operation to be performed must be one of the following:
   I<shutdown> (shutdown the host),
   I<reboot> (reboot the host ),
   I<enter_maintenance> (set host into maintenance mode),
   I<exit_maintenance> (exit the maintenance mode),
   I<disconnect> (disconnect the host ),
   I<reconnect> (reconnect the host),
   I<add_standalone> (add new host),

ADD STANDALONE OPTIONS

target_host

Required. Domain name or ipaddress of the target host

target_username

Required. Username of the host to be added.

target_password

Required. Password of the host to be added.

DISCONNECT HOST OPTIONS

target_host

Required. Domain name or ipaddress of the target host

RECONNECT HOST OPTIONS

target_host

Required. Domain name or ipaddress of the target host

ENTER MAINTENANCE MODE OPTIONS

target_host

Required. Domain name or ipaddress of the target host

suspend

Optional. Flag to specify whether or not to suspend to virtual machine

quiet

Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations.

EXIT MAINTENANCE MODE OPTIONS

target_host

Required. Domain name or ipaddress of the target host

SHUTDOWN OPTIONS

target_host

Required. Domain name or ipaddress of the target host

suspend

Optional. Flag to specify whether or not to suspend to virtual machine

quiet

Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations.

REBOOT OPTIONS

target_host

Required. Domain name or ipaddress of the target host

suspend

Optional. Flag to specify whether or not to suspend to virtual machine. Default: 0

quiet

Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations. Default: 1


EXAMPLES

Shutdown a Host with progress messages. i.e "quiet = 0"

 hostops.pl --username root --password esxadmin --operation shutdown
           --url https://<ipaddress>:<port>/sdk/webService
           --target_host targetABC --suspend 1 --quiet 0

Reboot a Host with progress messages. i.e "quiet = 0"

 hostops.pl --username root --password esxadmin --operation reboot
           --url https://<ipaddress>:<port>/sdk/webService
            --target_host targetABC --suspend 1 --quiet 0

Enter maintenance mode with no progress messages. i.e "quiet = 1":

 hostops.pl --username root --password esxadmin --operation enter_maintenance
           --url https://<ipaddress>:<port>/sdk/webService
           --target_host targetABC --suspend 1 --quiet 1

Exit maintenance mode

 hostops.pl --username root --password esxadmin --operation exit_maintenance
           --url https://<ipaddress>:<port>/sdk/webService
           --target_host targetABC

Reconnect a host:

 hostops.pl --url https://<ipaddress>:<port>/sdk/webService --username user
           --password mypassword --target_host targetABC
           --operation reconnect

Disconnect a host:

 hostops.pl --url https://<ipaddress>:<port>/sdk/webService --username user
           --password mypassword --target_host targetABC
           --operation disconnect

Add Standalone host:

 hostops.pl --url https://<ipaddress>:<port>/sdk/webService --username user
           --password mypassword --target_host targetABC
           --target_username root --target_password esxadmin
           --operation add_standalone


SUPPORTED PLATFORMS

All operations supported via Virtual Center Server 2.0.1.

enter_maintenance, exit_maintenance, shutdown , reboot works with ESX Sever 3.0.1