You
can register your local vSphere Client with the vCenter Server instance using
an automated method that applies only to the vCenter Server Appliance.
The SDK provides a
registration script that you can run on your development machine. The script
connects to the
vCenter Server
Appliance and configures your local Web browser application to
interact with it.
Prerequisites
- Verify that you have
access to the
vCenter Server
Appliance.
- Verify that SSH is
enabled on the
vCenter Server
Appliance.
Procedure
-
Set the environment
variable
VMWARE_CFG_DIR
to specify the directory where the
script will place the configuration files it creates.
On a Windows
development machine, set the variable to
C:\Program Data\VMware\vCenter Server\cfg
.
On a MacOS development
machine, set the variable to
/var/lib/vmware/vsphere-client/
.
-
In a command
window, navigate to the
vCenter
registration scripts folder under
tools in your SDK
installation.
-
Run the registration
script with the following parameters:
- -vcip
vc
server ip is the IPv4 address of the vCenter Server
instance where you want to register your local vSphere Client.
- -u
SSH
username is the user account to authenticate the SSH
connection with the vCenter Server instance.
- -pw
SSH
password is the password for the SSH username.
- -p
vc
server ssh port is the port on which the vCenter Server
instance serves the SSH connection. The parameter is optional. The default
value is
22
.
- On a Windows
development machine, the script is
server-registration.bat.
- On a MacOS
development machine, the script is
server-registration.sh.
./server-registration.sh -vcip
192.0.2.1 -u myUser -pw myPassword -p 22
Note: To view the full
list of parameters for the script, use the
--help option.
-
Start the local
vSphere Client
by running the startup script located in
your_SDK_folder/html-client-sdk/vsphere-ui/server/bin.
- On a Windows
development machine, the script is
startup.bat.
- On a MacOS
development machine, the script is
startup.sh.
Note: You might need to
make the script executable:
chmod +x startup.sh
-
Open a Web browser and
log into your local
vSphere Client
at
https://localhost:9443/ui.
Your local
vSphere Client
connects to the
vCenter Server
instance and displays the vSphere inventory.
What to do next
You can deploy your custom
plug-ins to the local
vSphere Client
and verify whether the plug-ins function properly in your development
environment before deploying them on the remote Web browser applications.