I have a pool of virtual machines running in ESX that have their virtual hard drives set to Indenpendant/Non-Persistent mode. I won't go into the reasons for this other than to say it is working really well for us. Periodically I need to reset these settings back to the standard persistent mode and would like to automate that via a scheduled task for script. Does anyone know how to do this?
Each VM has a corresponding .vmx file that holds its configuration information. You would need to modify this file for the specific VM(s) and add/modify one of the following lines, depending on which configuration you want to set:
Changes will take effect after the guest is rebooted.
Another way, if you use the VI Toolkit via Powershell, this will be much easier by running one of the following commands:
The latter can be scheduled to run via batch or straight PoSH script from within Windows. As far as scheduling the modification of the flat file in Linux, I'm not sure, I'm a Windows guy. I'm hoping someone else can fill you in on that.
I hope I pointed you in the right direction.