Create VM Skill
Create a new NixOS VM on the configured backend.
Instructions
Step 1: Determine Backend
Read the .env file to determine which backend is configured (libvirt or proxmox).
Step 2: Get Available Profiles
Run just list-profiles to get the list of available profiles. Use this to populate the profile selection.
Step 3: Gather VM Settings
Ask the user for the following settings:
Name (required) - Free text input, single word VM name. Do not offer multiple choice, let them type it.
VMID (Proxmox only) - If the backend is
proxmox, ask whether to use automatic or manual VMID:- Automatic (recommended) - Let Proxmox allocate the next available VMID
- Manual - Type a specific VMID (integer, typically 100-999999)
Skip this question entirely for libvirt backend.
Profile - Multiple choice from the output of
just list-profiles. Common profiles:core- Base system with SSH (recommended for most uses)docker- Core + Dockerdev- Development environment with Docker and Podman
Memory - RAM in MB. Offer choices:
- 1024 (1 GB)
- 4096 (4 GB)
- 8192 (8 GB)
- Or type a custom value
vCPUs - Number of virtual CPU cores. Offer choices:
- 1
- 2
- 4
- Or type a custom value (any integer >= 1)
Var Size - Size of /var partition in gigabytes. Offer choices:
- 20
- 50
- 100
- Or type a custom value (any integer >= 1)
Network - Depends on the backend:
- libvirt: Offer
natorbridge - proxmox: Offer
bridge:vmbr0,bridge:vmbr1, or type custom
- libvirt: Offer
Step 4: Create the VM
Run the create command:
just create {NAME} {PROFILE} {MEMORY} {VCPUS} {VAR_SIZE} {NETWORK}
For var_size, append G to the number (e.g., 20G, 50G).
Proxmox with manual VMID: If the user specified a manual VMID, prefix the command with the PVE_VMID environment variable:
PVE_VMID={VMID} just create {NAME} {PROFILE} {MEMORY} {VCPUS} {VAR_SIZE} {NETWORK}
Step 5: Report Results
Tell the user the VM has been created and provide:
- The VM name
- How to start it:
just start {NAME} - How to check status:
just status {NAME} - How to SSH into it:
just ssh {NAME}orjust ssh admin@{NAME}
Converted and distributed by TomeVault — claim your Tome and manage your conversions.