Home > Blogs > VMware vSphere Blog > Author Archives: William Lam
William Lam

About William Lam

William Lam works as a Staff Engineer in VMware R&D and focuses Automation, Integration and Operations. William also runs a personal blog at www.virtuallyghetto.com. Previous to VMware, he was a Systems Engineer managing large vSphere installations and UNIX/Linux systems.

How To Import An OVA Into vCloud Director?

For those of you who have tried to import an OVA directly into vCloud Director have probably noticed that this is not supported and only an OVF file can be uploaded. However, it is possible to upload an OVA directly into vCloud Director, but it does require the use of another tool called the ovftool which is multi-platform command-line utility for OVF/OVA management. This article was motivated by a recent internal discussion and I thought I share this little tidbit in case it was not very well known.

Continue reading

New Component-Based Logging For Hostd In ESXi 5.1 Update 1

vSphere 5.1 Update 1 was just released last week and one of the things that caught my eye while reading through the release notes for ESXi 5.1 Update 1 was a new enhancement to hostd logging:

  • Component-based logging and advanced configurations added to hostd log level
    • To avoid difficulties in getting appropriate logs during an issue, this release introduces component-based logging by dividing the loggers into different groups and prefixing them. Also, new advanced configuration allows you to change hostd log’s log level without restarting.

Though this enhancement is targeted for troubleshooting purposes and will most likely be used when working with GSS. I thought I would walk you through on how this feature works as there were not much detail in the release notes.

Continue reading

vSphere 5.1 Update 1 Released!

VMware has just released the much anticipated Update 1 patch for vSphere 5.1 which includes several updates and bug fixes for both ESXi and vCenter Server 5.1. I highly encourage everyone to review the release notes for the complete list of resolved issues. While going through the ESXi 5.1 Update 1 release notes myself, I noticed a few resolved bugs that I had been following and thought I would highlight a few of them:

  • Reinstallation of ESXi 5.1 does not remove the Datastore label of the local VMFS of an earlier installation
    • Re-installation of ESXi 5.1 with an existing local VMFS volume retains the Datastore label even after the user chooses the overwrite datastore option to overwrite the VMFS volume.
  • resxtop fails when upgraded from vSphere 5.0 to vSphere 5.1
    • In vSphere 5.1, SSL certification checks are turned ON. This might cause resxtop to fail in connecting to hosts and displays an exception message similar the following: HTTPS_CA_FILE or HTTPS_CA_DIR not set. (More details about this issue can be found in this blog article)
  • Using the invoke-vmscript command displays an error
    • When you use the invoke-vmscript powercli command scripts on the virtual machine, the script fails with the following error message:

One interesting thing that caught my eye while going through the release note is the following:

  • Component-based logging and advanced configurations added to hostd log level
    • To avoid difficulties in getting appropriate logs during an issue, this release introduces component-based logging by dividing the loggers into different groups and prefixing them. Also, new advanced configuration allows you to change hostd log's log level without restarting.

It looks like you now have the ability to configure granular log levels for various components within hostd which can better assist during troubleshooting and log collection. I will discuss how this works in more detail in another blog article.

There are many more resolved issues and you can check out the rest of the fixes in the ESXi 5.1 release notes.

Get notification of new blog postings and more by following lamw on Twitter:  @lamw

Understanding ESXi Patches - Size & Patch Bundles

Patch management for ESXi is very different compared to traditional operating system patches, where incremental updates are made to the base operating system and thus increasing the disk footprint for each patch update. For the ESXi hypervisor, when a patch is applied, the entire ESXi image also known as an Image Profile is replaced. This means that each time you patch or upgrade your ESXi host, you are not adding on top of the original installation size.

Continue reading

Which Virtual Hardware Versions (VM Compatability) Are Supported In vSphere?

Similar to my previous article Which Guest OSes Are Supported In vSphere? Using the vSphere API and the Environmental Browser, you can also query for the list of supported Virtual Machine's virtual hardware versions also known as Virtual Machine Compatibility. This also comes in handy when building a provisioning system or script and you will be able to ask the vSphere platform what virtual hardware version is supported prior to creating your Virtual Machine shell. To do so, you will need to use the QueryConfigOptionDescriptor() method which returns back an array of VirtualMachineConfigOptionDescriptor that contains information about the virtual hardware version and whether the host can support a particular version and whether a version can be upgraded or not.

