is there a possibility to activate time synchronisation via VMware Tools in a bunch of VMs without loggin in to every machine and manually doing the switch?
Look in the vmx file and change the line
tools.syncTime = "FALSE" to tools.syncTime = "TRUE"
VMTN Forum Moderator
*Virtualization is a journey, not a project.*
I do not know for certain but it used to be the vmx file was only read during when the VM powers on. I want to say things have changed but do not have any concrete information on that.
Yes just not sure when the config file would be re-read. You will need to do some testing to confirm
is using this command :
vmware-cmd -s register <config_file_path>
vmware-cmd -s unregister <config_file_path>
would do the same thing as remove and re-add?
so this could be a part of his script?
Yes that does the same
Here is the command:
for vmx in `find /vmfs -name '*.vmx'`;do `perl -pi -e 's/tools.syncTime = "FALSE"/tools.syncTime = "TRUE"/g' $vmx` ;done
then you can use the same and replace the perl command by the vmware-cmd -s to register vm"
I always thought "vmware-cmd /vmfs/volumes/datastore/vm/vm.vmx setconfig tools.syncTime true" was more "appropriate" than manually hacking the vmx file. Not sure whether there's any benefit in terms of getting the value applied sooner, though.
I was not aware of this command
The command I posted is to do the same but in a different way and it is for doing multiple vms in one time.
I know that you could script the other command to do the same things but you'll have to get the path to the vmx for each vm as a changing variable in your command...
I'm a "copy and paste" Linux shell scripter so I'm borrowing from a "for" loop I had someone at work help me with for a different purpose (backing up vmx files every once in a while):
find /vmfs/volumes -type f -name *.vmx -print | while read filen; do vmware-cmd "$filen" setconfig tools.syncTime true; done;
Haven't tested it yet. And it's not as elegant as yours, as it takes a shotgun approach - it doesn't only modify those machines that need modification.