VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
2 Replies Last post: Oct 9, 2009 2:10 PM by lamw  

getting custom variables posted: Oct 9, 2009 1:36 AM

Click to view LarsOeschey's profile Novice 9 posts since
Oct 9, 2009

Hi,

we are trying to set up a backup environment, where I can set variables in vSphere if a VM should be backed up, and write back the date of the last backup. I've set up those variables invSphere (they show up as "remarks", translated from german), and my guess was that with the script VMware\VMware vSphere CLI\Perl\samples\vm\guestvars.pl I could get those variables. However, I don't get anything back... Is that script example intended to do that, or am I on a wrong path?

Lars

Re: getting custom variables

2. Oct 9, 2009 2:10 PM in response to: LarsOeschey
Click to view lamw's profile Champion 2,814 posts since
Nov 27, 2007
Take a look at this script: addVMCustomField.pl, if no data is returned, then the custom field is not set for a specific VM.

Regarding the API reference on properties/methods/etc. it's located at: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

Developer Social Media

Communities