List Virtual Machines
Retrieve all VM instances across your GCP projects.Endpoint
Response
Instance Status Values
RUNNING- Instance is runningSTOPPED- Instance is stoppedTERMINATED- Instance is terminatedPROVISIONING- Instance is being createdSTAGING- Resources are being allocatedSTOPPING- Instance is shutting down
Create Virtual Machine
Provision a new GCP VM instance.Endpoint
Request Parameters
GCP project ID where the instance will be created
Compute Engine zone (e.g.,
us-central1-a, europe-west1-b)Name for the VM instance (must match regex
[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)Machine type (e.g.,
e2-small, e2-medium, n1-standard-1)Boot disk source image
Request Example
Response
Default Configuration
Compute Configuration
Compute Configuration
- Machine Type:
e2-medium(2 vCPUs, 4 GB memory) - Boot Disk Size: 10 GB
- Boot Disk Image: Debian 12
- Auto-delete Disk: Enabled
Network Configuration
Network Configuration
- Network:
global/networks/default - Access Config: External NAT (ephemeral external IP)
- IP Forwarding: Disabled by default
Machine Type Options
Machine Type Options
Shared-core (E2)
e2-micro- 2 vCPUs (shared), 1 GB memorye2-small- 2 vCPUs (shared), 2 GB memorye2-medium- 2 vCPUs (shared), 4 GB memory
n1-standard-1- 1 vCPU, 3.75 GB memoryn1-standard-2- 2 vCPUs, 7.5 GB memoryn1-standard-4- 4 vCPUs, 15 GB memory
The instance is created synchronously. The operation waits for the instance to be fully provisioned before returning.
Delete Virtual Machine
Delete a GCP VM instance.Endpoint
Request Parameters
GCP project ID
Zone where the instance is located
Instance name to delete
Request Example
Response
The boot disk is automatically deleted if the instance was created with
auto_delete=True (default behavior).Find VM by Name
Search for a VM instance across all projects and zones.Endpoint
Response
Search Behavior
Error Handling
- 400 Bad Request
- 403 Forbidden
- 404 Not Found
- 500 Server Error
Required IAM Permissions
The service account or user must have these permissions:Code Reference
The GCP VM management implementation is located in:- Source:
backend/gcp/vm.py:6-148 - Dependencies: Google Cloud SDK
google-cloud-computegoogle-cloud-monitoringgoogle-auth
Next Steps
VM Monitoring
Configure Cloud Monitoring metrics
Alert Policies
Set up alerts for GCP VMs