NAME

vmregister.pl - Registers or unregisters a virtual machine.


SYNOPSIS

 vmregister.pl  --operation <register/unregister> [options]


DESCRIPTION

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.


OPTIONS

operation

Required. Operation to be performed. Must be one of the following:

register – Register a virtual machine.

unregister – Unregister an already registered virtual machine.

REGISTER OPTIONS

vmname

Required. Name of the virtual machine to register.

pool

Required. Resource Pool to register virtual machine.

hostname

Required. Host to register the virtual machine.

vmxpath

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''.

datacenter

Required. Name of the datacenter.

UNREGISTER OPTIONS

vmname

Required. Name of the virtual machine to unregister.


EXAMPLES

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>


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0 or later.

All operations work with VMware ESX 3.0 or later.