docs: Describe VMDK extent path handling under landlock

With landlock enabled, the vmdk disk path representing the
descriptor file is added to allowed path. However, this is a
plain text file which points to actual data blobs called extents.
The extent paths are not allowed and must be explicitly passed via
landlock-rules path.

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
This commit is contained in:
Sumedh Alok Sharma
2026-07-16 08:56:55 +00:00
committed by Wei Liu
parent d69fb67f5b
commit aa9678da67

View File

@@ -62,6 +62,31 @@ Landlock can also be enabled during `vm.create` request by passing a config like
}
```
### Multi-file disk formats (VMDK)
For most block backends (raw, qcow2, VHD) including existing VMDK, landlock
grants access to the `--disk path=` path value.
For a Flat VMDK, its `path=` points at a small text descriptor whose
data lives in one or more separate extent files. Granting only the descriptor
currently leaves those extents unreachable under landlock.
The process launching Cloud-Hypervisor must grant these extent paths explicitly
via `--landlock-rules` (or the `landlock_rules` API field). The descriptor file's
extent section mentions the extent file path which can be either:
- relative (the `qemu-img` default) in which case the full path includes the descriptor
file's parent directory
- absolute, which can live inside the descriptor file's parent directory or in another
directory
For example, a containerd/Kata deployment where the read-only image
layer resides under `/var/lib/containerd` should add that path:
```
--landlock-rules path="/var/lib/containerd",access="rw"
```
## Usage Examples