Hi,
I am not sure VIX API is the right forum to ask this question. Since VIX API helps to do most of guest operations, I dare to ask here.
I work with VMware Workstation and I am looking for a programatic way to edit the .VMX file and do some chages.
I want to change the SnapshotAction, VM name, WorkingDir configuration by programatic way. Do VIX API will help me to do this or I need to use any other SDK. If possible, please direct me with sample.
Thanks in advance...
Rocky
I believe the original post was about Workstation.
If ESX/vSphere is an option, there are a number of APIs, including the PowerCLI, as well as vSphere SDKs for Perl and Java.
As far as I know VIX does not provide methods to do that kind of operations. I've been using VIX for a while and I never saw something like that. You can check here the methods available:
http://www.vmware.com/support/developer/vix-api/vix16_reference/
Hi!
Why dont you open the vmx file, read it, change it, and write it back?
Tos2k
I suppose it depends. If the vmx file is hosted on an ESX server, I don't think you can directly open it for writing via C or Java I/O operation.
However, if the VM is on a local machine, and being run using VMWare workstation, or any local client, then its fairly trivial to open/read/write/close from your code via the I/O API of the language you're using.
Yes, vmx files on ESX hosts can be dowloaded, opened, written, and uploaded back in general.
Of course, changes in vmx wont affect on ESX/vCenter before reregistration of VM.
Tos2k
Thanks for your comments....
Yes, I understand that I can 'manually' download vmx, edit it in notepad/wordpad and reregister it for effect. But my question is there any SDK or set of classes that I can use to edit the VMX file.
your comments would be really helpful.....Thanks in advance.....
There is currently no API available for VMware Workstation to let you programmatically change those values.
Hi RockyConcept,
Have you tried with PowerShell? It is a quite nice way to script changes within your vms.
I believe the original post was about Workstation.
If ESX/vSphere is an option, there are a number of APIs, including the PowerCLI, as well as vSphere SDKs for Perl and Java.