A machine image is a Compute Engine resource that stores everything needed to recreate a virtual machine, its configuration, its metadata, its permissions, and the data from all of its disks. Think of it as a complete copy of a VM that you can use as a backup, or as a starting point for cloning the machine.
People often confuse it with a snapshot and a custom image, which sound similar but hold less. A snapshot is one disk. A custom image is a boot disk used as a template. A machine image is the whole machine. Picking the right one saves you from discovering, during a restore, that something important was never captured.
This covers what a machine image holds and how it compares with the alternatives, then walks through creating one in the console, explains the location and encryption choices, and shows how to use it afterward.
| Resource | What it holds | Multiple disks | Best for |
|---|---|---|---|
| Machine image | Configuration, metadata, permissions including the service account, and the data of every attached disk | Yes | Backing up or cloning a whole VM |
| Disk snapshot | The data of one persistent disk | No | Backing up a single disk |
| Custom image | The contents of a boot disk, packaged as a bootable template | No | Creating many new VMs with the same operating system and software |
| Instance template | The properties used to create VMs, not disk data | No | Creating groups of similar VMs, for example in a managed group |
The Creating and Deleting an Image of an Instance guide in this series covers custom images in more detail.
Open the console, then open Menu > Compute Engine > Machine Images

Click Create machine image.

Give the machine image a name, then choose the source instance, the VM you want to capture. By default, the machine image includes the boot disk and every other disk attached to that instance.

Choose between multi regional and regional storage, and optionally choose an encryption method, then click Create. Both choices are explained below. When it finishes, the machine image is listed as ready.

Machine images are stored in Cloud Storage, in either a multi region, such as asia, or a single region, such as asia south one. If you do not choose, the image is stored in the multi region that contains the source instance, or the geographically closest one. Where you store it can matter for availability and for compliance rules about where data may live.
If you choose nothing, the machine image is encrypted with a Google owned and Google managed key. You can instead protect it with a key you control in Cloud Key Management Service. One detail to know is that the key protects the content of the disks, but not the metadata, so do not rely on it to hide something you placed in instance metadata.
You can create a machine image of a specific instance at most 6 times in 60 minutes. The first machine image from an instance contains a full copy of the disk data, and later ones use the same differential approach as incremental snapshots. What you pay depends on the size of the machine image and where it is stored. To see the size, run:
gcloud compute machine-images describe MACHINE_IMAGE_NAME
Delete machine images you no longer need, since storage is billed for as long as they exist.
When you create a new VM, you can choose to create it from a machine image. It starts with the same configuration, disks, and service account as the source, and you can override some properties. You can also share a machine image with other projects, which makes it useful as a golden image for a team. From the command line, the equivalent commands look like this, though I have not tested them:
gcloud compute machine-images create MACHINE_IMAGE_NAME –source-instance=SOURCE_INSTANCE –source-instance-zone=ZONE
gcloud compute instances create NEW_VM_NAME –source-machine-image=MACHINE_IMAGE_NAME
That covers creating a machine image, how it differs from the alternatives, and what to watch for. To go further, explore Prwatech’s Google Cloud training program, which includes placement assistance.