Repository: osbuild/osbuild-composer
Pull request #1347 (2021-04-08 21:13:40)

distro: remove unused field from `distribution` struct
The `distribution` struct defined in multiple distributions contained unused `imageTypes` field. Remove it to simplify code.


Patch:
diff --git a/Schutzfile b/Schutzfile
index 0b9f37463..0b99196fb 100644
--- a/Schutzfile
+++ b/Schutzfile
@@ -1,5 +1,17 @@
 {
+  "fedora-32": {
+    "dependencies": {
+      "osbuild": {
+        "commit": "eb74ddf2ef8c203b5d354dfb97adee65babdc147"
+      }
+    }
+  },
   "fedora-33": {
+    "dependencies": {
+      "osbuild": {
+        "commit": "eb74ddf2ef8c203b5d354dfb97adee65babdc147"
+      }
+    },
     "dependants": {
       "koji-osbuild": {
         "commit": "4fdc457745e1147475ea3ac1e3b073e592d7b174"
@@ -9,7 +21,7 @@
   "rhel-8.3": {
     "dependencies": {
       "osbuild": {
-        "commit": "e4e527b5b7cdf8bb6e48a6ec3ace7d9d9b155bc0"
+        "commit": "eb74ddf2ef8c203b5d354dfb97adee65babdc147"
       }
     },
     "dependants": {
@@ -21,10 +33,17 @@
       }
     }
   },
+  "rhel-8.4": {
+    "dependencies": {
+      "osbuild": {
+        "commit": "eb74ddf2ef8c203b5d354dfb97adee65babdc147"
+      }
+    }
+  },
   "centos-8": {
     "dependencies": {
       "osbuild": {
-        "commit": "e4e527b5b7cdf8bb6e48a6ec3ace7d9d9b155bc0"
+        "commit": "eb74ddf2ef8c203b5d354dfb97adee65babdc147"
       }
     }
   }
diff --git a/docs/news/unreleased/rhel84-qcow2-compat.md b/docs/news/unreleased/rhel84-qcow2-compat.md
new file mode 100644
index 000000000..63db04770
--- /dev/null
+++ b/docs/news/unreleased/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/fedora32/distro.go b/internal/distro/fedora32/distro.go
index 2352f6ba2..f129a4321 100644
--- a/internal/distro/fedora32/distro.go
+++ b/internal/distro/fedora32/distro.go
@@ -22,7 +22,6 @@ const ostreeRef = "fedora/32/%s/iot"
 
 type distribution struct {
 	arches        map[string]architecture
-	imageTypes    map[string]imageType
 	buildPackages []string
 }
 
@@ -765,7 +764,6 @@ func New() distro.Distro {
 	}
 
 	r := distribution{
-		imageTypes: map[string]imageType{},
 		buildPackages: []string{
 			"dnf",
 			"dosfstools",
diff --git a/internal/distro/fedora33/distro.go b/internal/distro/fedora33/distro.go
index bd4b983f5..036871844 100644
--- a/internal/distro/fedora33/distro.go
+++ b/internal/distro/fedora33/distro.go
@@ -22,7 +22,6 @@ const ostreeRef = "fedora/33/%s/iot"
 
 type distribution struct {
 	arches        map[string]architecture
-	imageTypes    map[string]imageType
 	buildPackages []string
 }
 
@@ -800,7 +799,6 @@ func New() distro.Distro {
 	}
 
 	r := distribution{
-		imageTypes: map[string]imageType{},
 		buildPackages: []string{
 			"dnf",
 			"dosfstools",
diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go
index 02e391d62..8e91c8dcf 100644
--- a/internal/distro/rhel8/distro.go
+++ b/internal/distro/rhel8/distro.go
@@ -22,7 +22,6 @@ const ostreeRef = "rhel/8/%s/edge"
 
 type distribution struct {
 	arches        map[string]architecture
-	imageTypes    map[string]imageType
 	buildPackages []string
 }
 
@@ -1025,7 +1024,6 @@ func New() distro.Distro {
 	}
 
 	r := distribution{
-		imageTypes: map[string]imageType{},
 		buildPackages: []string{
 			"dnf",
 			"dosfstools",
diff --git a/internal/distro/rhel84/distro.go b/internal/distro/rhel84/distro.go
index e596f9d20..f4e1e017d 100644
--- a/internal/distro/rhel84/distro.go
+++ b/internal/distro/rhel84/distro.go
@@ -26,7 +26,6 @@ const ostreeRef = "rhel/8/%s/edge"
 
 type distribution struct {
 	arches        map[string]architecture
-	imageTypes    map[string]distro.ImageType
 	buildPackages []string
 	isCentos      bool
 }
@@ -742,11 +741,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 +1002,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, "")
 		},
 	}
 
@@ -1087,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)
 		},
 	}
 
@@ -1115,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, "")
 		},
 	}
 
@@ -1174,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, "")
 		},
 	}
 
