VMware {code} Community
rahulm
Contributor
Contributor
Jump to solution

API Question

Hi,

We just got ESX server at our company and I wanted to do some QA automation using ESX server. I was wondering what Perl API's are available to do the following:

- Start up a guest OS

- Get the IP of that guest OS

- Put a script on that guest OS

- Run that script.

- Shutdown guest os

- Snapshot it.

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
ssurana
VMware Employee
VMware Employee
Jump to solution

Hi Rahul,

The Functionalities you are referring to most of them are possible with VI SDK.

For Instance

  • Start up a guest OS

  • Get the IP of that guest OS

  • Shutdown guest OS

  • Snapshot it.

The above tasks can be easily accomplished using the VI SDK with the help of VI Perl Toolkit for perl implementation. You can refer to the samples shipped along with the Perl Toolkit for accomplishing these basic tasks.

Unfortunately the tasks

  • Put a script on that guest OS

  • Run that script.

are not possible through the VI SDK as it does not handle the operations to be performed inside the Guest OS.

~ Sidharth

View solution in original post

Reply
0 Kudos
4 Replies
ssurana
VMware Employee
VMware Employee
Jump to solution

Hi Rahul,

The Functionalities you are referring to most of them are possible with VI SDK.

For Instance

  • Start up a guest OS

  • Get the IP of that guest OS

  • Shutdown guest OS

  • Snapshot it.

The above tasks can be easily accomplished using the VI SDK with the help of VI Perl Toolkit for perl implementation. You can refer to the samples shipped along with the Perl Toolkit for accomplishing these basic tasks.

Unfortunately the tasks

  • Put a script on that guest OS

  • Run that script.

are not possible through the VI SDK as it does not handle the operations to be performed inside the Guest OS.

~ Sidharth

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

Just a note on Sidharths comment. He is correct that the VI SDK doesn't work at the Guest level, but it doesn't mean that you can't do what you need with other tools. For example, if your VM has a remote console solution you could probably just connnect to that in between your VI automation steps and execute a script natively.

Just want you to know that you probably have some options to use in conjunction w the VI SDK to offer your solution.

J

rahulm
Contributor
Contributor
Jump to solution

Sidharth,

Is this the right API: http://www.vmware.com/support/developer/viperltoolkit/

Thanks,

Rahul

Reply
0 Kudos
rahulm
Contributor
Contributor
Jump to solution

J -

Thanks. I'll look into the console solution that you mention to see if it does what I need.

-Rahul

Reply
0 Kudos