Architecture
| Component | Runs where | Role |
|---|---|---|
| WinMgmtFramework WebApi | Linux host (Docker) outside the cluster, or in-cluster via the chart | Talks to the Hyper-V nodes over SSH + PowerShell remoting; creates, attaches, detaches, resizes and deletes VHDX files; keeps the volume cache |
| CSI controller (Deployment, 1 replica) | Kubernetes | CSI controller service + sidecars. In Http mode it delegates all Hyper-V work to the WebApi over HTTP with an API token |
| CSI node driver (DaemonSet) | Every Kubernetes node | Finds the attached SCSI disk by its VHDX identifier, partitions/formats it, mounts it for pods, grows the filesystem, reports usage |
Flow of a PVC: provisioner → controller CreateVolume → WebApi New-VHD on the CSV → attacher →
controller ControllerPublishVolume → WebApi Add-VMHardDiskDrive to the node VM → kubelet →
node driver NodeStageVolume (format, mount) → pod.
The WebApi identifies which VM a node is by the Hyper-V KVP data the node driver reads from
/var/lib/hyperv/.kvp_pool_3 (host name and VM id). That is why the KVP daemon is required on the nodes.
Why Windows PowerShell 5.1 is still needed
Section titled “Why Windows PowerShell 5.1 is still needed”Adding or removing a disk of a clustered VM ends with Update-ClusterVirtualMachineConfiguration. In
PowerShell 7 that step fails because of a bug in pwsh (PowerShell/PowerShell#28187); the driver therefore
opens a Windows PowerShell 5.1 session inside the SSH session for drive changes. This is automatic; the
only requirement is that 5.1 (built into Windows Server) is not removed or blocked.