Xen Orchestra
@shrug/xen-orchestrav2026.07.22.1
01README
Xen Orchestra (XO) / XCP-NG VM lifecycle model over the REST API (/rest/v0): create a VM from a template with cloud-init, start, stop (clean/hard), snapshot, and destroy, plus template/pool/SR/network discovery so UUIDs are resolved rather than hardcoded. Token auth via the authenticationToken cookie (vaulted); plain HTTPS through one injectable fetch seam, TLS verification always on (optional private-CA trust via caCert).
02Release Notes
First release. VM lifecycle over the Xen Orchestra REST API: create (from template, cloud-init), start, stop, snapshot, destroy; template/pool/SR/network discovery; and VIF inventory/removal (listVifs/deleteVif). Token auth via the authenticationToken cookie; TLS verification always on.
03Models
@shrug/xen-orchestrav2026.07.22.1xen_orchestra.ts
fn create(name_label: string, name_description?: string, template: string, poolId?: string, cpus?: number, memory?: number, network: string, mac?: string, sr: string, size: number, name_label: string, name_description?: string, cloud_config?: string, network_config?: string, boot: boolean, hvmBootFirmware?: enum, secureBoot?: boolean, copyHostBiosStrings?: boolean, autoPoweron?: boolean, clone?: boolean, sync: boolean)
Provision a VM from a template (with optional cloud-init) and record
| Argument | Type | Description |
|---|---|---|
| name_label | string | VM name |
| name_description? | string | VM description |
| template | string | Template UUID (resolve via listTemplates) |
| poolId? | string | Pool UUID (defaults to global poolId) |
| cpus? | number | vCPU count |
| memory? | number | RAM in bytes |
| network | string | Network UUID |
| mac? | string | |
| sr | string | SR UUID (resolve via listSRs) |
| size | number | Disk size in bytes |
| name_label | string | |
| name_description? | string | |
| cloud_config? | string | cloud-init user-data (content) |
| network_config? | string | cloud-init network-config (content) |
| boot | boolean | Start the VM after creation |
| hvmBootFirmware? | enum | |
| secureBoot? | boolean | Enable UEFI Secure Boot |
| copyHostBiosStrings? | boolean | Copy the host's BIOS strings into the VM |
| autoPoweron? | boolean | Start on host boot |
| clone? | boolean | Fast-clone the template's disks |
| sync | boolean | Wait inline (?sync=true) vs poll a task |
fn start(id: string)
Start a VM (`POST /vms/{id}/actions/start`) and refresh its snapshot.
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
fn stop(id: string, force: boolean)
Stop a VM — clean ACPI shutdown by default, hard power-off when
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
| force | boolean | Hard power-off instead of ACPI |
fn snapshot(id: string, name_label: string)
Snapshot a VM (`POST /vms/{id}/actions/snapshot`) and refresh its
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
| name_label | string | Snapshot name |
fn destroy(id: string)
Destroy a VM (`DELETE /vms/{id}`). Verifies the VM exists first
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
fn get(id: string)
Refresh a VM's live-state snapshot (`GET /vms/{id}`).
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
fn listTemplates()
List VM templates (`GET /vm-templates`) to resolve a template UUID.
fn listPools()
List pools (`GET /pools`) to resolve the pool UUID for create.
fn listSRs()
List storage repositories (`GET /srs`) to resolve an SR UUID.
fn listNetworks()
List networks (`GET /networks`) to resolve a VIF network UUID.
fn listVifs(id: string)
List a VM's virtual NICs (`GET /vms/{id}` then `GET /vifs/{uuid}` per
| Argument | Type | Description |
|---|---|---|
| id | string | VM UUID |
fn deleteVif(vif: string)
Delete a virtual NIC by VIF UUID (`DELETE /vifs/{uuid}`). Verifies the
| Argument | Type | Description |
|---|---|---|
| vif | string | VIF UUID |
Resources
vm(infinite)— A managed VM's normalized live-state snapshot
inventory(infinite)— A discovery listing (templates/pools/srs/networks) for UUID resolution
04Stats
A
100 / 100
Downloads
0
Archive size
17.2 KB
- 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
05Platforms
06Labels