VMware

This Question is Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
3 Replies Last post: Nov 3, 2009 8:57 AM by siayiu  

Getting a virtual machine posted: Oct 30, 2009 8:10 AM

Click to view sh230388's profile Lurker 3 posts since
Oct 30, 2009
Hi,

I'm trying to "do" something with a virtual machine via Orchestrator workflows. I see there's many workflows in place to help out but the issue I have is that they all require an input parameter like VMware3:VirtualMachine, VMware3:HostSystem, etc. When I run the workflow, the GUI allows me to click on the appropriate object.

What I want is to be able to enter these values as strings rather than selecting the objects, eg, To get a virtual machine, I want to enter a string and it will return me the VMware3:VirtualMachine object. How can I do this?

hanks,

SH

Re: Getting a virtual machine

1. Oct 30, 2009 8:54 AM in response to: sh230388
Click to view Burke-'s profile Hot Shot 77 posts since
Oct 23, 2007
You'll need to write an action or workflow that takes a string input, searches your VC for the VM(s) with the correct name or id that matches that input string. Once you have found the VirtualMachine object, you can then pass that as an input to your other workflows that require a VMware3:VirtualMachine object as an input.

Re: Getting a virtual machine

3. Nov 3, 2009 8:57 AM in response to: sh230388
Click to view siayiu's profile Enthusiast 66 posts since
Feb 4, 2008

Hi,

Sorry for not getting back to you sooner. Been a little caught up. Please see the attached package for over 10 different actions in getting VMs. You have things from get VM by host, get VM by OS, get all windows VMs, get all VMs in a folder, etc. The most useful one that is likely to match what you are looking for is "get VMs by regex". You should be able to use them in workflows directly without issues.

These actions will be included in a coming release by default. One caviat: I see in your example you are looking for VMware3:VirtualMachine. These actions are written for vSphere4 which is in the "VC" name space. But I assume you know how to change that?

Let me know if these work out for you (of course, let me know if they don't work out either :)

Sia


VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities