NAME

vmregister.pl - registers and unregisters virtual machines


SYNOPSIS

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


DESCRIPTION

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.


OPTIONS

GENERAL OPTIONS

operation
 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).

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 Server 3.0 or later.