0
0
GCPcloud~20 mins

Instance states (running, stopped, terminated) in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Instance State Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you stop a Google Compute Engine instance?

You have a Google Compute Engine virtual machine instance currently in the running state. You issue a stop command on this instance. What is the resulting state and behavior of the instance?

AThe instance state changes to <em>stopped</em>, the VM is shut down, and you stop incurring charges for the VM's CPU and memory, but persistent disk charges continue.
BThe instance state changes to <em>terminated</em>, the VM is deleted permanently and all data on the persistent disk is lost.
CThe instance state remains <em>running</em>, but the VM is paused and you continue to be charged for CPU and memory.
DThe instance state changes to <em>stopped</em>, but the VM continues running in the background and you continue to be charged for CPU and memory.
Attempts:
2 left
💡 Hint

Think about what happens to billing and data when you stop a VM but do not delete it.

🧠 Conceptual
intermediate
1:30remaining
Which instance state indicates a VM has been permanently deleted?

In Google Cloud Platform, which instance state means the virtual machine no longer exists and cannot be restarted?

ATerminated
BStopped
CRunning
DPaused
Attempts:
2 left
💡 Hint

Consider which state means the VM is gone for good.

Architecture
advanced
2:30remaining
Designing a cost-efficient VM lifecycle using instance states

You want to design a system where your VM instances are only charged for CPU and memory during business hours (9am-5pm), but data must persist 24/7. Which instance state transitions should your automation perform daily?

ACreate new instances at 9am, delete instances at 5pm.
BStart instances at 9am (state: running), stop instances at 5pm (state: stopped).
CPause instances at 5pm, resume instances at 9am.
DTerminate instances at 5pm, recreate instances at 9am.
Attempts:
2 left
💡 Hint

Think about which states preserve data and reduce charges.

security
advanced
2:00remaining
Security implications of instance states in GCP

Which instance state poses the highest security risk if an attacker gains access to your Google Cloud project, assuming no additional protections?

AStopped - attacker can start the VM and access data on disk.
BTerminated - attacker cannot access the VM or data because it is deleted.
CRunning - attacker can access the live VM and data in memory.
DPaused - attacker can resume the VM and access data.
Attempts:
2 left
💡 Hint

Consider which state allows immediate access to running processes and memory.

Best Practice
expert
3:00remaining
Choosing the correct instance state for disaster recovery readiness

Your company requires that VM instances be quickly recoverable after a disaster, with minimal data loss and cost efficiency. Which instance state strategy best meets this requirement?

AKeep instances in <em>running</em> state 24/7 to ensure immediate availability.
BPause instances during off-hours and resume during business hours.
CTerminate instances daily and recreate from backups when needed.
DKeep instances <em>stopped</em> with persistent disks and snapshots taken regularly for fast restart.
Attempts:
2 left
💡 Hint

Balance cost, recovery speed, and data safety.