VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
4 Replies Last post: Jun 5, 2009 3:49 PM by fixitchris  

Convert vmcon vbs script to VIX? posted: Jun 4, 2009 12:49 PM

Click to view jfbellemare's profile Lurker 3 posts since
Jun 4, 2009

Hi all,

We upgraded our vmware server version from 1.09 to version 2.01 because we had some performance issues and IT management wanted to test the new version. Install was a breeze and everything is working fine since we upgraded. Here is the problem:

We had scripts running every week that closed the vm and transfer a zipped copy of the vmdk file to another location for backup purposes. To my surprise, the scripts were vbs files coded using the vmcom API. I'm not really confortable with the VIX API and can't really find the code samples i need to accomplish the conversion. I attached a copy of our script so if anyone got a VIX version or can give me some code i can use it would be greatly appreciated.

Comments are in french so here's the main fonctions:

1- Get VM state

2- Stop vm guest OS

3- Copy the vmdk to a temp folder

4- Restart the VM

5- Compress the vmdk file in a remote folder

Jeff


Attachments:

Re: Convert vmcon vbs script to VIX?

1. Jun 5, 2009 7:53 AM in response to: jfbellemare
Click to view fixitchris's profile Expert 549 posts since
Dec 8, 2006
If you'd like you can try my app @ http://communities.vmware.com/thread/191565?tstart=0. I can help you set it up.

Re: Convert vmcon vbs script to VIX?

4. Jun 5, 2009 3:49 PM in response to: jfbellemare
Click to view fixitchris's profile Expert 549 posts since
Dec 8, 2006
Thanks for your input, your requests will be implemented once a new release of VIX is released. I completely agree that better notification options and a more granular schedule is necessary. I'm thinking about allowing scripted actions to be inserted into the backup schedule so then you can write your own Powershell scripts for additional actions performed on the VMDKs...

Developer Social Media

Communities