Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Cloud/GCP Create Images

May 12, 2019

GCP Create Images

Here’s how to create a GCP Disk Image from a Boot Drive.

  • First, stop the instance.
  • If you can’t, stop the applications/database from writing to disks.
  • Run sudo sync .

Create From Disk

gcloud compute images create the-new-image-name \
   --source-disk the-source-boot-disk \
   --source-disk-zone us-central1-a \
   --family the-image-family \
   [--force]

gcloud compute images create the-new-image-name \ --source-disk the-source-boot-disk \ --source-disk-zone us-central1-a \ --family the-image-family \ [--force]

Create From Image

gcloud compute images create the-new-image-name \
  --source-image the-source-image \
  --source-image-project the-project-where-the-image-is-located \
  --family the-image-family

gcloud compute images create the-new-image-name \ --source-image the-source-image \ --source-image-project the-project-where-the-image-is-located \ --family the-image-family

Create From Snapshot

gcloud compute images create the-new-image-name \
  --source-snapshot the-source-snapshot

gcloud compute images create the-new-image-name \ --source-snapshot the-source-snapshot

For more info.

Filed Under: Cloud, Linux Tagged With: cli, disk, gcp, image, snapshot

Have content delivered to your mail. Subscribe below.

About Me

I'm Ulysses, Cloud Engineer at Cardinal Health based in Columbus. This blog is about Linux and Cloud technology. When off the grid, I enjoy riding my electric skateboard. I've surfed, snowboarded and played the saxophone in the past. I hope you find this website helpful. It's powered by WordPress and hosted on AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021