hostops.pl - Performs "add standalone", disconnect, reconnect, enter in maintenance mode, exit from the maintenance mode, reboot and shutdown host operations.
hostops.pl --operation <disconnect|reconnect|enter_maintenance|
exit_maintenance|reboot|shutdown|add_standalone> [options]
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.
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),
Required. Domain name or ipaddress of the target host
Required. Username of the host to be added.
Required. Password of the host to be added.
Required. Domain name or ipaddress of the target host
Required. Domain name or ipaddress of the target host
Required. Domain name or ipaddress of the target host
Optional. Flag to specify whether or not to suspend to virtual machine
Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations.
Required. Domain name or ipaddress of the target host
Required. Domain name or ipaddress of the target host
Optional. Flag to specify whether or not to suspend to virtual machine
Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations.
Required. Domain name or ipaddress of the target host
Optional. Flag to specify whether or not to suspend to virtual machine. Default: 0
Optional. Flag to specify whether or not to provide progress messages as the virtual machines are suspended for some operations. Default: 1
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
All operations supported via Virtual Center Server 2.0.1.
enter_maintenance, exit_maintenance, shutdown , reboot works with ESX Sever 3.0.1