Product Announcements

Getting Started with VMware vCenter Orchestrator – Building Many Virtual Machines

I’ve recently been building and rebuilding some of our physical labs many, many times. I’ve found that I have a very common base configuration that I need to start with and it takes me a while to manually configure all of my components. While I won’t be going into the infrastructure configuration just yet, I’m writing this to show you how easy it is for you to use VMware vCenter Orchestrator (vCO) to easily perform repetitive tasks with the built in workflows.

The point of this article is to get you started with something you either may not be aware of, or just have attempted before and didn’t know how or where to get started. We won’t be getting advanced so it should be easy to follow.

To start, I want to show you how easy it is to deploy a virtual machine using vCO. I know it’s very easy to deploy a virtual machine through the vSphere Web Client, but later on in the article we’ll look at repetition and how to make your life easier when deploying many similar VMs.

Create-Many-VMs-01-Workflow

In the library of workflows, expand vCenter > Virtual Machine management > Basic. Select the “Create simple virtual machine,” right-click it and select “Run.”

Create-Many-VMs-02-Wizard01

You will have to fill in the form with the appropriate data. When selecting the “Virtual machine folder,” browse to the “vm” folder under the inventory tree as seen in the image below.

Create-Many-VMs-03-VMFolderSelection

Click “Next,” and on the following screen, you’ll need to select more resources from the inventory tree such as host, resource pool, network, and datastore for the virtual machine placement.

Create-Many-VMs-04-Wizard02

Click “Submit” and view the vSphere Web Client to watch the virtual machine get created.

Create-Many-VMs-05-VM-Success

Again, this is a very simple workflow and I believe the scripting code involved is only allowing for virtual standard switch selection. If you have some experience (or find a good sample online) you can enhance this workflow by duplicating and editing it.

If you want to create more virtual machines just like it and don’t have the time or experience to add to the workflow, you can simple right click on the success token and run it again. In this example, all I changed in the wizard is the virtual machine name, ran it a few times, and more virtual machines were created with the same settings. The remaining settings stay populated from the last time the workflow was run.

Create-Many-VMs-06-RunWorkflowAgain

While creating one virtual machine didn’t save me any time over the vSphere Web Client, duplicating the virtual machine significantly reduced the number of clicks I had to go through.

Create-Many-VMs-07-RunWorkflowAgain-VMResults

When you’re ready to take the next easiest step, I recommend taking a look at this blog here: http://blogs.vmware.com/orchestrator/2013/10/how-much-javascript-do-i-really-need-to-know-for-vco.html

What it does is walk you through creating a scriptable task and added it to your workflow. You can then feed an xml file into the workflow and create virtual machines for each name present in the xml file. It doesn’t take that much work and could be a great stepping-stone into the power of VMware vCenter Orchestrator!

Although creating a simple virtual machine may not be exactly what you need, hopefully this helped you become more comfortable with the technologies. You can apply the same techniques to other things such as cloning exists virtual machines or templates, or even creating linked clones from existing virtual machines.

Stay tuned for more easy ways to get started!

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