Bitzu

Associate Cloud Engineer ยท Operating VMs and developer environments

Custom images vs snapshots

Creating an image from a VM disk or snapshot, image families, sharing across projects, deprecating and deleting images, images vs snapshots.

Key points

  • A custom image is a reusable boot template made from a disk, snapshot, or another image, used to create many new VMs.
  • A snapshot is mainly a backup of one disk.
  • Group image versions in an image family so the newest non-deprecated one is used by default.
  • Share images by granting the Compute Image User role; retire them with gcloud compute images deprecate.

Source: https://docs.cloud.google.com/compute/docs/images/create-custom

Practice questions

Single choice

What is the main purpose of an image family?

  1. Resolve to the newest non-deprecated image in the group
  2. Replicate an image to every region
  3. Encrypt images with a shared key
  4. Limit an image to one project
Show answer

Answer: A. Resolve to the newest non-deprecated image in the group

A family points to the latest non-deprecated image in it, so templates can reference the family instead of a specific version. It does not replicate images across regions or encrypt them.

Select all that apply

Which sources can you create a custom image from?

  1. A persistent disk
  2. A snapshot
  3. The RAM contents of a running VM
  4. A VPC firewall policy
  5. A Cloud Logging sink
Show answer

Answer: A. A persistent disk, B. A snapshot

Images can be built from a disk, a snapshot, or another image. A running VM's memory and a Cloud Storage bucket of logs are not image sources in this sense.

True or false

True or false: deprecating an image deletes it immediately.

Show answer

Answer: False

False. Deprecation only marks a lifecycle state such as DEPRECATED; deletion is a separate step.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module