Skip to main content

Minimega

@nblair2/minimegav2026.05.30.1· 1d agoMODELS
01README

Full minimega control via its command socket (or minimega -e), split into eight models — vm, vmconfig, namespace, network, cc, disk, mesh and host: VM lifecycle (launch/start/stop/kill, info, tags, net, screenshots), the launch config template, namespaces and the scheduler, networking (bridges, taps, VLANs, QoS, captures, router, dnsmasq), command-and-control (miniccc), disk images, the mesh/deploy fabric, and host/system ops (host, check, version, files, vnc, logging) plus a generic command passthrough.

02Models8
@nblair2/minimega/vmv2026.05.30.1vm.ts
fn vm_info()
List all VMs (`vm info`), storing each as a `vm` resource
fn vm_launch(type: enum, names: string)
Launch (or, in namespace mode, queue) VMs of a type from the active
ArgumentTypeDescription
typeenumVM type to launch
namesstringVM name(s) or a count (e.g. 'web-1', 'web[1-10]', or '10')
fn vm_launch_flush()
Flush the namespace's queued launches (bare `vm launch`)
fn vm_start(target: string)
Start (boot/resume) the selected VM(s)
ArgumentTypeDescription
targetstringVM selector: a name, id, range (e.g. vm[0-9]), or 'all'
fn vm_stop(target: string)
Stop (pause) the selected VM(s)
ArgumentTypeDescription
targetstringVM selector: a name, id, range (e.g. vm[0-9]), or 'all'
fn vm_kill(target: string)
Kill the selected VM(s)
ArgumentTypeDescription
targetstringVM selector: a name, id, range (e.g. vm[0-9]), or 'all'
fn vm_flush()
Remove all VMs in the QUIT or ERROR state (`vm flush`)
fn vm_save(name: string, target: string)
Save the selected VM(s)' configuration under a name
ArgumentTypeDescription
namestringName to save the VM configuration under
targetstringVM selector to save the config of
fn vm_screenshot(vm: string, max?: number)
Capture a PNG screenshot of a VM's console
ArgumentTypeDescription
vmstringVM name or id
max?numberMaximum image dimension in pixels (scales the screenshot down)
fn vm_top()
Read live per-VM resource usage (`vm top`)
fn vm_tag(vm: string, key?: string, value?: string)
Get or set a VM tag: with a value sets it; with only a key reads it;
ArgumentTypeDescription
vmstringVM name or id
key?stringTag key; omit to read all tags
value?stringTag value to set; omit (with key) to read a single tag
fn vm_net_connect(vm: string, index: number, vlan: string)
Connect a VM interface to a VLAN at runtime
ArgumentTypeDescription
vmstringVM name or id
indexnumberInterface index to connect
vlanstringVLAN id or alias to connect the interface to
fn vm_net_disconnect(vm: string, index: number)
Disconnect a VM interface from its VLAN at runtime
ArgumentTypeDescription
vmstringVM name or id
indexnumberInterface index to disconnect
fn vm_cdrom(action: enum, vm: string, path?: string)
Eject or change a VM's cdrom image
ArgumentTypeDescription
actionenumEject or change the cdrom
vmstringVM name or id
path?stringImage path (required for 'change')
fn vm_hotplug(action: enum, vm: string, file?: string, id?: string)
Add, remove, or show hotplug devices on a VM
ArgumentTypeDescription
actionenumHotplug operation
vmstringVM name or id
file?stringDisk/USB file path (for 'add')
id?stringDevice id, or 'all' (for 'remove')
fn vm_qmp(vm: string, command: string)
Send a raw QMP command to a KVM VM
ArgumentTypeDescription
vmstringVM name or id
commandstringRaw QMP JSON command (e.g. {"execute":"query-status"})

Resources

