vmregister.pl - registers/unregisters virtual machine
vmregister.pl --url <web service URL> --username <server login name> --password <server login password> --operation <register/unregister> --vmname <virtual machine name> [--hostname <name of the host>] [--vmxpath <Path of the vmx location>] [--respool <resource pool>] [--datacenter <datacenter name>]
This VI Perl command-line utility allows users to register a VM to a specified host and resource pool. Operations are register and unregister.
Required. Operation to be performed. Must be one of the following: register (register a virtual machine to a specified host and resource pool) unregister (unregister an already registered virtual machine).
Required.For register, name of the virtual machine to register and unregister operation, the name of the virtual machine to unregister.
Required. register (register a virtual machine to a specified host and resource pool)
Required.For register, name of the virtual machine to register.
Required. Resource Pool to add virtual machine to.
Required. Name of the Data Center.
Required. ESX host name to register the virtual machine.
Required. Path of the vmx location.
Required. unregister (unregister an already registered virtual machine).
Required.For unregister operation, the name of the virtual machine to unregister.
Registering a virtual machine
vmregister.pl --url https://192.168.111.52/sdk/vimService --username administrator
--password mypassword --operation register --vmname FC5
--hostname MYESX.InterraIT.info --vmxpath [lazy_100gb]FC/FC.vmx
--respool PoolABC --datacenter Datacenter2
Unregistering a virtual machine
vmregister.pl --url https://192.168.111.52/sdk/vimService --username administrator
--password mypassword --operation unregister --vmname FC5
--hostname MYESX.InterraIT.info
All operations work with VMware VirtualCenter 2.0 or later.
All operations work with VMware ESX Server 3.0 or later.