Auto starting VMs within the same project
This section describes Money Saver VM to autostart the preemptible vms which are running in the same project.
The VM will run a script every two minutes to restart stopped preemptible vms only and not regular vms.
By default it will start all preemptible vms in the project where it is running.
- Follow below steps to use Money Saver VM with your GCP preemptible vms:
-
Make sure Money-Saver VM is deployed and up and running in the project as perGCP Getting Started Guide .
-
Create preemptible VMs for your computing needs by setting Preemptibility “On”


- If this preemptible vm is stopped by GCP, money-saver vm will autostart it.

- Re-start activities of Preemptible VMs is stored in /var/log/money-saver-vm.log inside Money-Saver VM

- Now your preemptible vm is up and running

- if you don’t want Money-Saver vm to autostart a specific Preemptible VM, set meta data of that VM with key=“autostart” and value=“no” as shown below.


- Now this vm will not autostart with money-saver vm.