@@ -1203,12 +1205,11 @@ 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, "")
 		},
 	}
 
 	r := distribution{
-		imageTypes: map[string]distro.ImageType{},
 		buildPackages: []string{
 			"dnf",
 			"dosfstools",
diff --git a/internal/distro/rhel90/distro.go b/internal/distro/rhel90/distro.go
index 66a45c8d2..10adf36d4 100644
--- a/internal/distro/rhel90/distro.go
+++ b/internal/distro/rhel90/distro.go
@@ -24,7 +24,6 @@ const modulePlatformID = "platform:el9"
 
 type distribution struct {
 	arches        map[string]architecture
-	imageTypes    map[string]distro.ImageType
 	buildPackages []string
 }
 
@@ -801,7 +800,6 @@ func New() distro.Distro {
 	}
 
 	r := distribution{
-		imageTypes: map[string]distro.ImageType{},
 		buildPackages: []string{
 			"dnf",
 			"dosfstools",
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 93794bbee..57e5a93f2 100644
--- a/osbuild-composer.spec
+++ b/osbuild-composer.spec
@@ -273,8 +273,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 >= 28
+Requires:   osbuild-ostree >= 28
 
 # remove in F34
 Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
diff --git a/tools/image-info b/tools/image-info
index 002323203..1b63156e0 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 dc64bb5dc..7df9eaaa6 100644
--- a/test/data/manifests/centos_8-x86_64-ami-boot.json
+++ b/test/data/manifests/centos_8-x86_64-ami-boot.json
@@ -10329,7 +10329,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 5e2f5f3ba..ca96cd8f5 100644
--- a/test/data/manifests/centos_8-x86_64-qcow2-boot.json
+++ b/test/data/manifests/centos_8-x86_64-qcow2-boot.json
@@ -4208,6 +4208,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -11030,7 +11031,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 0e33f523b..6dc49f370 100644
--- a/test/data/manifests/centos_8-x86_64-vhd-boot.json
+++ b/test/data/manifests/centos_8-x86_64-vhd-boot.json
@@ -10952,7 +10952,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 66ad8273e..d85c242f4 100644
--- a/test/data/manifests/centos_8-x86_64-vmdk-boot.json
+++ b/test/data/manifests/centos_8-x86_64-vmdk-boot.json
@@ -10540,7 +10540,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 627f2b2f6..ca7bf9880 100644
--- a/test/data/manifests/fedora_32-aarch64-ami-boot.json
+++ b/test/data/manifests/fedora_32-aarch64-ami-boot.json
@@ -8957,7 +8957,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 369ac2dcb..34f99e3b3 100644
--- a/test/data/manifests/fedora_32-aarch64-qcow2-boot.json
+++ b/test/data/manifests/fedora_32-aarch64-qcow2-boot.json
@@ -8811,7 +8811,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 00e0f2f4a..6b063e2bc 100644
--- a/test/data/manifests/fedora_32-x86_64-ami-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-ami-boot.json
@@ -9207,7 +9207,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 b92379c11..47b630a49 100644
--- a/test/data/manifests/fedora_32-x86_64-qcow2-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-qcow2-boot.json
@@ -9197,7 +9197,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 5031da6a3..211335105 100644
--- a/test/data/manifests/fedora_32-x86_64-vhd-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-vhd-boot.json
@@ -8809,7 +8809,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 909a28ea4..04016fe9f 100644
--- a/test/data/manifests/fedora_32-x86_64-vmdk-boot.json
+++ b/test/data/manifests/fedora_32-x86_64-vmdk-boot.json
@@ -8915,7 +8915,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 bfe43ea9d..3be497876 100644
--- a/test/data/manifests/fedora_33-aarch64-ami-boot.json
+++ b/test/data/manifests/fedora_33-aarch64-ami-boot.json
@@ -9878,7 +9878,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 91bcc5cb9..b15255593 100644
--- a/test/data/manifests/fedora_33-x86_64-ami-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-ami-boot.json
@@ -9449,7 +9449,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 2970315b1..3da9c7b60 100644
--- a/test/data/manifests/fedora_33-x86_64-qcow2-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-qcow2-boot.json
@@ -9389,7 +9389,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 3bdab8a8b..ea73cded5 100644
--- a/test/data/manifests/fedora_33-x86_64-vhd-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-vhd-boot.json
@@ -9051,7 +9051,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 cc79222bf..892530cdd 100644
--- a/test/data/manifests/fedora_33-x86_64-vmdk-boot.json
+++ b/test/data/manifests/fedora_33-x86_64-vmdk-boot.json
@@ -9389,7 +9389,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 6aef77f12..48783a69f 100644
--- a/test/data/manifests/rhel_8-aarch64-ami-boot.json
+++ b/test/data/manifests/rhel_8-aarch64-ami-boot.json
@@ -8569,7 +8569,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 e9d042365..232b59d8c 100644
--- a/test/data/manifests/rhel_8-aarch64-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-aarch64-qcow2-boot.json
@@ -9594,7 +9594,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 2329a100d..5e9b7820c 100644
--- a/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-ppc64le-qcow2-boot.json
@@ -10324,7 +10324,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 721d4af3d..376c9ed81 100644
--- a/test/data/manifests/rhel_8-s390x-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-s390x-qcow2-boot.json
@@ -10204,7 +10204,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 63b0b8412..d49b7e387 100644
--- a/test/data/manifests/rhel_8-x86_64-ami-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-ami-boot.json
@@ -8557,7 +8557,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 d61359a7b..c09647112 100644
--- a/test/data/manifests/rhel_8-x86_64-qcow2-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-qcow2-boot.json
@@ -9567,7 +9567,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 3d75608ce..3933cca92 100644
--- a/test/data/manifests/rhel_8-x86_64-vhd-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-vhd-boot.json
@@ -9050,7 +9050,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 f77eaeef0..f6504d800 100644
--- a/test/data/manifests/rhel_8-x86_64-vmdk-boot.json
+++ b/test/data/manifests/rhel_8-x86_64-vmdk-boot.json
@@ -8693,7 +8693,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 99addd354..9b14047e2 100644
--- a/test/data/manifests/rhel_84-aarch64-ami-boot.json
+++ b/test/data/manifests/rhel_84-aarch64-ami-boot.json
@@ -8981,7 +8981,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 cdf77befd..d30a6c605 100644
--- a/test/data/manifests/rhel_84-aarch64-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-aarch64-qcow2-boot.json
@@ -3470,6 +3470,7 @@
         "name": "org.osbuild.qemu",
         "options": {
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -9472,7 +9473,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 8d5006865..238fc9734 100644
--- a/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-ppc64le-qcow2-boot.json
@@ -3753,6 +3753,7 @@
             "platform": "powerpc-ieee1275"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "0x14fc63d2",
@@ -10199,7 +10200,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 a44520a6b..0644c353f 100644
--- a/test/data/manifests/rhel_84-s390x-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-s390x-qcow2-boot.json
@@ -3694,6 +3694,7 @@
             "type": "zipl"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "0x14fc63d2",
@@ -10131,7 +10132,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 277561e49..2a10b1475 100644
--- a/test/data/manifests/rhel_84-x86_64-ami-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-ami-boot.json
@@ -9149,7 +9149,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 fb35223a1..df31342df 100644
--- a/test/data/manifests/rhel_84-x86_64-qcow2-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-qcow2-boot.json
@@ -3520,6 +3520,7 @@
             "type": "grub2"
           },
           "format": "qcow2",
+          "qcow2_compat": "0.10",
           "filename": "disk.qcow2",
           "size": 10737418240,
           "ptuuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
@@ -9610,7 +9611,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 33d3b2712..5412228b5 100644
--- a/test/data/manifests/rhel_84-x86_64-vhd-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-vhd-boot.json
@@ -9657,7 +9657,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 54e82d483..5b01cbf0f 100644
--- a/test/data/manifests/rhel_84-x86_64-vmdk-boot.json
+++ b/test/data/manifests/rhel_84-x86_64-vmdk-boot.json
@@ -9308,7 +9308,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_90-aarch64-qcow2-boot.json b/test/data/manifests/rhel_90-aarch64-qcow2-boot.json
index 592037623..79549c848 100644
--- a/test/data/manifests/rhel_90-aarch64-qcow2-boot.json
+++ b/test/data/manifests/rhel_90-aarch64-qcow2-boot.json
@@ -9569,7 +9569,10 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "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_90-ppc64le-qcow2-boot.json b/test/data/manifests/rhel_90-ppc64le-qcow2-boot.json
index 813987771..7d6f23db6 100644
--- a/test/data/manifests/rhel_90-ppc64le-qcow2-boot.json
+++ b/test/data/manifests/rhel_90-ppc64le-qcow2-boot.json
@@ -10320,7 +10320,10 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "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_90-s390x-qcow2-boot.json b/test/data/manifests/rhel_90-s390x-qcow2-boot.json
index 07db59ad8..9d71f1616 100644
--- a/test/data/manifests/rhel_90-s390x-qcow2-boot.json
+++ b/test/data/manifests/rhel_90-s390x-qcow2-boot.json
@@ -9775,7 +9775,10 @@
       "zkeyadm:x:987:"
     ],
     "hostname": "localhost.localdomain",
-    "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_90-x86_64-qcow2-boot.json b/test/data/manifests/rhel_90-x86_64-qcow2-boot.json
index 737a05a44..6f5b91b74 100644
--- a/test/data/manifests/rhel_90-x86_64-qcow2-boot.json
+++ b/test/data/manifests/rhel_90-x86_64-qcow2-boot.json
@@ -9706,7 +9706,10 @@
       "wheel:x:10:"
     ],
     "hostname": "localhost.localdomain",
-    "image-format": "qcow2",
+    "image-format": {
+      "type": "qcow2",
+      "compat": "1.1"
+    },
     "os-release": {
       "ANSI_COLOR": "0;31",
       "BUG_REPORT_URL": "https://bugzilla.redhat.com/",