スキル一覧に戻る
abl030

vm-ops

by abl030

1🍴 2📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: vm-ops description: Safe VM operations (start, stop, destroy) via protected wrapper script

VM Operations Skill

CRITICAL SAFETY RULE

NEVER run Proxmox commands directly via SSH.

Always use the wrapper script vms/proxmox-ops.sh which:

  • Checks VMIDs against the readonly list before ANY destructive operation
  • Protects production VMs (104, 109) from accidental modification
  • Provides consistent error handling and logging

Protected VMs (READONLY)

These VMIDs are protected and the wrapper will REFUSE operations on them:

VMIDNamePurpose
104doc1Main services VM - Docker workloads
109igpMedia transcoding with iGPU passthrough
110devDevelopment VM

If you need to manage these VMs, they must be moved from imported to managed in vms/definitions.nix first.

Commands

View Operations (safe, no protection needed)

# List all VMs
./vms/proxmox-ops.sh list

# Get VM status
./vms/proxmox-ops.sh status <vmid>

# Get VM configuration
./vms/proxmox-ops.sh config <vmid>

# Get VM IP address
./vms/proxmox-ops.sh get-ip <vmid>

# Get storage status
./vms/proxmox-ops.sh storage

# Get next available VMID
./vms/proxmox-ops.sh next-vmid [start] [end]

Lifecycle Operations (protected)

# Start VM
./vms/proxmox-ops.sh start <vmid>

# Stop VM (immediate)
./vms/proxmox-ops.sh stop <vmid>

# Shutdown VM (graceful)
./vms/proxmox-ops.sh shutdown <vmid>

# Destroy VM (requires explicit confirmation)
./vms/proxmox-ops.sh destroy <vmid> yes

Configuration Operations (protected)

# Configure CPU/RAM
./vms/proxmox-ops.sh configure <vmid> <cores> <memory_mb>

# Resize disk
./vms/proxmox-ops.sh resize <vmid> <disk> <size>
# Example: ./vms/proxmox-ops.sh resize 110 scsi0 +10G

# Create disk
./vms/proxmox-ops.sh create-disk <vmid> <size> [storage] [disk]

SSH Operations

# Wait for SSH to become available
./vms/proxmox-ops.sh wait-ssh <ip> [timeout] [user]
# Example: ./vms/proxmox-ops.sh wait-ssh 192.168.1.163 120 abl030

Serial Console

# Stream serial console (interactive when run in a real TTY)
./vms/proxmox-ops.sh console <vmid>

Examples

Restart a managed VM

./vms/proxmox-ops.sh stop 110
./vms/proxmox-ops.sh start 110

Check if a VM is running

./vms/proxmox-ops.sh status 110
# Output: status: running

Stream VM serial console

./vms/proxmox-ops.sh console 9003

Destroy a test VM

# This will FAIL on protected VMIDs (104, 109)
./vms/proxmox-ops.sh destroy 110 yes

Attempting operation on protected VM

./vms/proxmox-ops.sh stop 104
# ERROR: VMID 104 is marked as READONLY (imported).
# Operation 'stop' is not allowed on imported VMs.

What NOT to Do

WRONG - Direct SSH command:

ssh root@192.168.1.12 "qm stop 104"  # DANGEROUS - bypasses protection!

RIGHT - Use wrapper:

./vms/proxmox-ops.sh stop 104  # Will be blocked with clear error

VMID Ranges

RangePurpose
100-199Production VMs
200-299LXC containers
9000-9999Templates
FilePurpose
vms/proxmox-ops.shWrapper script (USE THIS)
vms/definitions.nixVM definitions, readonly flags

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です