You need to create a reusable Compute Engine custom image of your production VM instance without shutting it down. The instance is running in zone us-central1-a and has the Linux guest environment installed so it can flush the file system before imaging. Which single gcloud command meets the requirement while keeping the VM online and capturing a consistent image?
When a VM must stay online, you can create a machine image directly from the attached persistent disk. Adding the flags --source-disk and --source-disk-zone tells gcloud which disk to read, and --guest-flush instructs the guest agent to momentarily flush in-memory data to disk so the image is file-system consistent. No separate snapshot or shutdown is necessary. The other commands either require an extra snapshot step, stop the VM, or omit the flush operation, so they do not satisfy the requirement for both minimal disruption and consistency.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the --guest-flush flag in the gcloud command?
Open an interactive chat with Bash
Why is creating an image directly from the disk a better choice for a running VM?
Open an interactive chat with Bash
What scenarios require using a snapshot instead of `--source-disk` in image creation?
Open an interactive chat with Bash
What is the purpose of the --guest-flush flag in the gcloud compute command?
Open an interactive chat with Bash
What is the difference between creating an image from a disk and creating a snapshot?
Open an interactive chat with Bash
Why doesn't the VM need to be shut down during the image creation process?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .