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.
path(string, REQUIRED) path to the hypervisor binary that manages the container virtual machine. This value MUST be an absolute path in the runtime mount namespace.parameters(array of strings, OPTIONAL) specifies an array of parameters to pass to the hypervisor.
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.
path(string, REQUIRED) path to the kernel used to boot the container virtual machine. This value MUST be an absolute path in the runtime mount namespace.parameters(array of strings, OPTIONAL) specifies an array of parameters to pass to the kernel.initrd(string, OPTIONAL) path to an initial ramdisk to be used by the container virtual machine. This value MUST be an absolute path in the runtime mount namespace.
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.
path(string, REQUIRED) path to the container virtual machine root image. This value MUST be an absolute path in the runtime mount namespace.format(string, REQUIRED) format of the container virtual machine root image. Commonly supported formats are:rawraw disk image format. Unset values forformatwill default to that format.qcow2QEMU image format.vdiVirtualBox 1.1 compatible image format.vmdkVMware compatible image format.vhdVirtual Hard Disk image format.
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.
deviceTree(string OPTIONAL) Path to the container device-tree file that should be passed to the VM.vcpus(int OPTIONAL) Number of virtual cpus for the VM.memory(int OPTIONAL) Maximum memory in bytes allocated to the VM.dtdevs(array OPTIONAL) Host device tree nodes to passthrough to the VM, see Xen Config for the details.iomems(array OPTIONAL) Allow auto-translated domains to access specific hardware I/O memory pages, see Xen Config.firstGFN(int OPTIONAL) Guest Frame Number to map the iomem range. If GFN is not specified, the mapping will be done to the same Frame Number as was provided in firstMFN, see Xen Config for the details.firstMFN(int REQUIRED) Physical page number of iomem regions, see Xen Config for the details.nrMFNs(int REQUIRED) Number of pages to be mapped, see Xen Config for the details.
irqs(array OPTIONAL) Allows VM to access specific physical IRQs, see Xen Config for the details.
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
]
}