Kubevirt
01README
Install and upgrade KubeVirt on an existing Kubernetes cluster from a SHA-256-pinned operator manifest, and manage one VirtualMachine from a digest-pinned containerDisk image or a CDI DataVolume. Two model types over kubectl, with the kubeconfig supplied as a vault reference and never placed on a command line.
02Behaviors
@randybias/kubevirtv2026.10.17.1kubevirt.ts
fn render_cr()
READ-ONLY. Render the KubeVirt custom resource for the given inputs; the same inputs give identical bytes.
fn install()
Idempotent. Verify the pinned operator manifest, server-side apply it and the KubeVirt custom resource, and optionally CDI (operator manifest and custom resource). Adopts an install at the same version and refuses a different one with a pointer to upgrade. Returns the versions and manifest digests.
fn wait_ready()
READ-ONLY semantics. Poll until the CR is Deployed with Available=True, Progressing=False and Degraded=False and reports the given version, and CDI is Available when asked. Never throws for not-ready; returns ready:false with the last conditions after the timeout.
fn upgrade()
Verify the new pinned operator manifest and apply it, so the CR follows the operator, then wait as wait_ready. Refuses a downgrade and a jump of more than one minor unless allow_minor_skip is set. Returns the from and to versions and the outdated workload count.
fn get()
READ-ONLY. Installed versions, CR phase and conditions, emulation flag, feature gates, node facts and outdated workload count.
fn sync()
READ-ONLY. Reconcile recorded state with the cluster; an absent CR is recorded as not_found instead of failing.
fn uninstall()
DESTRUCTIVE. Verify every needed manifest first, then delete the KubeVirt custom resource with --wait, the operator manifest's objects and, when this definition installed it, CDI. A running workload blocks the delete under the default BlockUninstallIfWorkloadsExist strategy. Requires confirm equal to the cluster fingerprint; an absent install is a clean no-op.
Resources
state(infinite)— Installed versions, CR phase and conditions, node facts
rendered(infinite)— A rendered KubeVirt custom resource and its digest
@randybias/kubevirt-vmv2026.10.17.1kubevirt_vm.ts
fn render_vm()
READ-ONLY. Render the VirtualMachine YAML for the given inputs; the same inputs give identical bytes.
fn define()
Idempotent. Create or update the VirtualMachine by server-side apply, always writing spec.runStrategy and never spec.running. Refuses an existing VM that uses the deprecated spec.running, and a DataVolume source when CDI is not installed. Returns the uid, generation and spec digest.
fn start()
Set runStrategy to Always, a no-op when it already is, and optionally wait until the VM reports Running. Returns the printable status.
fn stop()
Set runStrategy to Halted, then wait until no VMI exists or grace_s elapses. Returns the printable status.
fn restart()
Call the public restart subresource with an empty body, then wait until the VMI has a new uid and is Running. Refuses a Halted VM. Returns the VMI uid before and after.
fn wait_ready()
READ-ONLY semantics. Poll until the DataVolume (when present) has Succeeded and the VM is Running with the VMI Ready condition true, and AgentConnected when asked. Never throws for not-ready; returns ready:false after the timeout.
fn get()
READ-ONLY. The VM spec summary, printable status, VMI phase/node/IPs, DataVolume phase/progress and conditions.
fn sync()
READ-ONLY. Reconcile recorded state with the cluster; an absent VM is recorded as not_found instead of failing.
fn delete()
DESTRUCTIVE. Delete the VirtualMachine, cascading its VMI and any DataVolume it owns; disk data is lost. Requires confirm equal to the VM name when it owns a DataVolume; an absent VM is a clean no-op.
Resources
state(infinite)— VM spec summary, run strategy and live status
rendered(infinite)— A rendered VirtualMachine and its digest
03Stats
A
93 / 100
Downloads
2
Archive size
161.7 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
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
deno-command2 accepted
Spawns a subprocess with Deno.Command().
- models/_lib/k8s.ts:132 — no reason given
- models/_lib/kubectl.ts:73 — no reason given
credentials-sensitive-field2 accepted
A field that looks like a secret but is not marked sensitive, so its value is not vaulted.
- models/kubevirt_vm.ts:128 — no reason given
- models/kubevirt_vm.ts:135 — no reason given
05Platforms
06Labels