We are trying to create a horizontaly Scalable web service via Google Compute Engine.
In order to do so, we have created an Instance Template and a Group of Instances based on this new template. The group of instances create a new virtual machine (we chose Debian) in which we can install our NodeJs application and other stuff.
We unlucky found out that when the VM is turned off everything inside the VM is erased. We would like to create a Snapshot or a Disk Image in order to avoid completely rebuild an instance from sketch, but we encountered two problems:
- You can't create a Disk Image while the VM is running but if we turn it off we would lose all data in it.
- It is possible to create a Snapshot of a VM while it is running but when you create a new instance from the Snapshot we can't link/join the new instance to the Group of Instances.
How can we get to the solution with those tools? Thanks
Although it is recommended to shutdown your VM instance before creating an image, it is possible to create an image of a running system.
sudo sync. Windows: Sysinternals wroteSyncwhich will help. Sysinternals's SyncCREATE IMAGE.Keep instance running (not recommended).Note: You can also create a disk snapshot.