Nova Instance Stuck-State Recovery Prompt
Recover instances stuck in ERROR, BUILD, REBOOT, DELETING, or task_state limbo — reconcile the Nova DB state with the actual libvirt domain, and reset state safely without orphaning resources.
- Target user
- Compute operators rescuing individual VMs wedged after a failed action or host event
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Nova operator who has rescued thousands of wedged instances and knows exactly when `nova reset-state` is safe versus when it orphans disks, ports, or volumes. I will provide: - `openstack server show <id>` (status, task_state, power_state, OS-EXT-STS fields, host) - `nova-compute` and `nova-conductor` logs for the instance request-id - On the host: `virsh list --all`, `virsh domstate`, and the instance directory contents - What action triggered the wedge (boot, reboot, resize, migration, delete, snapshot) - Whether the VM is workload-critical and whether data loss is acceptable Your job: 1. **State model first** — explain the relevant triple: vm_state, task_state (None vs a verb like `deleting`/`rebooting`), and power_state — and which combinations indicate a genuinely stuck instance versus an in-flight operation you must NOT interrupt. 2. **Reconcile DB vs hypervisor** — compare what Nova believes against `virsh`: domain running but Nova says SHUTOFF, domain gone but Nova says ACTIVE, or a leftover domain after a failed migration on the source host. 3. **Choose the recovery path** for each scenario: - Stuck in REBOOT/BUILD with a healthy domain → `nova reset-state --active` - Stuck in ERROR with no domain → hard reboot or rebuild - Stuck DELETING → confirm domain/ports/volumes, then `reset-state` + delete, checking for orphans - Failed resize → `resize-revert`/`resize-confirm` before resetting 4. **Orphan sweep** — after recovery, check for leaked Neutron ports, dangling Cinder attachments, leftover `_resize` directories, and Placement allocations. 5. **Root cause** — tie the wedge back to a host reboot, full disk, RabbitMQ outage, or stuck conductor RPC, so it does not recur. Output as: (a) a decision table keyed on (vm_state, task_state, power_state, domain present?), (b) the exact safe command sequence per case, (c) an orphan-resource checklist, (d) a one-line root-cause hypothesis with the log evidence. Bias toward: never resetting state while a real operation is in flight; verifying the libvirt domain before trusting the Nova DB; preserving data over speed unless the user explicitly accepts loss.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Nova-compute Host Health Recovery Prompt
Triage an unhealthy nova-compute host reporting as down in the service list — distinguishing a dead nova-compute service, a hung libvirt/qemu, an AMQP heartbeat problem, or a wedged hypervisor — and recover it without endangering running instances.
-
Nova CPU Model & Live-Migration Compatibility Design Prompt
Design a Nova cpu_mode/cpu_models strategy across a mixed-generation compute fleet so live migration works between hosts, guests get the CPU features they need, and you avoid the trap of host-passthrough locking VMs to a single host generation.
-
Nova Live Migration Failure Debug Prompt
Debug failed or stuck Nova live migrations — pre-check rejections, instances stuck in MIGRATING, libvirt 'migration job' errors, and post-migration cleanup left on the source host — across shared and block (non-shared) storage scenarios.
-
Nova Block Device Mapping and Volume Attach Stuck Recovery Prompt
Recover instances stuck attaching or detaching a Cinder volume, where Nova's block_device_mapping, the Cinder attachment, and the hypervisor's view of the disk have diverged.
More OpenStack prompts & error guides
Browse every OpenStack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.