vmregister.pl - registers and unregisters virtual machines
vmregister.pl --operation <register/unregister> [options]
This VI Perl command-line utility allows users to register/unregister a virtual machines. For register operation, the virtual machine is associated with the resource pool and the host provided.
Required. Operation to be performed. Must be one of the following: I<register> (register a virtual machine) I<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>
All operations work with VMware VirtualCenter 2.0 or later.
All operations work with VMware ESX Server 3.0 or later.