Show examples as

VM creation modes

VMs are created through the controller API. Below are the main patterns supported by kcore-kctl create vm (and equivalent YAML).

Showing CLI examples below. Use the toggle above to switch to YAML manifests.

Showing YAML examples below. Use the toggle above for raw kctl commands.

Requirements

HTTPS image + SHA256

Recommended when you want deterministic verification and node-side caching. Provide an https:// URL and --image-sha256.

kcore-kctl create vm web-01 \
  --image https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2 \
  --image-sha256 <sha256> \
  --network default \
  --storage-backend filesystem \
  --storage-size-bytes 42949672960

Node-local image path

Use when the image file already exists on the target node (e.g. after upload).

kcore-kctl create vm web-01 \
  --image-path /var/lib/kcore/images/base.qcow2 \
  --image-format qcow2 \
  --network default \
  --storage-backend filesystem \
  --storage-size-bytes 42949672960

YAML manifest

Declarative definitions can be applied with kctl apply -f vm.yaml or kcore-kctl create vm -f vm.yaml. Use kind: VM, image reference under spec.disks, and NICs under spec.nics.

# vm.yaml
kind: VM
metadata:
  name: web-01
spec:
  cpu: 2
  memoryBytes: "4G"
  storageBackend: filesystem
  storageSizeBytes: 42949672960
  disks:
    - backendHandle: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
      sha256: "<sha256>"
      format: qcow2
  nics:
    - network: default

Apply the manifest:

kctl apply -f vm.yaml

CLI flags (--storage-backend, --storage-size-bytes) override the YAML values when both are provided.

SSH access patterns

Scheduling

Omit --target-node to let the controller choose a node, or set --target-node <node id> to pin placement.

Readiness

Validation rules (summary)