| name | oraclecloud-debug-bundle |
| description | Collect OCI instance diagnostics — serial console, cloud-init logs, metadata, and VCN flow logs — into a single debug bundle.
Use when an OCI instance is unresponsive, stuck in provisioning, or showing infrastructure errors.
Trigger with "oraclecloud debug bundle", "oci diagnostics", "oci serial console", "oci instance debug".
|
| allowed-tools | Read, Write, Edit, Bash(oci:*), Bash(python3:*), Grep |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","oraclecloud","oci"] |
| compatibility | Designed for Claude Code |
Oracle Cloud Debug Bundle
Overview
Collect comprehensive diagnostics from an unresponsive OCI compute instance without touching the OCI Console. When an instance reports "unavailable due to an issue with the underlying infrastructure" or cloud-init failures, you need serial console output, cloud-init logs, instance metadata, and VCN flow logs — all gathered via CLI commands into a single tar archive for root-cause analysis or support ticket attachment.
Purpose: Generate a self-contained debug bundle (.tar.gz) with all the data OCI Support will ask for, collected in under 60 seconds.
Prerequisites
- OCI CLI installed and configured —
oci --version returns 3.x+, ~/.oci/config is valid (see oraclecloud-install-auth)
- Python 3.8+ with the OCI SDK —
pip install oci
- Compartment OCID — the compartment containing the target instance
- Instance OCID — format:
ocid1.instance.oc1.{region}.aaaa...
- IAM policies granting
inspect instance-console-histories, read instances, read vcn-flow-logs in the target compartment
Instructions
Step 1: Set Target Variables
export INSTANCE_OCID="ocid1.instance.oc1.iad.YOUR_INSTANCE_OCID"
export COMPARTMENT_OCID="ocid1.compartment.oc1..YOUR_COMPARTMENT_OCID"
export BUNDLE_DIR="oci-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
Step 2: Capture Instance Metadata
oci compute instance get \
--instance-id "$INSTANCE_OCID" \
--query 'data.{state:"lifecycle-state",shape:shape,ad:"availability-domain",created:"time-created",fault:"fault-domain"}' \
--output json > "$BUNDLE_DIR/instance-metadata.json"
echo "Instance state: "