Home > Blogs > VMware vSphere Blog > Category Archives: Automation

Category Archives: Automation

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

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

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

New Whitepaper published–vCloud Disaster Infrastructure Resiliency Case Study

A new whitepaper has just been published on the VMware website, this paper was written by Aidan Dalgleish, Consulting Architect who’s personal blog can be viewed here and Alan Renouf, Sr Technical Marketing Architect.

Overview

VMware vCloud Director® enables enterprise organizations to build secure private clouds that dramatically increase datacenter efficiency and business agility. Coupled with VMware vSphere®, vCloud Director delivers cloud computing for existing datacenters by pooling vSphere virtual resources and delivering them to users as catalog-based services. It helps users build agile infrastructure-as-a-service (IaaS) cloud environments that greatly accelerate the time to market for applications and the responsiveness of IT organizations.

Resiliency is a key aspect of any infrastructure, it is even more important in IaaS solutions. This technical paper was developed to provide additional insight and information regarding the use of VMware vSphere PowerCLI™ to automate the recovery of a vCloud Director–based infrastructure. In particular, it focuses on automation of the recovery steps for vCloud Director 1.5–managed VMware vSphere vApp™ workloads. The recovery of management components can be achieved using VMware® vCenter™ Site Recovery Manager™ and will not be discussed. It is already available in the original VMware vCloud Director Infrastructure Resiliency Case Study.

vSphere PowerCLI is a powerful command-line tool that enables users to automate all aspects of vSphere management, including network, storage, virtual machine, guest operating system (OS) and more. Included since the release of version 5.0.1, vSphere PowerCLI introduced support for vCloud Director. vSphere PowerCLI is distributed as a Microsoft Windows PowerShell snap-in and includes more than 300 PowerShell cmdlets, along with documentation and examples.

This technical paper discusses the use of PowerShell and PowerCLI to automate the recovery of vCloud Director resource clusters.

Download

Read more and download the whitepaper as a PDF from the VMware website here: http://www.vmware.com/resources/techresources/10355

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:

https://[VCD-URL]/api/supportedSystemsInfo

Here is an example output of what you would see:

    <OperatingSystemFamilyInfo>
        <Name>Microsoft Windows</Name>
        <OperatingSystemFamilyId>1</OperatingSystemFamilyId>
        <OperatingSystem>
            <OperatingSystemId>85</OperatingSystemId>
            <DefaultHardDiskAdapterType>4</DefaultHardDiskAdapterType>
            <MinimumHardDiskSizeGigabytes>40</MinimumHardDiskSizeGigabytes>
            <MinimumMemoryMegabytes>512</MinimumMemoryMegabytes>
            <Name>Microsoft Windows Server 2012 (64-bit)</Name>
            <InternalName>windows8Server64Guest</InternalName>
            <Supported>true</Supported>
            <x64>true</x64>
            <MaximumCpuCount>64</MaximumCpuCount>
            <MinimumHardwareVersion>8</MinimumHardwareVersion>
            <PersonalizationEnabled>true</PersonalizationEnabled>
            <PersonalizationAuto>true</PersonalizationAuto>
            <SysprepPackagingSupported>true</SysprepPackagingSupported>
            <SupportsMemHotAdd>true</SupportsMemHotAdd>
            <cimOsId>74</cimOsId>
            <CimVersion>0</CimVersion>
            <SupportedForCreate>true</SupportedForCreate>
        </OperatingSystem>
    <OperatingSystem>
    ...
    ...

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

Which Guest OSes Are Supported In vSphere?

A common question that I see asked on the VMTN community forums is the ability to programmatically identify which guest OSes (Operating Systems) are supported in vSphere using the vSphere APIs. This request usually comes in handy for folks looking to build their own custom provisioning solution or portal to provide to their end users.

Similar to the way the vSphere Web Client / C# Client provides a list of supported guestOSes and recommended configurations and maximums, you can also generate this list dynamically using the vSphere API.

Continue reading

Locating vCloud Director Syslog, Installation ID & Other Settings Using The vCloud API

A few weeks back I needed to find the syslog settings for vCloud Director using the vCloud API for some testing, but after a bit of browsing through the vCloud API Reference, I was not able to find it.

I reached out to fellow colleague Timo Sugliani who has done some fantastic work with the vCloud API and he was able to help me locate the proper API call. It turns out the vCloud Director general settings is actually located under /admin/extension API section and I had thought it was somewhere under /admin. Using either REST Client or cURL, you can perform a GET operation to retrieve the syslog settings as well as other general settings using the following URL:

https://[vcd-url]/api/admin/extension/settings/general

Here is a screenshot of the results which you can see maps back to the settings shown in the above screenshot:

For more details on the properties, you can refer to the vCloud API Reference guide for the general settings here. Hopefully this quick tidbit will come in handy for anyone looking for syslog or other general settings using the vCloud API. Big thanks to Timo for his help!

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

How To Re-Initialize The vCloud Director Appliance Without Redeploying?

This was a question I received on Twitter from Christopher Wells this morning asking if it was possible to re-initialize the vCloud Director Appliance. This was not something I had done before nor had a need for. I normally deploy multiple vCD appliances in my lab for various testing without any issues. Though, Christopher does bring up an interesting use case for reinitializing an existing vCD appliance so you do not have to redeploy.

Continue reading