Truenas
Hypervisor-layer VM inventory for TrueNAS SCALE, via the JSON-RPC WebSocket API.
TrueNAS SCALE 24.10+ runs guest VMs as Incus instances; earlier releases use libvirt. The @mccormick/truenas/inventory model asks TrueNAS for that guest state and turns it into a typed swamp inventory: one vm resource per guest (normalized state, vcpus, memory, disks, NICs, and MAC addresses) and a single summary roll-up (host, TrueNAS version, and running/stopped/other counts).
The discover method fans out across every guest in one virt.instance.query (or legacy vm.query) call — no per-VM loop. Guests share the common name/state/vcpus/memoryMib/macs field contract with the Proxmox and Omni inventory providers, so a workflow report can join all three hypervisors into one fleet view.
Read-only: the model issues only query and system.info calls and never mutates TrueNAS state. Transport is the JSON-RPC WebSocket API authenticated with an API key; the key is supplied through a vault, marked sensitive, and redacted from logs and error text.
The companion @mccormick/truenas/vm model provisions guests from a ZFS zvol (create_zvol, create_vm, attach_disk, attach_nic, start/stop/ status/delete) over the same JSON-RPC transport — the TrueNAS half of the migrate-vm workflow. Every provisioning method is idempotent (queries before it writes), stamps a swamp marker into the VM description, and gates deletes on it. Read-only inventory and read-write provisioning are deliberately split across two models so the inventory safety story stays intact.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| endpoint | string | TrueNAS host or base URL, e.g. truenas.example.net or |
| apiKey | string | TrueNAS API key (read-only is sufficient); supply via |
| insecureSkipTlsVerify | boolean | Skip TLS verification (limited support over WebSocket — prefer a |
| backend | enum | Guest backend: 'incus' (SCALE 24.10+), 'libvirt' (legacy), or 'auto' |
| timeoutSecs | number | Per-discovery WebSocket timeout in seconds |
Resources
Global Arguments
| Argument | Type | Description |
|---|---|---|
| endpoint | string | TrueNAS host or base URL, e.g. truenas.example.net |
| apiKey | string | TrueNAS API key (read-write — provisioning mutates VMs and datasets); |
| insecureSkipTlsVerify | boolean | Skip TLS verification (limited over WebSocket — prefer a trusted CA) |
| timeoutSecs | number | Per-call WebSocket timeout in seconds |
Resources
Added 1 models
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned