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:

  1. Make sure Money-Saver VM is deployed and up and running in the project as per GCP Getting Started Guide .
  2. Create preemptible VMs for your computing needs by setting Preemptibility "On"

  3. Maintenance tab

    Preemptiblity on

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

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

  8. Now your preemptible vm is up and running
  9. Preemptible vm

  10. 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.
  11. /img/gcp/money-saver-vm/money-saver-autostart-no.png


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