1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2026-02-05 09:45:57 +01:00
Files
runtime-spec/config-vm.md
Kir Kolyshkin 97580111bb ci: add codespell job, fix existing issues
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-10-14 16:33:38 -07:00

5.8 KiB

Virtual-machine-specific Container Configuration

This section describes the schema for the virtual-machine-specific section of the container configuration. The virtual-machine container specification provides additional configuration for the hypervisor, kernel, and image.

Hypervisor Object

hypervisor (object, OPTIONAL) specifies details of the hypervisor that manages the container virtual machine.

Example

    "hypervisor": {
        "path": "/path/to/vmm",
        "parameters": ["opts1=foo", "opts2=bar"]
    }

Kernel Object

kernel (object, REQUIRED) specifies details of the kernel to boot the container virtual machine with.

Example

    "kernel": {
        "path": "/path/to/vmlinuz",
        "parameters": ["foo=bar", "hello world"],
        "initrd": "/path/to/initrd.img"
    }

Image Object

image (object, OPTIONAL) specifies details of the image that contains the root filesystem for the container virtual machine.

This image contains the root filesystem that the virtual machine kernel will boot into, not to be confused with the container root filesystem itself. The latter, as specified by path from the Root Configuration section, will be mounted inside the virtual machine at a location chosen by the virtual-machine-based runtime.

Example

    "image": {
        "path": "/path/to/vm/rootfs.img",
	"format": "raw"
    }

HWConfig Object

hwConfig (object OPTIONAL) Specifies the hardware configuration that should be passed to the VM.

This hwConfig object contains the description of the hardware that can be safely passed through to the VM. Where deviceTree is the path to the device-tree blob, which contains description of the isolated hardware and paravirtualized hardware that should be used by VM. dtdevs, iomems and irqs parameters describing the minimal set of the parameters, needed for VM to access the hardware.

Example

    "hwConfig": {
        "deviceTree": "/path/to/vm/devicetree.dtb",
        "vcpus": 1,
        "memory": 4194304,
        "dtdevs": [
            "path/to/dev1_node",
            "path/to/dev2_node"
        ],
        "iomems": [
            {
                "firstMFN": 12288,
                "nrMFNs": 1
            },
            {
                "firstGFN": 12544,
                "firstMFN": 33024,
                "nrMFNs": 2
            }
        ],
        "irqs": [
            11,
            22
        ]
    }