org.osbuild.qemu
Convert a disk image to a different format.
Convert the disk image specified via the image
input to the
format specified in format
. Currently supported types are:
qcow2, vdi, vmdk, vpc, vhdx.
Some formats support format specific options:
qcow2: The compatibility version can be specified via compat
.
Buildhost commands used: qemu-img
.
Schema 1
{}
Schema 2
{
"definitions": {
"qcow2": {
"description": "Create a qcow2 image",
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the format, here 'qcow2'",
"type": "string",
"enum": [
"qcow2"
]
},
"compression": {
"description": "Enable/disable compression of the qcow2 image",
"type": "boolean",
"default": true
},
"compat": {
"description": "The qcow2-compatibility-version to use",
"type": "string"
}
}
},
"vdi": {
"description": "Create a vdi image",
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the format, here 'vdi'",
"type": "string",
"enum": [
"vdi"
]
}
}
},
"vmdk": {
"description": "Create a vmdk image",
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the format, here 'vmdk'",
"type": "string",
"enum": [
"vmdk"
]
},
"compression": {
"description": "Enable/disable compression of the vmdk image",
"type": "boolean",
"default": true
},
"subformat": {
"description": "VMDK flat extent format",
"type": "string",
"enum": [
"monolithicSparse",
"monolithicFlat",
"twoGbMaxExtentSparse",
"twoGbMaxExtentFlat",
"streamOptimized"
]
}
}
},
"vpc": {
"description": "Create a vpc image",
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the format, here 'vpc'",
"type": "string",
"enum": [
"vpc"
]
},
"force_size": {
"description": "Force disk size calculation to use the actual size specified, rather than using the nearest CHS-based calculation",
"type": "boolean",
"default": true
},
"subformat": {
"description": "Type of virtual hard disk format",
"type": "string",
"default": "fixed",
"enum": [
"fixed",
"dynamic"
]
}
}
},
"vhdx": {
"description": "Create a vhdx image",
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the format, here 'vhdx'",
"type": "string",
"enum": [
"vhdx"
]
}
}
}
},
"inputs": {
"type": "object",
"additionalProperties": false,
"required": [
"image"
],
"properties": {
"image": {
"type": "object",
"additionalProperties": true
}
}
},
"options": {
"additionalProperties": false,
"required": [
"filename",
"format"
],
"properties": {
"filename": {
"description": "Filename for resulting image",
"type": "string"
},
"format": {
"oneOf": [
{
"$ref": "#/definitions/qcow2"
},
{
"$ref": "#/definitions/vdi"
},
{
"$ref": "#/definitions/vmdk"
},
{
"$ref": "#/definitions/vpc"
},
{
"$ref": "#/definitions/vhdx"
}
]
}
}
}
}