Home / Market / compute vm creation

compute vm creation

Guides the planning, configuration, and provisioning of standalone Google Compute Engine virtual machines (VMs) and bare metal (-metal) instances using gcloud CLI commands or direct MCP tool execution. Use ONLY when the user wants to create, configure, or provision a new standalone Compute Engine VM or bare metal instance from conversational intents (hardware sizing, region selection, OS image, networking, security defaults). DO NOT read or use for Google Kubernetes Engine (GKE) Autopilot or Sta

skill★ 255330 dlgithubApache-2.0Install in CosmosUpstream Source

Documentation & Preview

--- name: compute-vm-creation description: >- Guides the planning, configuration, and provisioning of standalone Google Compute Engine virtual machines (VMs) and bare metal (-metal) instances using gcloud CLI commands or direct MCP tool execution. Use ONLY when the user wants to create, configure, or provision a new standalone Compute Engine VM or bare metal instance from conversational intents (hardware sizing, region selection, OS image, networking, security defaults). DO NOT read or use for Google Kubernetes Engine (GKE) Autopilot or Standard clusters, Kubernetes node pools or Pods, container orchestration, managing existing VMs, Managed Instance Groups (MIGs), or Instance Templates. metadata: version: "1.0.0" category: Compute

---

Compute Engine VM Creation

This skill provides an interactive, intent-based experience for provisioning standalone Google Compute Engine VM and bare metal (-metal) instances. It supports users ranging from beginners asking to "create a VM" to cloud engineers requiring customized infrastructure, mapping natural language intents to secure Compute Engine configurations grounded in the Golden Path.

> MCP Tools: list_instances, create_instance, get_instance_basic_info, > delete_instance, get_zone_operation, list_machine_types, > list_accelerator_types, list_images

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution. Never include attribution environment variables or User-Agent tags in generated scripts, Terraform, or copy-pasteable commands shown to the user.

---

Prerequisites

Ensure the following setup requirements are met before provisioning instances. Any host modifications (such as installing or updating the gcloud CLI, installing or configuring the Google Compute Engine MCP server, or modifying local environment configuration) must be explicitly approved by the user before execution.

Google Cloud SDK >= 480.0.0) only when executing live CLI commands. If missing or outdated, ask the user for explicit approval before installing or updating via Install the gcloud CLI.

(list_instances, create_instance, get_instance_basic_info, delete_instance, get_zone_operation, list_machine_types, list_accelerator_types, list_images), check whether the Compute Engine MCP tools are loaded in your active tool declarations, or ask the user for approval to configure the server following Use the Compute Engine MCP server.

billing account linked (required even when using Google Cloud Free Tier resources).

(gcloud auth login), application/MCP SDKs (gcloud auth application-default login), or service account credentials (GOOGLE_APPLICATION_CREDENTIALS).

Compute Engine API:

  gcloud config set project {project_id}
  gcloud services enable compute.googleapis.com

instances), roles/iam.serviceAccountUser (to attach {custom_service_account}), and roles/mcp.toolUser when invoking the Compute Engine MCP server.

gcloud compute ssh {vm_name} --zone={zone} --tunnel-through-iap requires roles/iap.tunnelResourceAccessor plus a VPC firewall rule allowing TCP 22 (or 3389 for RDP) from IAP's forwarding range 35.235.240.0/20 (see Use IAP for TCP forwarding).

Compute Engine service account. If {custom_service_account} does not yet exist, create a dedicated least-privilege service account first (seeking user approval before granting IAM bindings):

    gcloud iam service-accounts create {sa_name} \
      --project={project_id} \
      --display-name="{sa_display_name}"
    gcloud projects add-iam-policy-binding {project_id} \
      --member="serviceAccount:{sa_name}@{project_id}.iam.gserviceaccount.com" \
      --role="roles/logging.logWriter"
    gcloud projects add-iam-policy-binding {project_id} \
      --member="serviceAccount:{sa_name}@{project_id}.iam.gserviceaccount.com" \
      --role="roles/monitoring.metricWriter"

---

Workflow

  1. Determine Execution Method & MCP Capability Boundary:

user asks to configure or create a VM without providing mandatory inputs (project_id, vm_name, region/zone, or public vs. private networking), respond immediately after reading SKILL.md without running gcloud config list, gcloud --version, or any shell commands. Clarify that you can either execute provisioning once confirmed (Automated Execution) or provide copy-pasteable gcloud commands / JSON payloads (Manual Execution), recommend a sizing tier, and ask for the missing inputs in a single turn.

