Automated Registration
of Local vSphere Client
You
can register your local vSphere Client with the vCenter Server instance using
an automated method that applies only to the vCenter Server Appliance.
- Verify that you have access to thevCenter Server Appliance.
- Verify that SSH is enabled on thevCenter Server Appliance.
- Verify that the bash shell is enabled on thevCenter Server Appliance.SeeToggling the vCenter Server Appliance default shell, https://kb.vmware.com/s/article/2100508.
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.
- Set the environment variableVMWARE_CFG_DIRto specify the directory where the script will place the configuration files it creates.On a Windows development machine, set the variable toC:\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 thevCenter registration scriptsfolder undertoolsin your SDK installation.
- Run the registration script with the following parameters:
- -vcipis the IPv4 address of the vCenter Server instance where you want to register your local vSphere Client.vc server ip
- -uis the user account to authenticate the SSH connection with the vCenter Server instance.SSH username
- -pwis the password for the SSH username.SSH password
- -pis the port on which the vCenter Server instance serves the SSH connection. The parameter is optional. The default value isvc server ssh port22.
- On a Windows development machine, the script isserver-registration.bat.
- On a MacOS development machine, the script isserver-registration.sh.
./server-registration.sh -vcip 192.0.2.1 -u myUser -pw myPassword -p 22To view the full list of parameters for the script, use the--helpoption. - Start the localvSphere Clientby running the startup script located in.your_SDK_folder/html-client-sdk/vsphere-ui/server/bin
- On a Windows development machine, the script isstartup.bat.
- On a MacOS development machine, the script isstartup.sh.
You might need to make the script executable:chmod +x startup.sh - Open a Web browser and log into your localvSphere Clientathttps://localhost:9443/ui.Your localvSphere Clientconnects to thevCenter Serverinstance and displays the vSphere inventory.
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.