posted

1 Comment

If you think that VMware vCloud® Air is just about extending your data center or is only a place where you would instantiate one or two departmental virtual machines (VMs), you may want to think again.

With vCloud Air, I was able to easily deploy 1000 VMs in less than 90 minutes.

A few weeks ago, as part of some scripting exercises, I decided to try to deploy, in bulk, a large number of virtual machines inside vCloud Air. To do that I wrote a small Ruby program that deploys 1,000 VMs across three regions. I was able to deploy these in under 90 minutes – which is the time from the very first API call to deploy the VMs to the point where I could access the login screen of the last deployed VM.

The entire exercise only cost about $50, which includes multiple runs of the test, mainly to debug the script.

Architected for Scale

To deliver the compute service (IaaS) in vCloud Air, we leverage vCloud Director. You don’t have to know how to use vCloud Director (as a product) to understand how to consume the service, but it helps when you understand the constructs.

The atomic IaaS consumption unit in vCloud Air is a virtual data center (vDC). In the vCloud Air subscription model, you rent a certain amount of capacity monthly that is divided into one or more vDCs, whereas in the OnDemand model you pay for what you consume (aka PAYG).

The nice thing about vCloud Air OnDemand is that we don’t charge for the plumbing, aka the vDC, themselves. Rather, we charge based on the consumption of the vDC(s) by the minute. Where the subscription model provides a stable, fixed cost for cloud computing resources, OnDemand is a great way to deal with unexpected demands and to rapidly add capacity when needed.

We often talk about cloud-scale as the ability to treat resources as being “unlimited”. VMware experienced this first-hand during VMworld 2014 when the mobile application for the conference far exceeded expected peak loading – by 5 times! Running the application on vCloud Air gave us the ability to handle these capacity swings without interruption to the app itself.

But just how long would it take to spin up 1,000 VMs?

Automating for Scale

To measure just how fast we could deploy 1,000 VMs from scratch, I had to automate this process. Part of the challenge was figuring out a strategy to do this optimally.

In the service today, we have soft limits in place to cap the number of VMs per vDC to 50. This is a carry-over from the vCloud Director design, but it is not a hard limit. You can always call support and have those limits lifted or you can work around the limits.

Instead of deploying 1,000 VMs in just one vDC, I wrote a Ruby script to deploy VMs across 20 virtual data centers in 3 regions.

Note that we have other soft limits in place. For example, users can’t deploy, by default, more than 100 VMs per region. You can call GSS to get that limit lifted.

(The code is very rough and it requires some hammering and know-how of the internals to actually use it, so at this time, I am not sharing the source code. I may be able to do that in the future when I polish it properly and add more controls and error handling.)

In order to parallelize VM deployments as much as possible, I created multiple virtual data centers in 3 regions (7 vDCs in Virginia, 7 vDCs in the UK and 6 vDCs in California). The script iterates through these vDCs and deploys VMs in each of them (350 VMs, 350 VMs and 300 VMs respectively).

This picture illustrates graphically this concept.

massimo

I worked around the 50 VMs per vDC limit by creating 20 vDCs. In the end, I was able to time this automated deployment and gain access to the 1,000th VM within 90 minutes. Imagine doing that in your data center – for fun! Since I also automated the process to shut off and delete those 1,000 VMs, the cost of this experiment was less than $50.

For the record, I used a CentOS image as provided in the public VMware catalog. It could have very well been one of your vSphere templates that you previously replicated into your private vCloud Air catalog: this service is meant to be hybrid after all.

If you would like to run a similar test, please reach out to me for more details so you don’t have to re-invent the wheel.

Have fun and enjoy vCloud Air.

For more information about VMware vCloud Air, visit vcloud.vmware.com, and keep an eye on the blog for upcoming tips and best practices for using vCloud Air.

Be sure to subscribe to the vCloud blog with your favorite RSS reader, or follow our social channels at @vCloud and Facebook.com/VMwarevCloud for the latest updates.