Support VMDK subformat in qemu assembler

This commit is contained in:
Tomas Hozza 2022-04-07 13:09:05 +02:00 committed by Christian Kellner
parent bbe6127ddb
commit f41edba1fb

View file

@ -63,6 +63,11 @@ SCHEMA = """
"description": "The qcow2-compatibility-version to use",
"type": "string"
},
"vmdk_subformat": {
"description": "VMDK flat extent format",
"type": "string",
"enum": ["monolithicSparse", "monolithicFlat", "twoGbMaxExtentSparse", "twoGbMaxExtentFlat", "streamOptimized"]
},
"filename": {
"description": "Image filename",
"type": "string"
@ -618,6 +623,7 @@ def install_zipl(root: str, device: str, pt: PartitionTable):
check=True)
#pylint: disable=too-many-branches
def main(tree, output_dir, options, loop_client):
fmt = options["format"]
filename = options["filename"]
@ -699,6 +705,10 @@ def main(tree, output_dir, options, loop_client):
if compat:
extra_args["qcow2"] += ["-o", f"compat={compat}"]
vmdk_subformat = options.get("vmdk_subformat")
if vmdk_subformat:
extra_args["vmdk"] += ["-o", f"subformat={vmdk_subformat}"]
coroutines = os.environ.get("OSBUILD_QEMU_IMG_COROUTINES")
if coroutines:
print(f"qemu-img coroutines: {coroutines}")