Google Compute Engine: reset doesn't restore to original image state

10,155

You should think of restarting an instance in the same way as when you restart a physical machine. All of the programs you have installed and files you have modified/created will remain (apart from files in the /tmp directory as snakecharmerb pointed out).

If you would like to completely reset an instance to it's original, unmodified state, the most efficient method would be to simply create a new instance of the same specification (i.e. by selecting the same source image and machine settings), and then to delete the old/modified one.

If you modify an instance and want to save the state of the instance/disk so that you can revert back to that state, you can create an instance snapshot. This allows you to save a snapshot of the instances boot disk, so that you can create an identical instance at a later date. More information on this can be found here .

Share:
10,155
Admin
Author by

Admin

Updated on July 05, 2022

Comments

  • Admin
    Admin almost 2 years

    The following documentation suggests that resetting a virtual machine on google compute engine will return a virtual machine to its original state

    Performing a reset on your instance is similar to pressing the reset button on your computer, which wipes the memory contents of the machine and resets the virtual machine to its initial state.

    https://cloud.google.com/compute/docs/instances/restarting-an-instance

    Yet my files still appear on the VM after following this documentation to reset via to gui and via gcloud on terminal.

    Am I misinterpreting this feature? Am I doing something incorrectly?

    Thank you!