(list_instances, get_instance_basic_info, list_machine_types, list_accelerator_types, list_images, get_zone_operation) are ideal for read-only inspection. However, MCP create_instance (McpCreateInstanceRequest) accepts only eight flat top-level fields (project, zone, name, bare machineType, imageProject, imageFamily, guestAccelerators, maintenancePolicy) and hardcodes global/networks/default without --no-address, custom subnets, custom service accounts, Shielded VM flags, OS Login, Spot scheduling, or custom disk sizes/types. Route all hardened (--no-address, custom --subnet={subnet}, {custom_service_account}, Shielded VM, OS Login), Spot, custom-disk, 4th-gen Hyperdisk, and bare metal (-metal) creations to gcloud compute instances create (or REST instances.insert) rather than dropping security guardrails to fit create_instance. Use MCP create_instance only for default-VPC prototyping when default disk and service-account settings are explicitly acceptable.

  1. Gather Mandatory Inputs: ALWAYS ask the user for any missing inputs:

my-first-web-server).

you or your users reduces latency and makes things load faster."* Recommend us-central1 / us-central1-a if the user has no preference, and consult Regions and zones, GPU regions and zones, or Google Cloud locations only when verifying non-default regional availability):

     gcloud config set compute/region {region}
     gcloud config set compute/zone {zone}
  1. Conversational Triage (Sizing, Generation & OS): Map the user's workload

to the Intent-Based Sizing Tiers and hardware generation defaults:

C3 virtualized, and C2D; use debian-13 (debian-cloud) for 4th-gen (C4, N4, X4) and bare metal (c3-standard-192-metal, c4-standard-288-metal, where debian-12 is unsupported); use debian-12-arm64 / debian-13-arm64 for Arm C4A; and use common-cu129-ubuntu-2404-nvidia-580 (deeplearning-platform-release) for G2 GPUs. Consult Operating system details and Bare metal instances only when selecting non-default OS images or bare metal SKUs.

C4A, C4D, M4, X4, A4) and bare metal (-metal) instances where pd-* disks are rejected (N4 supports hyperdisk-balanced and hyperdisk-throughput, not hyperdisk-extreme; H3 supports pd-balanced and hyperdisk-balanced). Consult the *"Machine series support for Hyperdisk"* section of About Google Cloud Hyperdisk only for non-default disk types.

  1. Determine Network Accessibility & Subnet: ALWAYS ask in plain,

non-technical language whether the VM needs to be reachable from the public internet or kept private, noting that private networking (--no-address) is the security best practice—even when hosting a website or web app. Use --subnet={subnet} (verifying whether a custom/Shared VPC subnet or default VPC exists, since many enterprise projects enforce constraints/compute.skipDefaultNetworkCreation).

  1. Configure Security, OS Login & Service Accounts: Enable IAM-governed SSH

via --metadata=enable-oslogin=TRUE, recommend a custom least-privilege service account ({custom_service_account}), and enable Shielded VM flags (--shielded-secure-boot, --shielded-vtpm, --shielded-integrity-monitoring) on virtualized VMs (on standard x86 -metal bare metal instances, pass --no-shielded-secure-boot and omit vTPM/integrity flags).

  1. Summarize & Confirm (Mode-Aware): Present a clear summary of the proposed

VM configuration, cost profile, and architectural warnings:

before executing any mutating provisioning command or tool call (e.g.,

*"Would you like me to proceed with provisioning this configuration, or adjust any settings first?"*).

substitute any {snake_case} placeholders (such as {subnet} or {custom_service_account}) before running the command in their terminal; do not offer to execute provisioning when tools are disconnected or execution was forbidden.

  1. Execute or Deliver Payloads:

CLOUDSDK_METRICS_REQUEST_ATTRIBUTION per Usage Attribution) for hardened/Spot/4th-gen/ bare-metal configurations, or call MCP create_instance for default-VPC prototyping, tracking progress via get_zone_operation and verifying via get_instance_basic_info.

--quiet or attribution prefixes) or JSON payloads with clear instructions.

  1. Verify, Deliver Next Steps & Teardown Guidance: Provide post-provisioning

access steps (for example, via --tunnel-through-iap with gcloud compute ssh) and always include teardown instructions (omitting --quiet so interactive confirmation prevents accidental data loss; see [Delete a VM](https://docs.cloud.google.com/compute/docs/instances/de