Repository: osbuild/osbuild-composer
Pull request #1346 (2021-04-08 09:24:41)

[8.4.0] distro/rhel84: build qcow2 images with compat=0.10 and prepare 28.4
By default, `qemu-img convert` creates qcow2 images usable in qemu 1.1 and
newer. RHEL 8 guest images are meant to be bootable on RHEL 6 though.
Unfortunately, RHEL 6 has qemu 0.12, therefore these images cannot be used
there.

To fix this, we need to use the new qcow2_compat option in qemu assembler
to override the default compat version and make qcow2 images that can be used
in qemu 0.10 and newer.

For this, we need a newer osbuild, therefore we need to change the pinning
in Schutzfile.

This pull request includes:

- [x] adequate testing for the new functionality or fixed issue
- [x] adequate documentation informing people about the change such as
  - [x] create a file in [news/unreleased](https://github.com/osbuild/osbuild-composer/tree/main/docs/news/unreleased) directory if this change should be mentioned in the release news
  - [ ] submit a PR for the [guides](https://github.com/osbuild/guides) repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

<!--
Thanks for proposing a change to osbuild-composer!

Please don't remove the above check list. These are things that each pull
request must have before it is merged. It helps maintainers to not forget
anything.

If the reason for ticking any of the boxes is ambiguous, please add a short
note explaining why.

For user-visible changes, "adequate documentation" is an entry describing the
change for users in docs/news. Please refer to docs/news/README.md for details.

In addition, if this pull request fixes a downstream issue, please refer to
test/README.md and add these additional items:

- [ ] 1st commit of any `rhbz#` related PR contains bug reproducer; CI reports FAIL or
- [ ] PR contains automated tests for new functionality and
- [ ] QE has approved reproducer/new tests and
- [ ] Subsequent commits provide bug fixes without modifying the reproducer; CI reports PASS and
- [ ] QE approves this PR; RHBZ status is set to `MODIFIED + Verified=Tested`
-->


achilleas-k: Will this be added to the main branch as well?  Should we close #1344 and rebase this instead (later)?
ondrejbudai: > Will this be added to the main branch as well? Should we close #1344 and rebase this instead (later)?

Yes but for that, we need a new osbuild release from the `main` branch, @gicmo is working on it.
ondrejbudai: force-pushed a unit test fix - I forgot to regenerate CentOS manifests.
ondrejbudai: We actually have to change all manifests because of the new image-info format otherwise image tests are failing. I force-pushed a fix.
schutzbot: Heya osbuilders!

PSI is still down so the usual CI isn't available. Don't worry though! I took RPMs that I managed to build on PSI while it still worked, spun a bunch of EC2 instances connected to the Red Hat's internal network and ran the test suite there! I used one of the`*.metal` instance types to have `KVM` available. Therefore, I was able to run all tests including `libvirt` integration tests and image tests that use `qemu`.

All tests passed except for OpenStack boot tests (PSI is down). I posted the most important result (image tests) here: https://gist.github.com/schutzbot/b1f35a06af47af41daf4b0e4a521d418

Therefore, I'm giving :heavy_check_mark:  to this PR!

Happy weekend!

~Schutzbot

*(Actually, this comment was made by @ondrejbudai who just ran the testsuite manually on AWS because this is a blocker and we need to ship it asap.)*

Patch:
diff --git a/NEWS.md b/NEWS.md
index 47ad5759d..a756f403c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,16 @@
 # OSBuild Composer - Operating System Image Composition Services
 
+## CHANGES WITH 28.4:
+
+* Previously, the guest image for RHEL 8.4 was only usable by QEMU 1.1 and
+  newer. However, this image should be usable on RHEL 6 that ships an older
+  version of QEMU. This is now fixed and the guest image can be now used by
+  QEMU 0.10 and newer.
+
+Contributions from: Aleksandar Todorov, Christian Kellner, Ondřej Budai
+
+— Liberec, 2021-04-08
+
 ## CHANGES WITH 28.3:
 
   * Version 28.1 introduced a regression causing logs from osbuild to be
diff --git a/Schutzfile b/Schutzfile
index 85b02230d..3bcd3280a 100644
--- a/Schutzfile
+++ b/Schutzfile
@@ -1,37 +1,8 @@
 {
-  "fedora-32": {
-    "dependants": {
-      "koji-osbuild": {
-        "commit": "4fdc457745e1147475ea3ac1e3b073e592d7b174"
-      }
-    }
-  },
-  "rhel-8.3": {
-    "dependencies": {
-      "osbuild": {
-        "commit": "755c07a142ce2e8e88420590be553d8a255f3326"
-      }
-    },
-    "dependants": {
-      "koji-osbuild": {
-        "commit": "4fdc457745e1147475ea3ac1e3b073e592d7b174",
-        "pre_install_packages": [
-          "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
-        ]
-      }
-    }
-  },
   "rhel-8.4": {
     "dependencies": {
       "osbuild": {
-        "commit": "5de2d3f96bd4841738846d5e4f1e0e4ed01e7a2a"
-      }
-    }
-  },
-  "centos-8": {
-    "dependencies": {
-      "osbuild": {
-        "commit": "e4e527b5b7cdf8bb6e48a6ec3ace7d9d9b155bc0"
+        "commit": "f2370e1f6fa85a2f2d1025448a92a1a0bd55204f"
       }
     }
   }
diff --git a/docs/news/28.4/rhel84-qcow2-compat.md b/docs/news/28.4/rhel84-qcow2-compat.md
new file mode 100644
index 000000000..63db04770
--- /dev/null
+++ b/docs/news/28.4/rhel84-qcow2-compat.md
@@ -0,0 +1,6 @@
+# RHEL 8.4: qcow2 images can now be used by older QEMUs
+
+Previously, the guest image for RHEL 8.4 was only usable by QEMU 1.1 and
+newer. However, this image should be usable on RHEL 6 that ships an older
+version of QEMU. This is now fixed and the guest image can be now used by
+QEMU 0.10 and newer.
diff --git a/internal/distro/rhel84/distro.go b/internal/distro/rhel84/distro.go
index 120089e18..dec111fd2 100644
--- a/internal/distro/rhel84/distro.go
+++ b/internal/distro/rhel84/distro.go
@@ -742,11 +742,12 @@ func defaultPartitionTable(imageOptions distro.ImageOptions, arch distro.Arch, r
 	panic("unknown arch: " + arch.Name())
 }
 
-func qemuAssembler(pt *disk.PartitionTable, format string, filename string, imageOptions distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
+func qemuAssembler(pt *disk.PartitionTable, format string, filename string, imageOptions distro.ImageOptions, arch distro.Arch, qcow2Compat string) *osbuild.Assembler {
 	options := pt.QEMUAssemblerOptions()
 
 	options.Format = format
 	options.Filename = filename
+	options.Qcow2Compat = qcow2Compat
 
 	if arch.Name() == "x86_64" {
 		options.Bootloader = &osbuild.QEMUBootloader{
@@ -1002,7 +1003,7 @@ func newDistro(isCentos bool) distro.Distro {
 		defaultSize:             6 * GigaByte,
 		partitionTableGenerator: defaultPartitionTable,
 		assembler: func(pt *disk.PartitionTable, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
-			return qemuAssembler(pt, "raw", "image.raw", options, arch)
+			return qemuAssembler(pt, "raw", "image.raw", options, arch, "")
 		},
 	}
 
@@ -1086,7 +1087,9 @@ func newDistro(isCentos bool) distro.Distro {
 		defaultSize:             10 * GigaByte,
 		partitionTableGenerator: defaultPartitionTable,
 		assembler: func(pt *disk.PartitionTable, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
-			return qemuAssembler(pt, "qcow2", "disk.qcow2", options, arch)
+			// guest images of RHEL 8 must be bootable with older QEMUs.
+			const qcow2Compat = "0.10"
+			return qemuAssembler(pt, "qcow2", "disk.qcow2", options, arch, qcow2Compat)
 		},
 	}
 
@@ -1114,7 +1117,7 @@ func newDistro(isCentos bool) distro.Distro {
 		defaultSize:             4 * GigaByte,
 		partitionTableGenerator: defaultPartitionTable,
 		assembler: func(pt *disk.PartitionTable, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
-			return qemuAssembler(pt, "qcow2", "disk.qcow2", options, arch)
+			return qemuAssembler(pt, "qcow2", "disk.qcow2", options, arch, "")
 		},
 	}
 
@@ -1173,7 +1176,7 @@ func newDistro(isCentos bool) distro.Distro {
 		defaultSize:             4 * GigaByte,
 		partitionTableGenerator: defaultPartitionTable,
 		assembler: func(pt *disk.PartitionTable, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
-			return qemuAssembler(pt, "vpc", "disk.vhd", options, arch)
+			return qemuAssembler(pt, "vpc", "disk.vhd", options, arch, "")
 		},
 	}
 
@@ -1202,7 +1205,7 @@ func newDistro(isCentos bool) distro.Distro {
 		defaultSize:             4 * GigaByte,
 		partitionTableGenerator: defaultPartitionTable,
 		assembler: func(pt *disk.PartitionTable, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
-			return qemuAssembler(pt, "vmdk", "disk.vmdk", options, arch)
+			return qemuAssembler(pt, "vmdk", "disk.vmdk", options, arch, "")
 		},
 	}
 
diff --git a/internal/osbuild1/qemu_assembler.go b/internal/osbuild1/qemu_assembler.go
index b0a200df9..4d6788212 100644
--- a/internal/osbuild1/qemu_assembler.go
+++ b/internal/osbuild1/qemu_assembler.go
@@ -7,13 +7,14 @@ package osbuild1
 // containing the indicated partitions. Finally, the image is converted into
 // the target format and stored with the given filename.
 type QEMUAssemblerOptions struct {
-	Bootloader *QEMUBootloader `json:"bootloader,omitempty"`
-	Format     string          `json:"format"`
-	Filename   string          `json:"filename"`
-	Size       uint64          `json:"size"`
-	PTUUID     string          `json:"ptuuid"`
-	PTType     string          `json:"pttype"`
-	Partitions []QEMUPartition `json:"partitions"`
+	Bootloader  *QEMUBootloader `json:"bootloader,omitempty"`
+	Format      string          `json:"format"`
+	Qcow2Compat string          `json:"qcow2_compat,omitempty"`
+	Filename    string          `json:"filename"`
+	Size        uint64          `json:"size"`
+	PTUUID      string          `json:"ptuuid"`
+	PTType      string          `json:"pttype"`
+	Partitions  []QEMUPartition `json:"partitions"`
 }
 
 type QEMUPartition struct {
diff --git a/osbuild-composer.spec b/osbuild-composer.spec
index 4b57e997a..add90d410 100644
--- a/osbuild-composer.spec
+++ b/osbuild-composer.spec
@@ -4,7 +4,7 @@
 
 %global goipath         github.com/osbuild/osbuild-composer
 
-Version:        28.3
+Version:        28.4
 
 %gometa
 
@@ -267,8 +267,8 @@ The core osbuild-composer binary. This is suitable both for spawning in containe
 Summary:    The worker for osbuild-composer
 Requires:   systemd
 Requires:   qemu-img
-Requires:   osbuild >= 26
-Requires:   osbuild-ostree >= 26
+Requires:   osbuild >= 27.2
+Requires:   osbuild-ostree >= 27.2
 
 # remove in F34
 Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
diff --git a/tools/image-info b/tools/image-info
index 681d48614..9096cb14c 100755
--- a/tools/image-info
+++ b/tools/image-info
@@ -152,7 +152,11 @@ def subprocess_check_output(argv, parse_fn=None):
 
 def read_image_format(device):
     qemu = subprocess_check_output(["qemu-img", "info", "--output=json", device], json.loads)
-    return qemu["format"]
+    format = qemu["format"]
+    result = {"type": format}
+    if format == "qcow2":
+        result["compat"] = qemu["format-specific"]["data"]["compat"]
+    return result
 
 
 def read_partition(device, partition):


Test patch:
diff --git a/test/data/manifests/centos_8-x86_64-ami-boot.json b/test/data/manifests/centos_8-x86_64-ami-boot.json
index 849d21093..a309481c5 100644
--- a/test/data/manifests/centos_8-x86_64-ami-boot.json
+++ b/test/data/manifests/centos_8-x86_64-ami-boot.json
@@ -10332,7 +10332,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/centos_8-x86_64-openstack-boot.json b/test/data/manifests/centos_8-x86_64-openstack-boot.json
index 26c625d91..b08ebe8a9 100644
--- a/test/data/manifests/centos_8-x86_64-openstack-boot.json
+++ b/test/data/manifests/centos_8-x86_64-openstack-boot.json
@@ -11038,7 +11038,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/centos_8-x86_64-qcow2-boot.json b/test/data/manifests/centos_8-x86_64-qcow2-boot.json
index 87395359d..a9e36e9bd 100644
--- a/test/data/manifests/centos_8-x86_64-qcow2-boot.json
+++ b/test/data/manifests/centos_8-x86_64-qcow2-boot.json
@@ -4204,6 +4204,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -11016,7 +11017,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/centos_8-x86_64-qcow2-customize.json b/test/data/manifests/centos_8-x86_64-qcow2-customize.json
index d056d2c09..0578db7ba 100644
--- a/test/data/manifests/centos_8-x86_64-qcow2-customize.json
+++ b/test/data/manifests/centos_8-x86_64-qcow2-customize.json
@@ -4309,6 +4309,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -11124,7 +11125,10 @@
       "wheel:x:10:"
     ],
     "hostname": "my-host",
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
@@ -11770,4 +11774,4 @@
     },
     "timezone": "London"
   }
-}
\ No newline at end of file
+}
diff --git a/test/data/manifests/centos_8-x86_64-vhd-boot.json b/test/data/manifests/centos_8-x86_64-vhd-boot.json
index 183e3e956..5892e1550 100644
--- a/test/data/manifests/centos_8-x86_64-vhd-boot.json
+++ b/test/data/manifests/centos_8-x86_64-vhd-boot.json
@@ -10955,7 +10955,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/centos_8-x86_64-vmdk-boot.json b/test/data/manifests/centos_8-x86_64-vmdk-boot.json
index 7e9c7fee9..dec04b543 100644
--- a/test/data/manifests/centos_8-x86_64-vmdk-boot.json
+++ b/test/data/manifests/centos_8-x86_64-vmdk-boot.json
@@ -10543,7 +10543,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "vmdk",
+    "image-format": {
+      "type": "vmdk"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-aarch64-ami-boot.json b/test/data/manifests/fedora_32-aarch64-ami-boot.json
index 45b9bb064..46c0bc27a 100644
--- a/test/data/manifests/fedora_32-aarch64-ami-boot.json
+++ b/test/data/manifests/fedora_32-aarch64-ami-boot.json
@@ -8960,7 +8960,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-aarch64-openstack-boot.json b/test/data/manifests/fedora_32-aarch64-openstack-boot.json
index 5b4b71dc5..051938d65 100644
--- a/test/data/manifests/fedora_32-aarch64-openstack-boot.json
+++ b/test/data/manifests/fedora_32-aarch64-openstack-boot.json
@@ -9311,7 +9311,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-aarch64-qcow2-boot.json b/test/data/manifests/fedora_32-aarch64-qcow2-boot.json
index 370c613af..0bc86a024 100644
--- a/test/data/manifests/fedora_32-aarch64-qcow2-boot.json
+++ b/test/data/manifests/fedora_32-aarch64-qcow2-boot.json
@@ -8814,7 +8814,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-ami-boot.json b/test/data/manifests/fedora_32-x86_64-ami-boot.json
index 8d4ef8ea8..c712ca85b 100644
--- a/test/data/manifests/fedora_32-x86_64-ami-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-ami-boot.json
@@ -9210,7 +9210,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-openstack-boot.json b/test/data/manifests/fedora_32-x86_64-openstack-boot.json
index 144537a0f..5c21e8c69 100644
--- a/test/data/manifests/fedora_32-x86_64-openstack-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-openstack-boot.json
@@ -9561,7 +9561,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-qcow2-boot.json b/test/data/manifests/fedora_32-x86_64-qcow2-boot.json
index 8fd974a04..a3415e727 100644
--- a/test/data/manifests/fedora_32-x86_64-qcow2-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-qcow2-boot.json
@@ -9200,7 +9200,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-qcow2-customize.json b/test/data/manifests/fedora_32-x86_64-qcow2-customize.json
index 3fc5904de..6e1382ce7 100644
--- a/test/data/manifests/fedora_32-x86_64-qcow2-customize.json
+++ b/test/data/manifests/fedora_32-x86_64-qcow2-customize.json
@@ -9312,7 +9312,10 @@
       "wheel:x:10:"
     ],
     "hostname": "my-host",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-vhd-boot.json b/test/data/manifests/fedora_32-x86_64-vhd-boot.json
index f59ea1bd2..3218176d4 100644
--- a/test/data/manifests/fedora_32-x86_64-vhd-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-vhd-boot.json
@@ -8812,7 +8812,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_32-x86_64-vmdk-boot.json b/test/data/manifests/fedora_32-x86_64-vmdk-boot.json
index 80ffc08f3..537f866ba 100644
--- a/test/data/manifests/fedora_32-x86_64-vmdk-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-vmdk-boot.json
@@ -8918,7 +8918,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "vmdk",
+    "image-format": {
+      "type": "vmdk"
+    },
     "os-release": {
       "ANSI_COLOR": "0;34",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-aarch64-ami-boot.json b/test/data/manifests/fedora_33-aarch64-ami-boot.json
index c515b9c17..d1799fe39 100644
--- a/test/data/manifests/fedora_33-aarch64-ami-boot.json
+++ b/test/data/manifests/fedora_33-aarch64-ami-boot.json
@@ -9881,7 +9881,9 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-ami-boot.json b/test/data/manifests/fedora_33-x86_64-ami-boot.json
index f94664deb..80d7917f1 100644
--- a/test/data/manifests/fedora_33-x86_64-ami-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-ami-boot.json
@@ -9452,7 +9452,9 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-openstack-boot.json b/test/data/manifests/fedora_33-x86_64-openstack-boot.json
index 014f08e24..102cb2be1 100644
--- a/test/data/manifests/fedora_33-x86_64-openstack-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-openstack-boot.json
@@ -9768,7 +9768,10 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-qcow2-boot.json b/test/data/manifests/fedora_33-x86_64-qcow2-boot.json
index 55885c7fd..189b561a9 100644
--- a/test/data/manifests/fedora_33-x86_64-qcow2-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-qcow2-boot.json
@@ -9392,7 +9392,10 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-qcow2-customize.json b/test/data/manifests/fedora_33-x86_64-qcow2-customize.json
index ea852bbbc..ef15e3076 100644
--- a/test/data/manifests/fedora_33-x86_64-qcow2-customize.json
+++ b/test/data/manifests/fedora_33-x86_64-qcow2-customize.json
@@ -9492,7 +9492,10 @@
       "wheel:x:10:"
     ],
     "hostname": "my-host",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-vhd-boot.json b/test/data/manifests/fedora_33-x86_64-vhd-boot.json
index a87a486d3..5931361ca 100644
--- a/test/data/manifests/fedora_33-x86_64-vhd-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-vhd-boot.json
@@ -9054,7 +9054,9 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/fedora_33-x86_64-vmdk-boot.json b/test/data/manifests/fedora_33-x86_64-vmdk-boot.json
index da2926fc2..d9a91097b 100644
--- a/test/data/manifests/fedora_33-x86_64-vmdk-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-vmdk-boot.json
@@ -9392,7 +9392,9 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "vmdk",
+    "image-format": {
+      "type": "vmdk"
+    },
     "os-release": {
       "ANSI_COLOR": "0;38;2;60;110;180",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-aarch64-ami-boot.json b/test/data/manifests/rhel_8-aarch64-ami-boot.json
index 551de0974..ab905caa2 100644
--- a/test/data/manifests/rhel_8-aarch64-ami-boot.json
+++ b/test/data/manifests/rhel_8-aarch64-ami-boot.json
@@ -8572,7 +8572,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-aarch64-openstack-boot.json b/test/data/manifests/rhel_8-aarch64-openstack-boot.json
index 342b62337..91abbe77d 100644
--- a/test/data/manifests/rhel_8-aarch64-openstack-boot.json
+++ b/test/data/manifests/rhel_8-aarch64-openstack-boot.json
@@ -9138,7 +9138,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-aarch64-qcow2-boot.json b/test/data/manifests/rhel_8-aarch64-qcow2-boot.json
index a74e00c8f..7e178577d 100644
--- a/test/data/manifests/rhel_8-aarch64-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-aarch64-qcow2-boot.json
@@ -9597,7 +9597,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json b/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json
index 106fc7b65..40bc7609a 100644
--- a/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json
@@ -10327,7 +10327,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-s390x-qcow2-boot.json b/test/data/manifests/rhel_8-s390x-qcow2-boot.json
index 10c012efd..6d927aab5 100644
--- a/test/data/manifests/rhel_8-s390x-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-s390x-qcow2-boot.json
@@ -10207,7 +10207,10 @@
       "wheel:x:10:",
       "zkeyadm:x:996:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-ami-boot.json b/test/data/manifests/rhel_8-x86_64-ami-boot.json
index a8c7da4f3..583cc1c95 100644
--- a/test/data/manifests/rhel_8-x86_64-ami-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-ami-boot.json
@@ -8560,7 +8560,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-openstack-boot.json b/test/data/manifests/rhel_8-x86_64-openstack-boot.json
index 55b43a0d5..ac85daf13 100644
--- a/test/data/manifests/rhel_8-x86_64-openstack-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-openstack-boot.json
@@ -9141,7 +9141,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-qcow2-boot.json b/test/data/manifests/rhel_8-x86_64-qcow2-boot.json
index c7ee06385..a73f89935 100644
--- a/test/data/manifests/rhel_8-x86_64-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-qcow2-boot.json
@@ -9570,7 +9570,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-qcow2-customize.json b/test/data/manifests/rhel_8-x86_64-qcow2-customize.json
index 45c9ac211..99bd8bf2f 100644
--- a/test/data/manifests/rhel_8-x86_64-qcow2-customize.json
+++ b/test/data/manifests/rhel_8-x86_64-qcow2-customize.json
@@ -9696,7 +9696,10 @@
       "wheel:x:10:"
     ],
     "hostname": "my-host",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-vhd-boot.json b/test/data/manifests/rhel_8-x86_64-vhd-boot.json
index 50a5f2153..52add5cd8 100644
--- a/test/data/manifests/rhel_8-x86_64-vhd-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-vhd-boot.json
@@ -9053,7 +9053,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_8-x86_64-vmdk-boot.json b/test/data/manifests/rhel_8-x86_64-vmdk-boot.json
index 3db8b4152..e6f30816a 100644
--- a/test/data/manifests/rhel_8-x86_64-vmdk-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-vmdk-boot.json
@@ -8696,7 +8696,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "vmdk",
+    "image-format": {
+      "type": "vmdk"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-aarch64-ami-boot.json b/test/data/manifests/rhel_84-aarch64-ami-boot.json
index aa54ffc99..18536023e 100644
--- a/test/data/manifests/rhel_84-aarch64-ami-boot.json
+++ b/test/data/manifests/rhel_84-aarch64-ami-boot.json
@@ -8984,7 +8984,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-aarch64-openstack-boot.json b/test/data/manifests/rhel_84-aarch64-openstack-boot.json
index 5cddc1ec6..5f776ed26 100644
--- a/test/data/manifests/rhel_84-aarch64-openstack-boot.json
+++ b/test/data/manifests/rhel_84-aarch64-openstack-boot.json
@@ -9550,7 +9550,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-aarch64-qcow2-boot.json b/test/data/manifests/rhel_84-aarch64-qcow2-boot.json
index ddec70554..9f98e93cf 100644
--- a/test/data/manifests/rhel_84-aarch64-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-aarch64-qcow2-boot.json
@@ -3467,6 +3467,7 @@
         "name": "org.osbuild.qemu",
         "options": {
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -9460,7 +9461,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json b/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json
index 4d82e21a2..4343e8f90 100644
--- a/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json
@@ -3750,6 +3750,7 @@
             "platform": "powerpc-ieee1275"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "0x14fc63d2",
@@ -10187,7 +10188,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-s390x-qcow2-boot.json b/test/data/manifests/rhel_84-s390x-qcow2-boot.json
index 3951a4864..b518e414f 100644
--- a/test/data/manifests/rhel_84-s390x-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-s390x-qcow2-boot.json
@@ -3691,6 +3691,7 @@
             "type": "zipl"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "0x14fc63d2",
@@ -10119,7 +10120,10 @@
       "wheel:x:10:",
       "zkeyadm:x:996:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-ami-boot.json b/test/data/manifests/rhel_84-x86_64-ami-boot.json
index 8fe39e224..76cdb1016 100644
--- a/test/data/manifests/rhel_84-x86_64-ami-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-ami-boot.json
@@ -9152,7 +9152,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-openstack-boot.json b/test/data/manifests/rhel_84-x86_64-openstack-boot.json
index 8ad30308b..19ba7ff70 100644
--- a/test/data/manifests/rhel_84-x86_64-openstack-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-openstack-boot.json
@@ -9733,7 +9733,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-qcow2-boot.json b/test/data/manifests/rhel_84-x86_64-qcow2-boot.json
index 6a9932fba..cc539dfdc 100644
--- a/test/data/manifests/rhel_84-x86_64-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-qcow2-boot.json
@@ -3517,6 +3517,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -9598,7 +9599,10 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-qcow2-customize.json b/test/data/manifests/rhel_84-x86_64-qcow2-customize.json
index 3b82dc93c..ec67d6b68 100644
--- a/test/data/manifests/rhel_84-x86_64-qcow2-customize.json
+++ b/test/data/manifests/rhel_84-x86_64-qcow2-customize.json
@@ -3622,6 +3622,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -9706,7 +9707,10 @@
       "wheel:x:10:"
     ],
     "hostname": "my-host",
-    "image-format": "qcow2",
+    "image-format": {
+      "compat": "0.10",
+      "type": "qcow2"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-vhd-boot.json b/test/data/manifests/rhel_84-x86_64-vhd-boot.json
index bb60c5e47..c95c632e7 100644
--- a/test/data/manifests/rhel_84-x86_64-vhd-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-vhd-boot.json
@@ -9660,7 +9660,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "raw",
+    "image-format": {
+      "type": "raw"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/test/data/manifests/rhel_84-x86_64-vmdk-boot.json b/test/data/manifests/rhel_84-x86_64-vmdk-boot.json
index 6458b64fb..497c9172a 100644
--- a/test/data/manifests/rhel_84-x86_64-vmdk-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-vmdk-boot.json
@@ -9311,7 +9311,9 @@
       "video:x:39:",
       "wheel:x:10:"
     ],
-    "image-format": "vmdk",
+    "image-format": {
+      "type": "vmdk"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",
diff --git a/tools/test-case-generators/generate-test-cases b/tools/test-case-generators/generate-test-cases
index 2e28c03bc..9dcc57d39 100755
--- a/tools/test-case-generators/generate-test-cases
+++ b/tools/test-case-generators/generate-test-cases
@@ -23,7 +23,7 @@ def run_osbuild(manifest, store, output, export):
             subprocess.run(["osbuild",
                             "--store", store,
                             "--output-directory", output,
-                            "--checkpoint", "build"
+                            "--checkpoint", "build",
                             "--export", export,
                             "-"],
                             stdout=log,