After you leave VMware® vSphere, the VMFS-or-NFS choice becomes a choice per VM disk on Red Hat® OpenShift® Virtualization 4.22 and upstream KubeVirt. The volume mode of the PersistentVolumeClaim (PVC) and the protocol of the CSI driver behind its StorageClass decide block or file, and its access mode decides how many nodes can mount the disk read-write.
What replaces the datastore object itself is covered in what replaces the VMware datastore, and what thin and thick disks become in thin vs thick provisioning on Kubernetes.
What VMFS vs NFS decided on vSphere
On vSphere, the choice between VMFS and NFS decided who owned the filesystem under your VMs and which vSphere features a VM could use. Broadcom’s vSphere 8.0 documentation describes VMFS as the format used for datastores on block storage devices. As a cluster filesystem, it lets multiple ESXi hosts access the same datastore concurrently, and on-disk locking stops two hosts from accessing the same VM at the same time. An NFS datastore is a volume that a NAS server exports and the NFS client built into ESXi mounts, and you do not format it with VMFS.
Both types supported vMotion, vSphere HA and DRS. They differed on two features: Broadcom’s feature table lists raw device mapping (RDM) and VM clusters as supported on Fibre Channel and iSCSI with VMFS, and not supported on NAS over NFS. In that table, a VM that needed an RDM or a VM cluster could not use an NFS datastore.
The criteria that replace the datastore choice
On the destination, you decide four things for each VM disk instead of a datastore type.
- How the guest disk is presented. With
volumeMode: Block, a block CSI driver presents a raw block device on the node, the VM gets that device, and the guest puts its own file system on it. WithvolumeMode: Filesystem, KubeVirt expects the disk as a raw-format file nameddisk.imgat the root of the volume’s filesystem. Red Hat’s OpenShift Virtualization 4.22 documentation says Block performs significantly better, because Filesystem mode adds storage layers that VM disk storage does not need. - Access mode. ReadWriteOnce (RWO) means one node can mount the volume read-write. ReadWriteMany (RWX) means many nodes can.
- Who coordinates writers. No VMFS-style on-disk lock sits under a PVC, and Kubernetes states that access modes do not enforce write protection once a volume is mounted. For a disk shared by several VMs, KubeVirt’s
shareableoption tells libvirt and QEMU not to create a lock for the writes. The guests then need a clustered filesystem or application-level synchronization. - Protocol and data path. A block CSI driver talks a block protocol from each node, for example NVMe/TCP or iSCSI. An NFS CSI driver mounts a share from an NFS server instead, so reads and writes go through the NFS server and the file system of its export.
How simplyblock serves a Block-mode volume
Simplyblock gives a Block-mode VM disk a raw block device, with no host filesystem between the guest and the volume. Set volumeMode: Block on the claim, the DataVolume or the storage map entry to get that raw device.
Each volume is a namespace in an NVMe-oF subsystem, served over NVMe/TCP or RoCEv2. The node running the VM reaches it through NVMe multipathing: several paths from that node to several storage nodes, with a local loopback as the primary path where possible. The OpenShift storage page covers simplyblock on the platform.
Three destination shapes compared
A migrated VM disk ends up in one of three shapes. Which ones you can use depends on the CSI driver. The upstream community Kubernetes NFS CSI driver (v4.13.6) needs an existing NFSv3 or NFSv4 server, provisions each volume as a subdirectory of the share, and rejects requests for block volumes. An NFS share therefore gives you Filesystem mode only, and a claim that asks for Block mode is refused. On OpenShift, check which CSI driver your NAS vendor supports.
Table 1: the three shapes a migrated VM disk can take, against the four criteria.
| Criterion | RWX Block on a block driver | RWX Filesystem on an NFS driver | RWO, either mode |
|---|---|---|---|
| Closest vSphere habit | VMFS on a shared LUN | NFS datastore | VMFS on host-local storage (no shared datastore) |
| Guest disk path | Raw block device | disk.img on the share | Raw device or disk.img |
| Live migration | Yes | Yes | No |
| Who coordinates writers | The guests, for a shareable disk | The guests, for a shareable disk | Not shared across nodes |
| Data path | Block protocol from each node | Through the NFS server | Block protocol or local disk |
| What to confirm | The driver supports RWX with volumeMode: Block | Server capacity and throughput for every VM on it | That restart instead of migration is acceptable |
Choose RWX Block when the VM must live migrate and its disk performance matters. Choose RWX Filesystem on NFS when the VMs tolerate Filesystem mode and a single NFS server in the data path. If that single server is your concern, ask your NAS vendor whether its CSI driver uses parallel NFS (pNFS, an optional part of NFSv4.1), which lets clients reach the storage devices directly instead of going through the server. Choose RWO when a VM can stop and start on another node during maintenance.
What live migration needs from the volume
A KubeVirt VM can live migrate only if every PVC it uses has the ReadWriteMany access mode, as the KubeVirt user guide states. KubeVirt computes this when the VM instance starts, records it as the LiveMigratable condition, and rejects a migration request for an instance that is not live-migratable.
Check it per VM group, in this order:
-
Before the migration plan runs, set each group’s shape in the storage map of the Migration Toolkit for Virtualization (MTV). Each destination entry in the Forklift
StorageMapAPI names a StorageClass and can also setvolumeModeandaccessMode. A DataVolume that leaves those fields out takes them from the StorageProfile that the Containerized Data Importer (CDI) creates for each StorageClass. CDI fills that profile only for provisioners it knows. For any other driver the profile is empty until an administrator addsclaimPropertySets, and CDI cannot create the PVC for a DataVolume that sets no access mode. -
After import, read the condition on the running instance. Example command, with your own VM name:
Terminal window kubectl get vmi my-vm -o jsonpath='{.status.conditions[?(@.type=="LiveMigratable")].status}'Truemeans the instance can live migrate. If it readsFalse, check the access mode of each disk first, since KubeVirt bases the condition largely on it. -
Test one migration with
virtctl migrate my-vmbefore you depend on node drains for maintenance.
Moving a VM’s data between storage classes is a different operation, covered in what replaces vMotion and Storage vMotion.