WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple

Quick Tip - Automate the export of a vCenter Orchestrator workflow using the CLI

08.14.2013 by William Lam // 5 Comments

Steve Jin recently wrote an article about vCenter Orchestrator REST APIs: Executing Workflow which reminded me of an interesting issue that I had faced several months back. I had just finished developing a custom workflow on a beta version of vCenter Orchestrator and of course one of the challenges with using early software is that it could be unstable. I was unable login to the vCO interface via vSphere Web Client or the vCO Client to export my workflow through the regular UI interface. I tried everything and I thought I might have lost my workflow!

I reached out to one of the vCO engineers and asked if there was an easy way to recover my workflow and it turns out there was a very simple method IF the vCO REST API endpoint is still accessible, which it was. To test this, you can either use cURL on the command-line or your favorite REST Client for your browser and perform a GET operation on the following URL (replace the URL with the URL of your vCO Server):

https://vco.primp-industries.com:8281/api/workflows

Note: The vCO REST API is only available starting with vSphere 5.1

If the command was successful, you should see a list of all the workflows in your vCO Server:

I am not aware of any filtering that can be done to narrow down the specific vCO Workflow, but if you are using a browser-based REST Client, you can just search for the name of your workflow. In the above example, I am interested in the "Change Guest OS Type" workflow and you can see its corresponding vCO Workflow ID which is highlighted.

To export and save the vCO Workflow to your local system, you just need to perform a GET operation on the vCO Workflow URL and specify "Accept:application/zip" for the request header which will allow you to save the vCO workflow.

Here is an example using cURL to export the  vCO Workflow and save to a file called ChangeGuestOS.workflow:

curl -i -k -u vcoadmin -H "Accept:application/zip" -X GET https://vco.primp-industries.com:8281/api/workflows/7D808080808080808080808080808080BC818080013141141566711a974a8fef8 -o ChangeGuestOS.workflow

Categories // Uncategorized Tags // export, REST API, vcenter orchestrator, vCO, workflow

Exporting An Amazon EC2 Instance To Run On vSphere

05.02.2013 by William Lam // 15 Comments

I attended the Silicon Valley VMUG yesterday and there was an interesting question that was brought up at the end of Joe Sarabia's Software Defined Datacenter session (which was great BTW, folks stayed past the end and this was during lunch!). The question from the attendee was how to export an Amazon EC2 Instance and run that on an vSphere ESXi host? Joe's answer was that there is not a tool from VMware but there should be some 3rd party tools out there that could help with this task.

This was not something I had really thought about before since I do not use Amazon EC2 and of course that perked my curiosity. I assumed importing and exporting Instances to and from Amazon EC2 would be just as easy as it is on VMware vSphere. To export a VM in vSphere, you simply select the VM and then Export which can be outputted to either an OVF or OVA format.

After a quick search on Amazon's EC2 website, I found that you can export an EC2 Instance by using EC2 API Tools. So I went ahead and deployed both a Linux and Windows Instance and ran through the installation of the EC2 API Tools on my Mac OS X system at home. I tried to export the Linux Instance and it threw an error saying not supported which I thought was odd and then tried the Windows Instance and it threw another interesting error:

Client.NotExportable: Only imported instances can be exported.

My initial thought was that I must have done something wrong. I dug a bit more into Amazon's documentation which was not very easy to find and finally found the Exporting EC2 Instance documentation. It turns out there are a few "caveats" if you want to export an EC2 Instance:

Only the following operating systems are supported:

  • Windows Server 2003 R2 (Standard, Enterprise, and Datacenter)
  • Windows Server 2008 (Standard, Enterprise, and Datacenter)
  • Windows Server 2008 R2 (Standard, Enterprise, and Datacenter)

This meant that you could not export any of your Linux Instances. In addition, these Instances must be uploaded by the user initially for them to be eligible for export. I also found there were several other export limitations:

  • You cannot export Amazon Elastic Block Store (Amazon EBS) data volumes.
  • You cannot export an instance that has more than one virtual disk.
  • You cannot export an instance that has more than one network interface.

I was actually quite surprised to see how difficult and restrictive Amazon has made it for exporting their EC2 Instances, I really thought it would have been just as easy as it is on VMware vSphere. I also came across this VMware KB 1018015 which provides an alternative to the EC2 API Tools, which has you install VMware Converter on the Windows system to export the EC2 Instance.

Categories // Uncategorized Tags // amazon ec2, export, ova, ovf, vSphere

VIN 2.0 Supports New Export to CSV & Maps Feature

11.30.2012 by William Lam // 2 Comments

VMware just released the new vCenter Operations Management Suite 5.6 this evening which includes all new updates to the following products:

  • vCenter Operations Manager 5.6 
  • vCenter Configuration Manager 5.6
  • vFabric Hyperic 5.0
  • vCenter Infrastructure Navigator 2.0
  • vCenter Charge Back Manager 2.5

There are too many cool new features in each of these products to list them all out (I recommend you check out the release notes for each product). Though, two new features that I would like to point out is from latest vSphere Infrastructure Navigator 2.0 release (also known as VIN) which allows you to export the VIN data to CSV output as well as exporting the maps to PNG.

You have the option of exporting all virtual machines from a given vCenter Server or filter out a subset of the virtual machines by navigating to a specific object using the object navigator in the vSphere Web Client. In the screenshot below, I would like to export all virtual machines that VIN is collecting for a particular vSphere Cluster, so I select the Virtual Machines in that Cluster on the left and then select the Manage tab and then click on Application Services.

The export to CSV button is located right next to the filter box and this will export the entire table view that is seen to a CSV file which you can then save onto your local desktop. The filename will automatically be saved as vin-inventory.csv and here is a screenshot of the output file:

Note: If you filter the list of virtual machines using the Filter box, the export will still capture all virtual machines under this view. If you wish to capture a specific set of VMs, you will need to use the object navigator to filter out the specific objects before exporting.

To export the application dependency maps from VIN, you will need to be in the context of an individual virtual machine and again under Manage tab and then click on Application Services. The map export button is located right next to the zoom in/out option in the upper right corner as shown in the screenshot below.

I really like map export feature as you can sit back and let VIN do all the hard work of mapping out all the applications and VM dependencies for us in a graphical manner and then just export the picture which can then be used with documentation, CMDB diagrams, auditing, etc. These are just two out of the many new features found in the latest release of VIN 2.0. I highly recommend you give VIN a try if you are not already using it in your vSphere environment!

One additional note that I would like to point out, the data being exported to CSV does not capture all the application details such as the services, ports, processes, etc. that you might see from the VIN UI. If you wish to extract all this information from VIN for your own use, you can do so by taking a look at the following articles:

  • Extracting Information from VIN (vSphere Infrastructure Navigator) Part 1
  • Extracting Information from VIN (vSphere Infrastructure Navigator) Part 2
  • Alternative Way of Extracting VIN (vSphere Infrastructure Navigator) Information

Categories // Uncategorized Tags // csv, diagram, export, infrastructure navigator, map, vIN

  • 1
  • 2
  • Next Page »

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to bootstrap ESXi compute only node and connect to vSAN HCI Mesh? 01/31/2023
  • Quick Tip - Easily move or copy VMs between two Free ESXi hosts? 01/30/2023
  • vSphere with Tanzu using Intel Arc GPU 01/26/2023
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS) 01/25/2023
  • ESXi with Intel Arc 750 / 770 GPU 01/24/2023

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 © 2023