Cluster compute (SDC)
Cluster compute, or SDC (software-defined compute), is what runs virtual machines (VMs). Every node runs the bhyve hypervisor from FreeBSD and a VM controller: the controller starts, stops and suspends VMs on commands from Center. Guest OSes work with virtio and NVMe virtual devices. There are no separate servers just for VMs — the same nodes run storage and networking.
Design rationale
A VM can run on any node, not only where its disks are. VM disks are stored in a pool, and at any moment the pool is open on one node. If a VM runs on another node, it accesses its disks over the isolated networks segment (NVMe-oF/TCP) at the floating address of the pool. That is why the node for a VM is chosen by free memory and cores, not by where the data is stored — Cluster storage (SDS), VM on another node.
Where a VM starts
- Node selection. Center selects a node when a VM starts without a selected node. With DRS off, it picks the least loaded node, weighted 70% by used memory and 30% by used cores, with a slight preference for the node of the VM's pool. With DRS on, it picks by the node load that DRS calculates. You can also select the node manually with the Start at node button — Start, stop and restart a VM.
- Placement rules. VM and node groups and the Keep VMs together, Separate VMs and VMs to nodes rules are respected by start, auto-restart, migration, moving VMs off a node in maintenance, and DRS — DRS — balancing VMs across cluster nodes.
- Balancing. DRS moves running VMs between nodes: at the Fully Automated level it moves VMs automatically, at the other levels it only suggests moves. DRS is off after installation, and running VMs are not moved between nodes automatically.
- Memory. Center does not start a VM on a node if the node does not have enough free memory for the VM. Center calculates the node capacity from the current measurement of the node memory minus the ZFS cache and the OS reserve. Powering on, resuming and restarting a VM are also refused when they would use the memory that the cluster reserves for node failures — Failover memory reserve. Center does not reserve memory for a powered-off or suspended VM — another VM can use it. Center does not limit cores — Resource accounting: quotas and node memory.
- Node maintenance. Center does not start or move VMs to a node in maintenance mode — Put a node into maintenance mode.
- Moving without stopping. You can move a running VM to another node with live migration: memory and CPU state are transferred, and the VM disks stay in the pool — VM live migration.
Node failure
The VMs of a failed node stop together with it. Center automatically starts them on other nodes if they were supposed to be running — VM auto-restart after a failure. While VMs wait for auto-restart, Center does not reserve memory for them: this memory on neighboring nodes is available to any VM that starts. Before each start, Center and the node check that the VM is not running anywhere else — VM double-start protection.