vmcontrol.pl - Perform poweron, poweroff, suspend, reset, reboot, shutdown and standby operations on virtual machines.
vmcontrol.pl --operation <poweron|poweroff|suspend|reset|reboot|shutdown|standby> [options]
This command provides an interface for seven common provisioning operations on one or more virtual machines: powering on, powering off, resetting, rebooting, shutting down, suspending and setting into standby mode.
Operation to be performed. One of the following:
poweron – Power on one or more virtual machines.
poweroff – Power off one or more virtual machines.
suspend – Suspend one or more virtual machines.
reboot – Reboot one or more guests.
reset – Reset one or more virtual machines.
shutdown – Shutdown one or more guests.
standby – Set to standby mode one or more guests.
URL of the VirtualCenter Server's web service, for example, --url https://<ipaddress>:<port>/sdk/webService
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. IP address of the virtual machine. You cannot use ipaddress to power on a virtual machine because a powered off virtual machine does not have an active IP address.
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Name of the host for the virtual machine(s).
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. ipaddress of the virtual machine.
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. ipaddress of the virtual machine.
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. ipaddress of the virtual machine.
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
At least one criteria for selecting the virtual machines should be specified
Optional. Name of the virtual machine on which operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contain the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Optional. Name of the virtual machine on which the operation is to be performed.
Optional. Name of the virtual machine's guest operating system. For example, if you specify Windows, the operation is performed on all virtual machines running Windows
Optional. Name of the datacenter for the virtual machine(s). Operations will be performed on all the virtual machines under the given datacenter.
Optional. Name of the resource pool of the virtual machine(s). Operations will be performed on all the virtual machines under the given pool.
Optional. Name of the folder which contains the virtual machines
Optional. Name of the host which contains the virtual machines. Operation will be performed on all the vms under a host.
Power on a virtual machine
vmcontrol.pl --username root --password esxadmin --operation poweron --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --operation poweron --guestos Windows --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --vmname VM1 --guestos Windows --operation poweron --https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --operation poweron --pool poolName --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --url https://<ipaddress>:<port>/sdk/webService --operation poweron --folder folderName
vmcontrol.pl --username user --password mypassword --operation poweron --url https://<ipaddress>:<port>/sdk/webService --pool Zod
vmcontrol.pl --username user --password mypassword --operation poweron --url https://<ipaddress>:<port>/sdk/webService --datacenter Dracula
vmcontrol.pl --username user --password mypassword --operation poweron --url https://<ipaddress>:<port>/sdk/webService --host ABC.BCD.XXX.XXX
vmcontrol.pl --username user --password mypassword --operation poweron --url https://<ipaddress>:<port>/sdk/webService --folder folderName
Power off a virtual machine
vmcontrol.pl --username root --password esxadmin --operation poweroff --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --operation poweroff --guestos Windows --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --vmname VM1 --guestos Windows --operation poweroff --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --operation poweroff --pool poolName --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --operation poweroff --folder folderName --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --url https://<ipaddress>:<port>/sdk/webService --operation poweroff --ipaddress IP
vmcontrol.pl --username user --password mypassword --vmname VM2 --operation poweroff --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username root --password esxadmin --url https://<ipaddress>:<port>/sdk/webService --operation poweroff --host ABC.BCD.XXX.XXX
Reboot
vmcontrol.pl --username root --password esxadmin --operation reboot --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
Shutdown
vmcontrol.pl --username root --password esxadmin --operation shutdown --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
Reset
vmcontrol.pl --username root --password esxadmin --operation reset --vmname VM3
vmcontrol.pl --username user --password mypassword --vmname VM2 --operation reset --url https://<ipaddress>:<port>/sdk/webService
Standby
vmcontrol.pl --username root --password esxadmin --operation standby --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
Suspend
vmcontrol.pl --username root --password esxadmin --operation suspend --vmname VM3 --url https://<ipaddress>:<port>/sdk/webService
vmcontrol.pl --username user --password mypassword --vmname VM2 --operation suspend --url https://<ipaddress>:<port>/sdk/webService
Follow the same pattern for other operations: reset, shutdown, reboot, standby, suspend like in poweron and poweroff.
All operations supported on ESX 3.0.1
All operations supported on VirtualCenter 2.0.1