VMware {code} Community
Teck123
Contributor
Contributor

Automatically running scripts in Virtual OS

I am a newbie to all VMware so please bear with me.

First some back ground. We have Lab Manager 2.5 with templates of several different OS's images already setup. We also have VMware ESX 3.0.2.

It has been asked of us to use these created templates to setup different virtual OS's machine and install our in house software on the created virtual machine. Then run a test utility, look at the output logs it creates and when finished uninstall/clean the created virtual OS. And all this has to be done via a script, i.e. automatically. It would be preferred if this was done via UNIX/Borne shell scripting or perl. All of the run software is non-interactive and requires no user input.

So my question is, what is the best way for doing this? I have been looking at the Lab Manager SOAP API's, is that the best way to do this? Will we be stuck using Windows C#/.net if we go the SOAP route?

Also, if this is the wrong discussion group, please point me to the correct one.

Thanks.

Tags (2)
0 Kudos
1 Reply
jrackliffe
Hot Shot
Hot Shot

The VI API is focused more around the infrastructure then automating inside a guest from my experience, but I don't know if Lab manager offers any add-ons to the standard method set. Now VMware does have the VIX services for doing inter-guest functions so you are not lost, but I think you will need to use a combination of the VI API via SOAP and the VIXVM API via provided includes to do what you list.

You will use VI to manage the VMs by cloning your templates, power management, etc. Then you will use VIXVM to launch your scripts, copy files, etc. inside the Guest OS which will need Vix installed.

As to limits of your language you are really just bound by what languages understand SOAP so .NET really is just one of many. And if you are Perl fans you could look at the perl toolkit which masks some complexity of hitting SOAP directly. You may have difficulty getting an assist in the forum if you choose a less common language like Ruby and try to do your work there, but thats your choice. Now for VIX I believe you will have to select from C includes, a Perl include or COM+ for Windows. So that might be a bit harder depending on your language preference.

Hope this helps and good luck.

J

0 Kudos