stages/qemu: expose vpc options
Currently we hard code the vpc options `subformat=fixed` and `force_size`, which are needed to generate valid azure images with newer versions of qemu. But for other use cases or other versions of qemu these options might not be wanted or valid. Expose all the options but with defaults corresponding to the old behavior. Add a unit test for the `force_size` option to check its effect. Also add a check for the correct size to the existing, default value (i.e. `force_size` being `true`).
This commit is contained in:
parent
3ffba19205
commit
86123da599
4 changed files with 82 additions and 2 deletions
|
|
@ -27,7 +27,12 @@
|
|||
}
|
||||
},
|
||||
"image.vpc": {
|
||||
"format": "raw"
|
||||
"format": "raw",
|
||||
"virtual-size": 104858112
|
||||
},
|
||||
"image-no-force-size.vpc": {
|
||||
"format": "raw",
|
||||
"virtual-size": 104866304
|
||||
},
|
||||
"image.vhdx": {
|
||||
"format": "vhdx"
|
||||
|
|
|
|||
|
|
@ -522,6 +522,33 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "image-no-force-size.vpc",
|
||||
"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-no-force-size.vpc",
|
||||
"format": {
|
||||
"type": "vpc",
|
||||
"force_size": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "image.vhdx",
|
||||
"build": "name:build",
|
||||
|
|
|
|||
|
|
@ -179,6 +179,33 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "image-no-force-size.vpc",
|
||||
"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-no-force-size.vpc",
|
||||
"format": {
|
||||
"type": "vpc",
|
||||
"force_size": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "image.vhdx",
|
||||
"build": "name:build",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue