WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple

vCloud Director Report 1.0.0

01.16.2012 by William Lam // 4 Comments

Over the winter holiday I started to explore the vCloud API and one of our SDKs, vCloud SDK for PHP. VMware provides two additional vCloud SDKs: Java and .NET. I had used Java in college and I wanted to stay away from anything Windows related, so I thought I give PHP a try and it was the closest thing to Perl πŸ˜‰

Since this was my first time using the vCloud API and SDK, I thought what better way to learn than to create a script similar to my vSphere Health Check Report for vCloud Director? This not only helped me to understand the objects in vCloud Director from an API perspective but no such reporting tool exists today for administrators and end users of vCloud Director.

Here is an example of what a report could look like: vCloudDirectorReport.html

To use the script, you will need the following per-requiste:

  • Install vCloud SDK for PHP, take a look at article on how to get setup.
  • Running vCloud Director 1.5 (Script uses the new API Query Service)
  • Download both config.php which includes configuration parameters for the script and vmwarevCloudDirectorReport.php script.

To get a list of the available commandline options, just type "php vmwarevCloudDirectorReport.php":

php vmwarevCloudDirectorReport.php

Error: missing required parameters
Usage:

[Script]
VMware vCloud Director Report v1.0.0

[Description]
This script provides a detail report of your VMware vCloud Director system

[Usage]
# php vCloudReport.php -s -u -p [Options]

-s|--server [req] IP or hostname of the vCloud Director.
-u|--user [req] User name in the form user@organization for the vCloud Director instance.
-p|--pswd [req] Password for user.
-t|--type [req] Type of report [system|orgadmin|orguser].

[Options]
-r|--report [opt*] Name of html output file (e.g. vCloudReport.html).

[Examples]
# php query.php -s 127.0.0.1 -u admin@system -p password -t system
# php query.php -s 127.0.0.1 -u admin@coke -p password -t orgadmin
# php query.php -s 127.0.0.1 -u admin@pepsi -p password -t orguser

The config.php can be used to store the vCloud URL and credentials or you may specify it via the commandline using -s, -u and -p arguments. In addition, you will also need to specify -t flag which is based on the type of user you are logging into whether that is system (administrator), orgadmin or orguser.

The report can easily be customized by toggling parameters inΒ config.php which includes the following parameters:

Depending on the report type, certain flags will be applicable. By default, all flags are enabled but you my disable ones you do not wish to see.

Here is an example of the script logging into vCloud Director instance with the administrator account in the System organization:

This is the first iteration of the script, I plan on adding additional information and if you have any feedback/suggestions, please leave a comment below.

Categories // Uncategorized Tags // php, sdk, vcd, vcloud director

Using a VNC Client to Connect to VMs in ESXi 5

01.09.2012 by William Lam // 10 Comments

The ability to connect to a virtual machine using a VNC client has been available since the early days of VMware GSX as described by this VMware KB article. The required .vmx configuration can also be applied to virtual machines running on ESX(i), but is not officially supported by VMware. With ESXi 5, this continues to work but there is one additional caveat users should to be aware of, which is the new firewall that has been introduced in ESXi 5.

In addition to the three .vmx configurations:

  • RemoteDisplay.vnc.enabled = [true|false]
  • RemoteDisplay.vnc.port = [port #]
  • RemoteDisplay.vnc.password = [optional]

Users need to also enable the ports selected for each virtual machine on the ESXi firewall. Here is an example of a firewall rule that needs to be created:

Take a look at this blog post for details on configuring custom firewall rules including persisting the custom rules upon a system reboot.

Here are a few screenshots of configuring the .vmx configurations and using a VNC client to connect to the powered on virtual machine.

Only the first two .vmx configurations are required, if you do not set a password, anyone can connect to the virtual machine as long as they know the hostname/IP Address of your ESX(i) host and port.

To connect to a specific virtual machine, you will specify the hostname/IP Address of the ESX(i) host and port for the given virtual machine. If you set a password, you will need to also provide that before you can connect.

Please be aware of the limitations and security concerns of using VNC. VMware Remote Console or standard RDP/SSH should still be considered for virtual machine remote access.

Categories // Uncategorized Tags // ESXi 5.0, firewall, remote console, vnc

The Winner Is ...

12.30.2011 by William Lam // 2 Comments

There was a total of 14 comments on the Ghetto Reflections 2011 blog post and ...

Congratulations to to Comment #3 (NiTRo) Apparently blogger does not allow me to retrieve your email address πŸ™ If you are reading this NiTRo, please provide me with your shipping address to the email address found here.

Thanks for all the comments and thank you again to all of our readers for your support! Have a happy and safe New Years! See you in 2012

Categories // Uncategorized Tags // ghetto

  • « Previous Page
  • 1
  • …
  • 503
  • 504
  • 505
  • 506
  • 507
  • …
  • 565
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • PowerCLI remediation script for running NSX Edge on AMD Ryzen for VCF 9.0 06/20/2025
  • Failed to locate kickstart on Nested ESXi VM CD-ROM in VCF 9.0 06/20/2025
  • NVMe Tiering with Nested Virtualization in VCF 9.0 06/20/2025
  • VCF 9.0 Installer workaround for ESXi hosts with different vendor 06/19/2025
  • NVMe Tiering with AMD Ryzen CPU workaround for VCF 9.0 06/19/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025