From 43eaa26ae76a2335cf370d56a67d72e852fd2156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sun, 10 Jan 2021 14:47:52 +0100 Subject: [PATCH] Bit of doc on data pack file systems. --- .../resources/data/oc2/file_systems/README.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/resources/data/oc2/file_systems/README.md diff --git a/src/main/resources/data/oc2/file_systems/README.md b/src/main/resources/data/oc2/file_systems/README.md new file mode 100644 index 00000000..e5bc13a4 --- /dev/null +++ b/src/main/resources/data/oc2/file_systems/README.md @@ -0,0 +1,33 @@ +It is possible to provide additional read-only data to virtual machines using data packs. + +For this to work, a descriptor file must be placed in the `file_systems` directory. The descriptor must be a JSON file +with a name ending in `.fs.json`. The file must have the following format: + +```json +{ + "type": "", + "": "" +} +``` + +For example, to provide additional files for the layered 9pFS exposed to virtual machines, the type must be `virtio-9p` +and the extra field `location` must be provided, containing a resource location pointing to the root of the path to +expose. Example: + +```json +{ + "type": "virtio-9p", + "location": "oc2:file_systems/scripts" +} +``` + +All files in paths exposed this way will be flagged non-executable by default. To mark a file executable, place +a `.mcmeta` file with the following content next to: + +```json +{ + "attributes": { + "is_executable": true + } +} +```