vmregister.pl - Registers or unregisters a virtual machine.
vmregister.pl --operation <register/unregister> [options]
This command allows users to perform registration operations on a virtual machine. You can register a virtual machine to a host or unregister it from a host.
Required. Operation to be performed. Must be one of the following:
register – Register a virtual machine.
unregister – Unregister an already registered virtual machine.
Required. Name of the virtual machine to register.
Required. Resource Pool to register virtual machine.
Required. Host to register the virtual machine.
Required. Path of the vmx location of the virtual machine. There should not be any space between the datastore and the virtual machine name. For e.g if the actual path of the virtual machine ABC is ``[datastore] ABC/ABC.vmx''. The vmxpath path should be ``[datastore]ABC/ABC.vmx''.
Required. Name of the datacenter.
Required. Name of the virtual machine to unregister.
Registering a virtual machine
vmregister.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --operation register --vmname FC5 --hostname <host_name> --vmxpath [lazy_100gb]FC/FC.vmx --pool PoolABC
Unregistering a virtual machine
vmregister.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --operation unregister --vmname FC5 --hostname <host_name>