Agent skill
extend-vm-storage
Extend disk storage on a Kubernetes node VM (Proxmox-hosted). Use when: (1) User wants to increase disk space on a k8s node VM, (2) A node is running low on disk, (3) User says "extend storage" or "add disk space". Automates: drain → shutdown → resize → boot → expand filesystem → uncordon.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/extend-vm-storage
SKILL.md
Extend VM Storage Skill
Purpose: Extend disk storage on a Kubernetes node VM (Proxmox-hosted).
When to use: User wants to increase disk space on a k8s node VM, or a node is running low on disk.
Workflow
1. Identify the Node
Ask the user which node needs more storage and how much to add.
Valid nodes: k8s-master, k8s-node1, k8s-node2, k8s-node3, k8s-node4
2. Run the Script
./scripts/extend_vm_storage.sh <node-name> <size-increment>
Example:
./scripts/extend_vm_storage.sh k8s-node2 +64G
3. What the Script Does
- Validates inputs (node name and size format)
- Resolves node IP via kubectl
- Prompts for confirmation
- Drains the node (evicts pods)
- Shuts down the VM in Proxmox
- Resizes the disk (
scsi0) by the given increment - Starts the VM and waits for SSH
- Expands the filesystem inside the guest (auto-detects LVM vs direct partition)
- Uncordons the node
- Shows verification output (
df -hand node status)
4. Update Terraform (if needed)
If you want Terraform to reflect the new disk size, update the VM definition in main.tf or modules/create-vm/ so that a future terraform apply doesn't revert the change. Check if the VM disk size is managed by Terraform:
grep -A5 "disk" main.tf | grep -i size
If managed, update the size value to match the new total.
5. Verification
After the script completes, verify:
kubectl --kubeconfig $(pwd)/config get nodes
ssh wizard@<node-ip> "df -h /"
Recovery
If the script fails mid-way:
- Check VM status:
ssh [email protected] "qm status <vmid>" - Start VM if stopped:
ssh [email protected] "qm start <vmid>" - Uncordon node:
kubectl --kubeconfig $(pwd)/config uncordon <node-name>
Constants
| Setting | Value |
|---|---|
| Proxmox host | [email protected] |
| VM SSH user | wizard |
| Disk name | scsi0 |
| Shutdown timeout | 300s |
| SSH wait timeout | 300s |
Questions to Ask User
- Which node needs more storage?
- How much storage to add? (e.g., +64G)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?