
VMs, disks, images, and snapshots
A VM is an on-demand virtual server that you spin up for your needs. It is geographically located in one of Google's data centers, but you only choose the region and zone, not the precise location. Although you share some of the infrastructure resources with other users, this sharing is transparent to you.
A VM requires a persistent disk to run on and an operating system such as a Windows or Linux distribution to boot on. Although very much abstracted in a cloud computing context, a GCE disk would refer to a physical drive that the computer can boot on.
An image exists on top of a persistent disk, and includes the operating system necessary to launch the instance. A typical use of an image is to enable sharing a VM setup across many different VMs. An image consists of an operating system and boot loader and can be used to boot an instance.
A snapshot is a reflection of the content of a VM at a given time. A snapshot is mostly used for instant backups. Snapshots are stored as diffs, relative to the previous one, while images are not.
Images and snapshots are quite similar. It's possible to activate an instance using a snapshot or an image.
When you launch a new instance, GCE starts by attaching a persistent disk to your VM. This provides the disk space and gives the instance the root filesystem it needs to boot up. The disk uses the image you have chosen and installs the OS associated with that image. Public images are provided by Google with specific OS while private images are your own images.
By taking snapshots of an image, you can copy data from existing persistent disks to new persistent disks. Snapshots are meant for creating instant backups.
From the Google Shell, you can access and manage all your resources and files.
For example, let's list all our existing instances by typing:
We see our newly created sparrow instance.