Soru

Zorluk: KolayDeploying and Managing Compute Engine Virtual Machines

A cloud administrator needs to create a custom disk image from an existing Compute Engine VM instance and deploy a new VM instance using that image. What is the correct sequence of steps to complete this workflow?

  1. 1Stop the source Compute Engine VM instance to ensure disk consistency.
  2. 2Create a custom disk image from the source instance's root persistent disk using `gcloud compute images create`.
  3. 3Provision a new Compute Engine VM instance specifying the custom image as the boot disk using `gcloud compute instances create --image`.
  4. 4Verify that the new Compute Engine VM instance reaches the `RUNNING` status.

Cevap

The correct sequence is: Stop the source Compute Engine VM instance to ensure disk consistency, create a custom disk image from the source instance's root persistent disk using `gcloud compute images create`, provision a new Compute Engine VM instance specifying the custom image as the boot disk using `gcloud compute instances create --image`, and verify that the new Compute Engine VM instance reaches the RUNNING status.
The workflow follows standard Google Cloud Compute Engine deployment practices: first, stopping the source VM ensures data integrity; second, creating the custom image packages the operating system and installed software; third, creating a new instance from that image provisions the VM; fourth, checking the status ensures the instance has started properly.

Adım Adım Çözüm

1
Stop the source VM instance
Disk writes cease, leaving the persistent disk in a consistent state.
Capturing an image from an active VM can result in corrupted or incomplete snapshot data.
2
Create the custom image
A custom image artifact is stored in the project's image registry.
Compute Engine instances cannot boot directly from another VM's live disk without creating an image or disk clone first.
3
Deploy the new VM instance
A new Compute Engine VM is instantiated with a boot disk initialized from the custom image.
Specifying the `--image` flag during instance creation provisions the new VM with the pre-configured operating system and applications.
4
Verify operational status
The instance status transitions to RUNNING.
Validating the instance status confirms that initialization succeeded.

Anahtar Kavram

Custom Image Creation and VM Provisioning Workflow
Bu soruyu puanla