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):
|
||||
argv = []
|
||||
adapter_type = options.get("adapter_type")
|
||||
compat6 = options.get("compat6", False)
|
||||
compression = options.get("compression", True)
|
||||
subformat = options.get("subformat")
|
||||
|
||||
if compression:
|
||||
argv += ["-c"]
|
||||
|
||||
if subformat:
|
||||
argv += ["-o", f"subformat={subformat}"]
|
||||
if compat6 or subformat or adapter_type:
|
||||
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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,21 @@
|
|||
"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": {
|
||||
"description": "Enable/disable compression of the vmdk image",
|
||||
"type": "boolean",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue