Hello,
This seems like a simple request but I cannot find the right syntax for it. I am trying to create a workflow that will enable/disable the VM option to automatically check VMtools on next reboot.
I can check to see what it currently is but cannot figure out how to change it.
var currentopt = vm.config.tools.toolsUpgradePolicy;
System.log ("currentopt = " + currentopt);
Any assistance will be helpful.
Thanks
B
What language do you use to automate stuff in your environment?
Older blog post - Automating VMware Tools Upgrade Policy | virtuallyGhetto
Powercli post - Checking vmware tools upgrade policy using powercli, setting vmware tools upgrade policy | VMware an...
Different powershell way - http://powershell.com/cs/media/p/29395.aspx
YA powershwell way - http://serverfault.com/questions/686158/setting-vmware-vsphere-vms-to-automatically-upgrade-vmware-t...
Hopefully one of these help you down your path.
What language do you use to automate stuff in your environment?
Older blog post - Automating VMware Tools Upgrade Policy | virtuallyGhetto
Powercli post - Checking vmware tools upgrade policy using powercli, setting vmware tools upgrade policy | VMware an...
Different powershell way - http://powershell.com/cs/media/p/29395.aspx
YA powershwell way - http://serverfault.com/questions/686158/setting-vmware-vsphere-vms-to-automatically-upgrade-vmware-t...
Hopefully one of these help you down your path.
I think that you should call vm.reconfigurevm_task (http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#reconfig...) and in the VirtualMachineConfigSpec provide the needed ToolsConfigInfo (http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.vm.ToolsConfigInfo.html) You can check some of the library workflows how they assemble the VirtualMachineConfigSpec