Create a Machine Image for Instance Replication

Create a Machine Image for Instance Replication

Overview

  • Labs are timed and cannot be paused. The timer starts when you click Start Lab.

  • The included cloud terminal is preconfigured with the gcloud SDK.

  • Use the terminal to execute commands and then click Check my progress to verify your work.

Challenge scenario

  • Assume you are a cloud engineer and you have a virtual machine (VM) instance in a zone on Google Cloud Platform. Your goal is to preserve the configuration, metadata, permissions, and disk data of this VM by creating a machine image. This machine image will serve as a snapshot of the current state of your VM and can be used for multiple purposes such as Single disk backup, Multiple disk backup, Differential backup and Instance cloning.

  • So your task is to create the machine image named vm-mc-image-218 of the Google Compute Engine (GCE) VM instance named wordpress-server which is located in us-east1-d zone.

Click Check my progress to verify the objective.

Create the machine image of GCE VM named wordpress-server.


Solution of Lab

curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/create-a-machine-image-for-instance-replication/lab.sh
source lab.sh

Script Alternative

  • Replace [enter zone , [enter Machine Image Name , [enter VM Name]] with region given
gcloud compute machine-images create [enter Machine Image Name] --source-instance=[enter VM Name] --source-instance-zone=[enter zone here]