Disclaimer: These script are provided for informational/educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

To demonstrate the QueryConfigOptionDescriptor method, I have created a simple vSphere SDK for Perl script called getSupportedVirtualHardwareVersion.pl which lists all the supported virtual hardware versions given a vSphere Cluster as input.

Here is the syntax for the script:

./getSupportedVirtualHardwareVersion.pl --server [VCENTER] --username [USERNAME] --cluster [CLUSTER-NAME]

Here is a screenshot of the output from the script:

Get notification of new blog postings and more by following lamw on Twitter:  @lamw

Minimum vSphere Privileges To Query VIBs On An ESXi Host

This was a recent question that was asked internally about the minimum privileges required to query VIBs on an ESXi host. The request was for a custom script that was developed for compliance check and the customer was looking to create a custom vSphere role to minimize the privileges needed to perform the task. Since I did not know the answer, it was off to the lab for some testing. Through the process of elimination, it turns out the only privilege that is required for querying VIBs on an ESXi host is Global.Settings.

In the example above, I created a custom vCenter Server Role called VIBQuery and enabled the Global.Settings privilege and assigned the role to a user. The custom role can be created on both a vCenter Server as well as directly on an ESXi host. By using vCenter Server, one can benefit from centralize management of user access to all ESXi hosts in the environment.

To confirm that our user assigned to the new role can query VIBs on an ESXi host, we will  run the following ESXCLI command:

esxcli --server [VC-SERVER] --vihost [ESXi-SERVER] --username [USER] software vib list

We can also confirm that we can do the same directly on the ESXi host by running the following ESXCLI command:

esxcli --server [ESXi-SERVER] --username [USER] software vib list

When granting access to your vSphere infrastructure, you should always use good security practices by leveraging RBAC model (Role-Base Access Control) and restrict the amount permission a user has access to.

UPDATE: In addition to using ESXCLI, there are two additional options to query installed VIBs on an ESXi host as noted by the comment below by Mike.

Get notification of new blog postings and more by following lamw on Twitter:  @lamw

How To Restart The Custom Attributes To Tags Migration Process

One of the coolest feature in my opinion is Tagging in the new vSphere Web Client. Unlike Custom Attributes which was limited to an ESXi host and Virtual Machine object, the new Tagging capability allows you to create custom labels and metadata on ANY vSphere inventory object. In addition, you can have multiple tags per object and you can search based on tags to help you quickly find what you are looking and making this feature even more powerful. Just like with anything new, it takes time to get used to. To help you use the new Tagging feature, there is a built in Custom Attributes to Tags migration tool in the vSphere Web Client as Tagging will be the future going forward.

Continue reading

VMware Upgrade & Update Operations Survey

If you have a few minutes to spare, can you please fill out this short survey for VMware Upgrade and Update Operations. We are interested in how you currently manage the lifecycle (upgrades & updates) of your VMware infrastructure. Your feedback will help us improve our products and better support our customers.

VMware Upgrade and Update Operations Survey

Thank you for your time

Configure Virtual Machine Disk Shares & IOP Limits Using vCO Workflow

Last week I received a question from a customer asking about configuring shares for a Virtual Machine’s virtual disk (VMDK) as well as setting the IOP limits for a virtual disk. An old script that I had written was shared with the customer to provide an example but they were interested in the functionality being provided through a vCenter Orchestrator (vCO) workflow instead.

Continue reading

Which Guest OSes Are Supported In vCloud Director?

Similar to my previous blog post for vSphere, you can now programmatically retrieve the list of supported guest OSes for vCloud Director 5.1 if you are looking to build your own custom provisioning solution or portal. You no longer have to create a static list and you can now dynamically generate the list of supported guest OSes, their supported configurations and capabilities as seen in the vCloud Director UI. In the vCloud 5.1 API you can view the list of supported guestOSes by performing a GET operation on the following URL:


Here is an example output of what you would see:

        <Name>Microsoft Windows</Name>
            <Name>Microsoft Windows Server 2012 (64-bit)</Name>

For more details on this particular vCloud API, please refer to the vCloud API Reference guide found here.

Get notification of new blog postings and more by following lamw on Twitter:  @lamw