Diagnose GKE TPU VM instances stuck in Compute Engine repair (REPAIRING state) after host errors, maintenance events, or faulty host reports in single-host, multi-host, dynamic slicing, and TPU All Capacity mode node pools. Use when TPU instances in a slice node pool remain in REPAIRING, host error events appear in audit logs, or TPU slices are unschedulable due to a VM in repair. Don't use for nodes reporting Ready: Unknown when no VM is in REPAIRING (use gke-ai-troubleshooting-node-unresponsive-timeout), other NotReady nodes when no VM is in REPAIRING (use gke-node-notready), Pending Pods when all nodes are Ready (use gke-workload-troubleshooting), JobSet preemption events (use gke-ai-troubleshooting-jobset-interruption), or Slice custom resource lifecycle failures (use gke-ai-troubleshooting-tpu-dynamic-slices-monitoring).
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
REPAIRING)This skill checks the VM status, the host events, and the GKE repair status, and routes recovery through GKE instead of direct Compute Engine changes.
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vm-repair-stuck)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-vm-repair-stuck) to User-Agent headers.
gcloud (which covers authentication and
project selection), follow
Before you begin.kubectl and required plugins, follow
Install kubectl
and
Install required plugins.gcloud and enable the Google Kubernetes Engine API
(container.googleapis.com), ensure the Compute Engine API
(compute.googleapis.com) and Cloud Logging API (logging.googleapis.com)
are enabled, and follow
Store cluster information for kubectl
to configure kubectl cluster credentials.roles/container.viewer)roles/compute.viewer)roles/logging.viewer)roles/container.clusterAdmin)REPAIRING state")Read-only rule: Run read-only diagnostic commands only. Never drain, delete, or re-create nodes, or run any other command that changes the cluster. Give the user any fix to apply themselves.
When you recommend a fix, link the doc section that describes it.
[Low Risk]Collect the target parameters:
{project_id}: Google Cloud project ID{cluster_name}: GKE cluster name{location}: Cluster region or zone{cluster_mode}: Cluster mode (Autopilot or Standard){tpu_version}: TPU version (such as Ironwood tpu7x, TPU v6e, v5p, v5e, or
v4) and whether the node pool is a single-host or multi-host TPU slice node
pool{nodepool_name}: TPU node pool name{group_name} and {zone}: Name and zone of the managed instance group (MIG)
that backs the node pool:
{nodepool_name} and read its instanceGroupUrls field (see
Resource: NodePool).{nodepool_name} isn't known), follow
List MIGs
to list the managed instance groups in {project_id} and find
{group_name} and {zone}.{instance_name}: Affected TPU VM name, if known. If the user doesn't know
{instance_name}, Step 1 finds the instances in REPAIRING.{issue_time}: Incident timestamp in RFC3339 UTC, if known[Low Risk]To list the instances in {group_name} with their status (STATUS /
instanceStatus) and current action (ACTION / currentAction), follow the
instructions in
Check the status of managed instances.
STATUS (instanceStatus) is REPAIRING: Compute Engine is repairing
the VM because it encountered an internal error or its host server is
unavailable due to maintenance. The VM can't be used during the repair. See
REPAIRING state.
Record {instance_name} and proceed to Step 2.REPAIRING (every instance reports RUNNING with
ACTION NONE, or an instance reports another status or action such as
ACTION RECREATING, which means "The instance is being replaced" per
Check the status of managed instances):
Check each node's status and conditions following
Check the node's status and conditions
and hand off to the matching sibling skill:
Ready condition is Unknown (NodeStatusUnknown), hand off
to gke-ai-troubleshooting-node-unresponsive-timeout.Ready for another reason, hand off to
gke-node-notready.Ready (per
Repair criteria,
"A node reporting a Ready status is considered healthy") but the
workload's Pods are still Pending, hand off to
gke-workload-troubleshooting.[Low Risk]To list the system events for {instance_name} around {issue_time}, follow
the instructions in the section
Querying Cloud Audit Logs.
Compare the method field with the table in the
Reviewing Cloud Audit Logs
section of the same document:
compute.instances.hostError,
compute.instances.terminateOnHostMaintenance, or
compute.instances.automaticRestart: Record the matching system event log
entries and timestamps, and continue to Steps 3 and 4.compute.instances.preempted: Compute Engine preempted a Spot VM or
preemptible VM. If the affected workload is a JobSet, hand off to
gke-ai-troubleshooting-jobset-interruption. Otherwise, follow
Confirm node preemption.REPAIRING in Step 1 (or a method such as
compute.instances.reportHostAsFaulty appears), continue to Steps 3 and 4.[Low Risk]Follow
Check the node's status and conditions
to check the status and conditions of the nodes in the cluster and match
{instance_name} using the node's ProviderID field. To filter nodes to
{nodepool_name}, use the cloud.google.com/gke-nodepool node label documented
in
Deploy a Pod to a specific node pool.
{instance_name} reports Ready (per
Repair criteria,
"A node reporting a Ready status is considered healthy") and the VM is no
longer in REPAIRING, proceed to Step 5, item 4.{nodepool_name} uses
dynamic slicing, see
Requirements:
dynamic slicing requires a Standard cluster, Ironwood (tpu7x), and All
Capacity mode reservations. For a Standard cluster with Ironwood (tpu7x),
check whether the node has cloud.google.com/gke-accelerator-topology-mode: PROVISION_ONLY as shown in step 2 of
Verify the status of the nodes and the partitions
(per
Key characteristics of dynamic slicing configurations,
"dynamic slicing uses incremental provisioning"). Per
Hardware maintenance and failures,
"If you trigger customer-initiated maintenance or if a hardware failover
occurs, only the targeted nodes are affected rather than the entire node
pool." For an active dynamic sub-slice, the Slice custom resource
transitions to FAILED and the scheduler attempts to re-create the slice on
other available healthy nodes. Check the Slice status following
Monitor the status of the Slice custom resource;
if the Slice custom resource is in FAILED or another non-active state,
hand off Slice troubleshooting to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring alongside checking
the VM repair in Step 4.NotReady, and the node
pool's status doesn't change to ERROR.[Low Risk]Find out whether GKE or Compute Engine is repairing the node:
autoRepair is enabled on {nodepool_name}.autoRepair is enabled and no repair operation has appeared yet, check
how long the node has been unhealthy (from {issue_time} or the Ready
condition's LastTransitionTime in Step 3). Per
Repair criteria,
GKE initiates a repair when a node reports a NotReady status, or doesn't
report any status at all, over a given time threshold of approximately 10
minutes. If the node has reported NotReady (or no status) for less than
approximately 10 minutes, check the operation history again after that
threshold has passed. If it has been longer than approximately 10 minutes
and there is still no repair operation (and no All Capacity mode faulty
host report in item 3), escalate in Step 5, item 3.REPAIRING, and "The host repair process can take between 3 and 14 days,
or longer." Before escalating a VM in REPAIRING in an All Capacity mode
reservation, follow
Review report faulty host operations
to check for a compute.instances.reportHostAsFaulty operation on
{instance_name}.[High Risk]Guardrails:
- Never change GKE-managed instance groups or VMs directly through Compute Engine, for example with
gcloud compute instances deleteorgcloud compute instance-groups managedcommands that change the group. Manage the node pool through GKE.- Never run
kubectl delete nodeon nodes in the node pool. Per Settings for Autopilot and Standard, if you usekubectlto delete an unhealthy node when auto-repair is disabled, the underlying VM might become orphaned from the cluster, and you would continue to be billed for it.
autoRepair is disabled on {nodepool_name}, link the user (who needs
the Kubernetes Engine Cluster Admin role, roles/container.clusterAdmin)
to
Enable auto-repair for an existing Standard node pool
and
Configure auto repair for TPU slice nodes
so they can apply the change themselves.Slice custom resources fail to form
or remain FAILED, hand off to
gke-ai-troubleshooting-tpu-dynamic-slices-monitoring.compute.instances.reportHostAsFaulty operation for
{instance_name} (tracked via
Review report faulty host operations),
do not escalate the VM as stuck. Tell the user that per
Understand the faulty host report process,
the VM stops during the repair and restarts on the same host after the
repair is complete, and "The host repair process can take between 3 and 14
days, or longer."REPAIRING (and isn't waiting on a 3-to-14-day All
Capacity mode faulty host repair), if the node has been NotReady (or
reported no status) for longer than the ~10-minute threshold in
Repair criteria
with autoRepair enabled and no repair operation in Step 4, or if the
operation history shows a failed repair that isn't caused by quota, direct
the user to
Before you contact support
and
Recommendations for efficient support
to contact Cloud Customer Care. In addition to the details listed in
Recommendations for efficient support,
include the node pool name, instance name, the system event log entries
from Step 2, and the repair operation name from Step 4.{group_name} reports RUNNING with action NONE, and every node in
{nodepool_name} is Ready.RUNNING with action NONE (or another status or
action) and a node still isn't Ready, follow the handoffs in Step 1
(gke-ai-troubleshooting-node-unresponsive-timeout or
gke-node-notready) or escalate to Cloud Customer Care in item 3 of this
step.Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /gke-ai-troubleshooting-tpu-vm-repair-stuck in Claude Code or $gke-ai-troubleshooting-tpu-vm-repair-stuck in Codex.
The description says when to use it:
Use when TPU instances in a slice node pool remain in REPAIRING, host error events appear in audit logs, or TPU slices are unschedulable due to a VM in repair.
Copy the gke-ai-troubleshooting-tpu-vm-repair-stuck folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-vm-repair-stuck .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if gke-ai-troubleshooting-tpu-vm-repair-stuck does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/gke-ai-troubleshooting-tpu-vm-repair-stuck .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for gke-ai-troubleshooting-tpu-vm-repair-stuck and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
gke-ai-troubleshooting-tpu-vm-repair-stuck ships 2 files, 25.6 KB in total. Select a file to load it from GitHub.