Show examples as

kcore SAN (Ceph)

kcore SAN ships with kcore. A CephCluster builds the cluster, RBD images hold VM disks, and VMs move between hosts, live or cold, without copying disks.

kcore supports local storage backends (filesystem, LVM, ZFS) where VM disks live on the host running the VM. kcore SAN adds shared block storage on Ceph. VM disks are replicated across hosts, a host failure does not lose a disk, and a VM can move or restart on another host.

What you get

How it integrates

Safe by default

Live migration needs TCP 18000–18127 open between members. Keep Ceph replication off a congested management NIC and give it a fabric of its own.

Moving VMs (cold and live)

Because the disk is an RBD image in pool kcore-vms, changing hosts does not copy guest blocks. Choose the mode that matches your downtime budget:

There is no migrate or drain YAML kind. Declaring a VM (or CephCluster) does not move a running guest. Live migrate and cold drain are operations: use kctl below, the dashboard, or MCP kcore_operation. Full runbook: VM migration.

Provider 0.8.3 has no migrate or drain resource. Those stay kctl commands (or the dashboard / MCP). See VM migration.

  • Live: kctl migrate vm <id> --target-node <node> — memory streams over TCP; both nodes map the same image during cutover.
  • Cold: kctl drain node <node> — control plane reassigns VMs; Nix stop on source / start on destination.
  • Fallback: kctl migrate vm … --allow-cold-fallback tries live, then cold for that VM.
kctl migrate vm app-1 --target-node node-b
kctl migrate vm app-1 --target-node node-b --allow-cold-fallback
kctl drain node node-a
kctl drain node node-a --target-node node-b

Operator runbook: VM migration. Architecture and RPC flow: docs/vm-migration.md · Ceph integration: docs/ceph.md.

Target use cases

How it complements local backends

Local backends (filesystem, LVM, ZFS) remain the right choice for single-node, performance-sensitive workloads where raw I/O throughput matters most. kcore SAN is designed for workloads that prioritise availability over raw I/O performance.

Operators choose per-VM: a database that needs low-latency local NVMe stays on LVM, while an application server uses Ceph-backed storage for easy failover.

Relationship to existing storage classes

kcore SAN appears as a new storage class (ceph) alongside the existing filesystem, lvm, and zfs classes:

$ kctl get storage-class
NAME          NODES
filesystem    3
lvm           2
zfs           1
ceph          3

Nodes that are members of a healthy CephCluster are listed under the ceph storage class. Creating a VM on Ceph storage:

kctl create vm app-1 \
  --storage-backend ceph \
  --storage-size-bytes 107374182400 \
  --image <https-url> \
  --image-sha256 <sha256>

Example CephCluster manifest (Phase 1)

kind: CephCluster
metadata:
  name: lab-san
spec:
  publicNetwork: "10.10.0.0/24"
  clusterNetwork: "10.20.0.0/24"
  replication:
    size: 3
    minSize: 2
  nodes:
    - nodeId: dell-1
      monAddr: "10.10.0.11:6789"
      clusterAddr: "10.20.0.11"
      publicIface: eth1
      clusterIface: eth2
      osdDevice: /dev/nvme0n1

Showing Terraform examples. Provider source is kcorehypervisor/kcore, version 0.8.3.

kcore_vm storage_backend is filesystem, lvm, or zfs. Put a VM on Ceph with kctl create vm --storage-backend ceph or a VM manifest. A Ceph data disk is kcore_volume with storage_class ceph, and kcore_ceph_cluster creates the cluster.

resource "kcore_ceph_cluster" "lab_san" {
  name            = "lab-san"
  public_network  = "10.10.0.0/24"
  cluster_network = "10.20.0.0/24"
  size            = 3
  min_size        = 2

  node {
    node_id       = "dell-1"
    mon_addr      = "10.10.0.11:6789"
    cluster_addr  = "10.20.0.11"
    public_iface  = "eth1"
    cluster_iface = "eth2"
    osd_device    = "/dev/nvme0n1"
  }
}

resource "kcore_volume" "app" {
  name          = "app-data"
  size_bytes    = 107374182400
  storage_class = "ceph"
}

resource "kcore_shared_filesystem" "home" {
  name         = "home"
  ceph_cluster = kcore_ceph_cluster.lab_san.name
  fs_name      = "home"

  client {
    name  = "web"
    paths = ["/"]
  }
}

resource "kcore_object_store" "s3" {
  name         = "s3"
  ceph_cluster = kcore_ceph_cluster.lab_san.name
  port         = 7480
}

resource "kcore_object_user" "app" {
  name  = "app"
  store = kcore_object_store.s3.name
}

Day-2 lifecycle

After the CephCluster is healthy, drain members one at a time, put a host in maintenance, rotate keys, and finish OSD release upgrades through kctl.

CSI for Kubernetes

A KubernetesCluster on the same CephCluster can mount RBD and CephFS through Ceph CSI. The controller pins quay.io/cephcsi/cephcsi:v3.13.1. VolumeSnapshot CRDs ship with the Kubernetes cluster; use them once the CSI snapshotter is up.

Some CSI and lifecycle paths are implemented and documented here; exercise them in a lab before production.