stages: add more options to qemu vmdk disk type
The CoreOS team uses the compat6 and adapter_type options when creating
a VMDK for AWS.
e1943d6adb/src/cosalib/qemuvariants.py (L48)
This commit is contained in:
parent
441fbf70d6
commit
4e033c305e
4 changed files with 72 additions and 2 deletions
|
|
@ -21,14 +21,24 @@ def qcow2_arguments(options):
|
||||||
|
|
||||||
def vmdk_arguments(options):
|
def vmdk_arguments(options):
|
||||||
argv = []
|
argv = []
|
||||||
|
adapter_type = options.get("adapter_type")
|
||||||
|
compat6 = options.get("compat6", False)
|
||||||
compression = options.get("compression", True)
|
compression = options.get("compression", True)
|
||||||
subformat = options.get("subformat")
|
subformat = options.get("subformat")
|
||||||
|
|
||||||
if compression:
|
if compression:
|
||||||
argv += ["-c"]
|
argv += ["-c"]
|
||||||
|
|
||||||
if subformat:
|
if compat6 or subformat or adapter_type:
|
||||||
argv += ["-o", f"subformat={subformat}"]
|
opts = []
|
||||||
|
if adapter_type:
|
||||||
|
opts += [f"adapter_type={adapter_type}"]
|
||||||
|
if compat6:
|
||||||
|
opts += ["compat6"]
|
||||||
|
if subformat:
|
||||||
|
opts += [f"subformat={subformat}"]
|
||||||
|
argv += ["-o", ",".join(opts)]
|
||||||
|
|
||||||
return argv
|
return argv
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,21 @@
|
||||||
"vmdk"
|
"vmdk"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"adapter_type": {
|
||||||
|
"description": "Virtual adapter type",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ide",
|
||||||
|
"lsilogic",
|
||||||
|
"buslogic",
|
||||||
|
"legacyESX"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"compat6": {
|
||||||
|
"description": "VMDK version 6 image",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"compression": {
|
"compression": {
|
||||||
"description": "Enable/disable compression of the vmdk image",
|
"description": "Enable/disable compression of the vmdk image",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
||||||
|
|
@ -638,6 +638,34 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "image-compat6-adapter-type.vmdk",
|
||||||
|
"build": "name:build",
|
||||||
|
"stages": [
|
||||||
|
{
|
||||||
|
"type": "org.osbuild.qemu",
|
||||||
|
"inputs": {
|
||||||
|
"image": {
|
||||||
|
"type": "org.osbuild.files",
|
||||||
|
"origin": "org.osbuild.pipeline",
|
||||||
|
"references": {
|
||||||
|
"name:image": {
|
||||||
|
"file": "image.raw"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"filename": "image-stream.vmdk",
|
||||||
|
"format": {
|
||||||
|
"type": "vmdk",
|
||||||
|
"compat6": true,
|
||||||
|
"adapter_type": "lsilogic"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "image.vpc",
|
"name": "image.vpc",
|
||||||
"build": "name:build",
|
"build": "name:build",
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,23 @@ pipelines:
|
||||||
format:
|
format:
|
||||||
type: vmdk
|
type: vmdk
|
||||||
subformat: streamOptimized
|
subformat: streamOptimized
|
||||||
|
- name: image-compat6-adapter-type.vmdk
|
||||||
|
build: name:build
|
||||||
|
stages:
|
||||||
|
- type: org.osbuild.qemu
|
||||||
|
inputs:
|
||||||
|
image:
|
||||||
|
type: org.osbuild.files
|
||||||
|
origin: org.osbuild.pipeline
|
||||||
|
references:
|
||||||
|
name:image:
|
||||||
|
file: image.raw
|
||||||
|
options:
|
||||||
|
filename: image-stream.vmdk
|
||||||
|
format:
|
||||||
|
type: vmdk
|
||||||
|
compat6: true
|
||||||
|
adapter_type: lsilogic
|
||||||
- name: image.vpc
|
- name: image.vpc
|
||||||
build: name:build
|
build: name:build
|
||||||
stages:
|
stages:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue