一键导入
recreate-vm
Recreate a VM from its existing machine config. Use when user wants to rebuild a destroyed VM or reset a VM to fresh state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Recreate a VM from its existing machine config. Use when user wants to rebuild a destroyed VM or reset a VM to fresh state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Set up a new nixos-vm-template context for managing VMs on a hypervisor (libvirt, proxmox KVM, or proxmox-lxc containers). Use this when the user wants to configure a new VM management context, create an alias, or set up environment variables for a backend.
Completely remove a VM including its machine config. Use when user wants to permanently delete everything about a VM.
Create a new NixOS VM on the configured backend (libvirt or proxmox). Use this when the user wants to create a new virtual machine.
Create or restore VM backups. Use for full VM backups that can survive VM destruction.
Clone an existing VM to create a new VM with copied /var data but fresh identity.
Destroy a VM and its disks. Use when user wants to remove a VM but keep its machine config for later recreation.
| name | recreate-vm |
| description | Recreate a VM from its existing machine config. Use when user wants to rebuild a destroyed VM or reset a VM to fresh state. |
| allowed-tools | Read, Bash, AskUserQuestion |
Recreate a VM from its existing machine configuration. This destroys current disks and creates fresh ones.
Run just list-machines to show existing machine configs. Ask which VM to recreate.
IMPORTANT: Warn the user clearly:
Ask for explicit confirmation.
Ask if they want to customize:
Var Size - Size of /var partition (default: 30G). Offer choices:
Network - Network configuration (optional, uses existing config if not specified)
Run:
yes | just recreate {NAME} {VAR_SIZE}
Or with network:
yes | just recreate {NAME} {VAR_SIZE} {NETWORK}
The yes | is required to bypass the interactive confirmation prompt.
For var_size, append G to the number (e.g., 30G, 50G).
Confirm the VM was recreated and is running. Provide:
just status {NAME}just ssh {NAME} or just ssh admin@{NAME}