vm(infinite)— A minimega VM and its current state (from `vm info`)
operation(7d)— Outcome of a one-shot VM action (launch, power, tag, net, qmp, etc.)
@nblair2/minimega/vmconfigv2026.05.30.1vmconfig.ts
fn config_show()
Read the active `vm config` launch template
fn config_set(memory?: number, cores?: number, sockets?: number, threads?: number, cpu?: string, machine?: string, snapshot?: boolean, disks?: string, kernel?: string, initrd?: string, append?: string, cdrom?: string, networks?: string, uuid?: string, vga?: string, schedule?: string, coschedule?: number, colocate?: string, filesystem?: string, hostname?: string, init?: string)
Set one or more common vm config fields (memory, cores, disks,
ArgumentTypeDescription
memory?numberMemory in MB
cores?numbervCPU cores
sockets?numberCPU sockets
threads?numberThreads per core
cpu?stringQEMU CPU model (e.g. host, qemu64)
machine?stringQEMU machine type
snapshot?booleanRun disks in snapshot mode
disks?stringDisk image(s), space-separated (e.g. 'a.qcow2 b.qcow2')
kernel?stringKernel image path
initrd?stringInitrd image path
append?stringKernel command-line append string
cdrom?stringCD-ROM image path
networks?stringNetwork interface spec(s), space-separated (e.g. '100 200')
uuid?stringUUID to assign the VM
vga?stringVGA device type
schedule?stringPin the next VM to a host
coschedule?numberMax VMs to co-schedule on the same host (-1 for unlimited)
colocate?stringCo-locate with another VM
filesystem?stringContainer root filesystem path
hostname?stringContainer hostname
init?stringContainer init command
fn config_set_field(field: string, value: string)
Set an arbitrary vm config field (`vm config <field> <value>`) — the
ArgumentTypeDescription
fieldstringvm config subcommand/field name (e.g. 'serial-ports', 'qemu-append')
valuestringValue(s) to set (space-separated for lists)
fn config_save(name: string)
Save the active config under a name (`vm config save`)
ArgumentTypeDescription
namestringSaved-config name
fn config_restore(name: string)
Restore a saved config into the active template
ArgumentTypeDescription
namestringSaved-config name
fn config_clone(vm: string)
Clone a running VM's configuration into the active template
ArgumentTypeDescription
vmstringVM to copy the configuration from
fn config_clear()
Reset the active vm config to defaults (`clear vm config`)

Resources

vmConfig(infinite)— The active vm config launch template for the namespace
operation(7d)— Outcome of a one-shot vm config change (set/save/clear/etc.)
@nblair2/minimega/namespacev2026.05.30.1namespace.ts
fn namespace_info()
Read the active namespace's settings (`ns`)
fn namespace_active()
Show the daemon's currently active namespace (`namespace`)
fn namespace_create(name: string)
Create and activate a namespace (`namespace <name>`)
ArgumentTypeDescription
namestringNamespace name
fn namespace_delete(name: string)
Delete a namespace and its VMs (`clear namespace <name>`)
ArgumentTypeDescription
namestringNamespace name
fn ns_hosts()
List the namespace's member hosts (`ns hosts`)
fn ns_add_hosts(hosts: string)
Add host(s) to the namespace (`ns add-hosts`)
ArgumentTypeDescription
hostsstringHost(s) to add/remove, as a name or range (e.g. 'ccc[1-10]')
fn ns_del_hosts(hosts: string)
Remove host(s) from the namespace (`ns del-hosts`)
ArgumentTypeDescription
hostsstringHost(s) to add/remove, as a name or range (e.g. 'ccc[1-10]')
fn ns_load(metric?: enum)
Read or set the scheduler load metric (`ns load`)
ArgumentTypeDescription
metric?enumScheduler load metric to set; omit to read the current value
fn ns_queueing(enabled: boolean)
Enable or disable VM launch queueing (`ns queueing`)
ArgumentTypeDescription
enabledbooleanWhether to queue VMs instead of launching
fn ns_queue()
Show the queued (not-yet-scheduled) VMs (`ns queue`)
fn ns_schedule(dryRun?: boolean)
Schedule (or dry-run) the queued VMs across hosts
ArgumentTypeDescription
dryRun?booleanPreview the placement without launching
fn ns_run(command: string)
Run a minimega command on every namespace host (`ns run`)
ArgumentTypeDescription
commandstringminimega command to run on every host
fn ns_bridge(bridge: string, netmask?: string)
Configure the namespace's tunnel bridge (`ns bridge`)
ArgumentTypeDescription
bridgestringTunnel bridge name for the namespace
netmask?stringOptional bridge netmask

Resources

namespace(infinite)— A minimega namespace and its settings (from `ns`)
operation(7d)— Outcome of a one-shot namespace/scheduler action (hosts, load,
@nblair2/minimega/networkv2026.05.30.1network.ts
fn bridge_info()
List OpenVSwitch bridges (`bridge`)
fn tap_list()
List host taps (`tap`)
fn tap_create(vlan: string, bridge?: string, ip?: string, name?: string)
Create a host tap on a VLAN (`tap create`)
ArgumentTypeDescription
vlanstringVLAN id or alias to attach the tap to
bridge?stringBridge to create the tap on
ip?stringTap IP: 'dhcp' or a CIDR address (e.g. 10.0.0.1/24)
name?stringExplicit tap interface name
fn tap_delete(tap: string)
Delete a host tap (`tap delete`)
ArgumentTypeDescription
tapstringTap name to delete, or 'all'
fn vlans_list()
List VLAN aliases (`vlans`)
fn vlans_add(alias: string, vlan: string)
Add a VLAN alias (`vlans add`)
ArgumentTypeDescription
aliasstringHuman-readable VLAN alias
vlanstringNumeric VLAN id
fn vlans_clear(alias?: string)
Remove a VLAN alias, or all of them (`clear vlans`)
ArgumentTypeDescription
alias?stringAlias to clear; omit to clear all
fn qos_add(tap: string, property: enum, value: string)
Apply a QoS constraint to a tap (`qos add`)
ArgumentTypeDescription
tapstringTap interface to shape
propertyenumQoS property
valuestringValue: loss '%', delay duration (e.g. 50ms), or rate (e.g. 10mbit)
fn qos_clear(tap: string)
Remove QoS constraints from a tap (`clear qos`)
ArgumentTypeDescription
tapstringTap interface to clear QoS on
fn capture_list()
List active captures (`capture`)
fn capture_pcap(mode: enum, name: string, filename: string, interface?: number)
Start a pcap capture on a VM interface or a bridge
ArgumentTypeDescription
modeenumCapture a VM interface or a bridge
namestringVM name or bridge name
filenamestringOutput pcap file path
interface?numberInterface index (required for mode=vm)
fn capture_netflow(bridge: string, filename: string, mode: enum)
Start a netflow capture on a bridge
ArgumentTypeDescription
bridgestringBridge to capture netflow on
filenamestringOutput file path
modeenumRecord format
fn capture_clear()
Stop and clear all captures (`clear capture`)
fn router_show(vm: string)
Show a router VM's configuration (`router <vm>`)
ArgumentTypeDescription
vmstringRouter VM name
fn router_config(vm: string, statement: string)
Apply a configuration statement to a router VM
ArgumentTypeDescription
vmstringRouter VM name
statementstringRouter statement (e.g. 'interface 0 10.0.0.1/24', 'dhcp 10.0.0.0 ...')
fn router_commit(vm: string)
Commit a router VM's pending configuration
ArgumentTypeDescription
vmstringRouter VM name
fn dnsmasq_list()
List running dnsmasq servers (`dnsmasq`)
fn dnsmasq_start(listen?: string, low?: string, high?: string)
Start a dnsmasq DHCP/DNS server (`dnsmasq start`)
ArgumentTypeDescription
listen?stringIP to listen on
low?stringDHCP range low address
high?stringDHCP range high address
fn dnsmasq_configure(id: string, option: string)
Add a configuration directive to a dnsmasq server
ArgumentTypeDescription
idstringdnsmasq server id
optionstringConfiguration directive (e.g. 'dhcp-option ...', 'dns <ip> <host>')

Resources

bridge(infinite)— An OpenVSwitch bridge (from `bridge`)
tap(infinite)— A host tap interface (from `tap`)
vlan(infinite)— A VLAN alias (from `vlans`)
capture(infinite)— An active packet capture (from `capture`)
operation(7d)— Outcome of a one-shot networking action (tap/vlan/qos/capture/
@nblair2/minimega/ccv2026.05.30.1cc.ts
fn cc_clients()
List connected cc clients (`cc clients`)
fn cc_commands()
List queued cc commands (`cc commands`)
fn cc_exec(command: string)
Run a command on matching clients (`cc exec`)
ArgumentTypeDescription
commandstringCommand to run on matching clients
fn cc_background(command: string)
Run a command in the background on matching clients
ArgumentTypeDescription
commandstringCommand to run on matching clients
fn cc_send(file: string)
Queue a file to send to matching clients (`cc send`)
ArgumentTypeDescription
filestringFile path (relative to the cc file root)
fn cc_recv(file: string)
Queue a file to receive from matching clients (`cc recv`)
ArgumentTypeDescription
filestringFile path (relative to the cc file root)
fn cc_filter(filter?: string)
Read or set the cc client filter (`cc filter`)
ArgumentTypeDescription
filter?stringClient filter to set (e.g. 'os=linux', 'tag=role:web'); omit to read
fn cc_responses(id: string)
Read command responses (`cc responses <id|all>`)
ArgumentTypeDescription
idstringCommand id to read responses for, or 'all'
fn cc_prefix(prefix?: string)
Read or set the cc command prefix (`cc prefix`)
ArgumentTypeDescription
prefix?stringCommand prefix to set; omit to read
fn cc_process(action: enum, target: string)
List or kill processes on clients (`cc process`)
ArgumentTypeDescription
actionenumList or kill processes
targetstringVM/'all' (for list) or PID (for kill)
fn cc_tunnel(uuid: string, src: number, host: string, dst: number)
Open a forward tunnel through a client (`cc tunnel`)
ArgumentTypeDescription
uuidstringTarget client UUID
srcnumberSource port
hoststringDestination host
dstnumberDestination port
fn cc_rtunnel(uuid: string, src: number, host: string, dst: number)
Open a reverse tunnel through a client (`cc rtunnel`)
ArgumentTypeDescription
uuidstringTarget client UUID
srcnumberSource port
hoststringDestination host
dstnumberDestination port
fn cc_mount(uuid?: string, path?: string)
Mount a client's filesystem, or list mounts (`cc mount`)
ArgumentTypeDescription
uuid?stringClient UUID to mount; omit to list
path?stringLocal mount path
fn cc_clear()
Reset cc state: filters, commands, responses (`clear cc`)

Resources

ccClient(infinite)— A connected cc (miniccc) client (from `cc clients`)
ccCommand(infinite)— A queued cc command (from `cc commands`)
operation(7d)— Outcome of a one-shot cc action (exec, send/recv, filter, responses,
@nblair2/minimega/diskv2026.05.30.1disk.ts
fn disk_info(image: string)
Inspect a disk image (`disk info`), storing it as a resource
ArgumentTypeDescription
imagestringDisk image path
fn disk_create(format: enum, image: string, size: string)
Create a blank qcow2/raw disk image (`disk create`)
ArgumentTypeDescription
formatenumImage format
imagestringPath for the new image
sizestringImage size (e.g. 10G, 512M)
fn disk_snapshot(src: string, dst: string)
Create a copy-on-write overlay of a backing image
ArgumentTypeDescription
srcstringBacking image to snapshot from
dststringPath for the new copy-on-write overlay
fn disk_commit(image: string)
Commit an overlay's changes into its backing image
ArgumentTypeDescription
imagestringDisk image path
fn disk_resize(image: string, size: string)
Resize a disk image (`disk resize`)
ArgumentTypeDescription
imagestringDisk image to resize
sizestringNew size (e.g. 20G)

Resources

disk(infinite)— A disk image and its metadata (from `disk info`)
operation(7d)— Outcome of a one-shot disk action (create, snapshot, commit, resize)
@nblair2/minimega/meshv2026.05.30.1mesh.ts
fn mesh_list()
List mesh nodes and their connections (`mesh list`)
fn mesh_status()
Show mesh status: size, degree, peers (`mesh status`)
fn mesh_dial(node: string)
Dial (connect to) a mesh node (`mesh dial`)
ArgumentTypeDescription
nodestringMesh node name
fn mesh_hangup(node: string)
Hang up (disconnect) a mesh node (`mesh hangup`)
ArgumentTypeDescription
nodestringMesh node name
fn mesh_send(node: string, command: string)
Run a minimega command on remote mesh node(s) (`mesh send`)
ArgumentTypeDescription
nodestringTarget node (name, range, or 'all')
commandstringminimega command to run on the node(s)
fn mesh_degree(degree?: number)
Read or set the mesh connection degree (`mesh degree`)
ArgumentTypeDescription
degree?numberDesired connection degree to set; omit to read
fn mesh_timeout(timeout?: number)
Read or set the mesh message timeout (`mesh timeout`)
ArgumentTypeDescription
timeout?numberMessage timeout in seconds to set; omit to read
fn mesh_dot(file: string)
Export the mesh topology as a graphviz .dot file (`mesh dot`)
ArgumentTypeDescription
filestringOutput path for the graphviz .dot file
fn deploy_launch(args?: string)
Deploy and launch minimega on mesh nodes (`deploy launch`)
ArgumentTypeDescription
args?stringArguments to `deploy launch` (e.g. host list and flags); omit for none

Resources

meshNode(infinite)— A node in the meshage cluster fabric (from `mesh list`)
operation(7d)— Outcome of a one-shot mesh action (status, dial/hangup, send, degree,
@nblair2/minimega/hostv2026.05.30.1host.ts
fn host_info()
Report per-host resources (`host`)
fn check()
Validate minimega's external dependencies (`check`)
fn version()
Read the minimega version (`version`)
fn nuke()
Reset minimega: kill all VMs and clear state (`nuke`)
fn optimize()
Show current VM optimizations (`optimize`)
fn optimize_clear()
Disable all VM optimizations (`clear optimize`)
fn file_list(path?: string)
List files in the mesh-wide file store (`file list`)
ArgumentTypeDescription
path?stringSubdirectory to list; omit for the root
fn file_get(file: string)
Fetch a file from another mesh node (`file get`)
ArgumentTypeDescription
filestringFile path within the mesh file store
fn file_delete(file: string)
Delete a file from the file store (`file delete`)
ArgumentTypeDescription
filestringFile path within the mesh file store
fn vnc_list()
List active VNC recordings/playbacks (`vnc`)
fn vnc_record(vm: string, file: string)
Record a VM's VNC session to a file (`vnc record`)
ArgumentTypeDescription
vmstringVM name to record/playback
filestringRecording file path
fn vnc_playback(vm: string, file: string)
Play a recorded VNC session back into a VM (`vnc playback`)
ArgumentTypeDescription
vmstringVM name to record/playback
filestringRecording file path
fn vnc_clear()
Stop all VNC recordings/playbacks (`clear vnc`)
fn log_level(level?: enum)
Read or set the minimega log level (`log level`)
ArgumentTypeDescription
level?enumLog level to set; omit to read the current level
fn log_filter(filter: string)
Add a log filter to suppress matching lines (`log filter`)
ArgumentTypeDescription
filterstringSubstring filter to suppress from logs
fn read(file: string)
Run a minimega script file (`read <file>`)
ArgumentTypeDescription
filestringPath to a minimega script file to run
fn command_run(command: string)
Run an arbitrary minimega command and store its responses — the
ArgumentTypeDescription
commandstringRaw minimega command to run (the escape hatch for unmodeled commands)

Resources

host(infinite)— A minimega host and its resource usage (from `host`)
operation(7d)— Outcome of a one-shot host/system action (check, version, nuke,
03Stats
A
100 / 100
Downloads
0
Archive size
71.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels