Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osbuild: support building kubevirt disks #4034

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

dustymabe
Copy link
Member

Also a second commit for supporting the new platforms when symlinked.

At some point we'll symlink all of the original cmd-buildextend* files
to cmd-osbuild and we need this glue to make them work when they are
symlinked.
@dustymabe
Copy link
Member Author

Here is some data from two successive builds, one using cosa buildextend-kubevirt (the current code) and the other using cosa osbuild kubevirt.

It appears to compress a little better using OSBuild:

$ diffbuildsizes.py 41.20250305.dev.0 41.20250305.dev.1
    platform     | compression  | 41.20250305.dev.0 | 41.20250305.dev.1
---------------------------------------------------------------------
ostree           | compressed   | 750MiB           | 750MiB
ostree           | uncompressed | N/A              | N/A
oci-manifest     | compressed   | 15KiB            | 15KiB
oci-manifest     | uncompressed | N/A              | N/A
qemu             | compressed   | 1722MiB          | 1722MiB
qemu             | uncompressed | N/A              | N/A
kubevirt         | compressed   | 900MiB           | 876MiB
kubevirt         | uncompressed | N/A              | N/A

And most of the skopeo inspect and qemu-img info are equivalent:

41.20250305.dev.0 (using buildextend-kubevirt)

[dustymabe@media fcos]$ skopeo inspect oci-archive:./builds/41.20250305.dev.0/x86_64/fedora-coreos-41.20250305.dev.0-kubevirt.x86_64.ociarchive
{
    "Digest": "sha256:a4803fecbf1d3a8438bb1ac0d3e7a1084dc3de791b06688bb1141dc413ad55e5",
    "RepoTags": [],
    "Created": "2025-03-05T13:51:13.371096906Z",
    "DockerVersion": "",
    "Labels": {
        "io.buildah.version": "1.38.1",
        "version": "41.20250305.dev.0"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:2afdacca5c5ad930169fbc6acbf838a8112c186f1ca1f8abd3bb77583af95c4b"
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip",
            "Digest": "sha256:2afdacca5c5ad930169fbc6acbf838a8112c186f1ca1f8abd3bb77583af95c4b",
            "Size": 943916860,
            "Annotations": null
        }
    ],
    "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ]
}
[dustymabe@media fcos]$ podman unshare
[root@media fcos]$ podman pull oci-archive:./builds/41.20250305.dev.0/x86_64/fedora-coreos-41.20250305.dev.0-kubevirt.x86_64.ociarchive
Getting image source signatures
Copying blob 2afdacca5c5a done   | 
Copying config 572680e61f done   | 
Writing manifest to image destination
572680e61f2f993c464f7d2aaa4cf69a65a103adcd2c51716c19d2219888fefc
[root@media fcos]$ podman image mount 572680e6
/var/b/dustymabe-local-share-containers/storage/overlay/45edc52d9b6da5d2fefa9a15dcab553f6a54a0e6958f3e3a0fe89bf3460c422d/merged
[root@media fcos]$ qemu-img info /var/b/dustymabe-local-share-containers/storage/overlay/45edc52d9b6da5d2fefa9a15dcab553f6a54a0e6958f3e3a0fe89bf3460c422d/merged/disk/fedora-coreos-41.20250305.dev.0-kubevirt.x86_64.qcow2 
image: /var/b/dustymabe-local-share-containers/storage/overlay/45edc52d9b6da5d2fefa9a15dcab553f6a54a0e6958f3e3a0fe89bf3460c422d/merged/disk/fedora-coreos-41.20250305.dev.0-kubevirt.x86_64.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 1.68 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/b/dustymabe-local-share-containers/storage/overlay/45edc52d9b6da5d2fefa9a15dcab553f6a54a0e6958f3e3a0fe89bf3460c422d/merged/disk/fedora-coreos-41.20250305.dev.0-kubevirt.x86_64.qcow2
    protocol type: file
    file length: 1.68 GiB (1806368768 bytes)
    disk size: 1.68 GiB

41.20250305.dev.1 (using OSBuild)

[dustymabe@media fcos]$ skopeo inspect oci-archive:./builds/41.20250305.dev.1/x86_64/fedora-coreos-41.20250305.dev.1-kubevirt.x86_64.ociarchive
{
    "Digest": "sha256:59786deaf153acaa2543993654244a9834cf5b64692dd54efd70768b2276a440",
    "RepoTags": [],
    "Created": "2025-03-05T13:57:41Z",
    "DockerVersion": "",
    "Labels": {
        "version": "41.20250305.dev.1"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:589b28b0189762e7559c30a64f2f1a08e1f88ccbd10c7832d58c024e49d64e48"
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip",
            "Digest": "sha256:589b28b0189762e7559c30a64f2f1a08e1f88ccbd10c7832d58c024e49d64e48",
            "Size": 919207411,
            "Annotations": null
        }
    ],
    "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ]
}
[dustymabe@media fcos]$ podman unshare
[root@media fcos]$ podman pull oci-archive:./builds/41.20250305.dev.1/x86_64/fedora-coreos-41.20250305.dev.1-kubevirt.x86_64.ociarchive
Getting image source signatures
Copying blob 589b28b01897 done   | 
Copying config 82498b4f4f done   | 
Writing manifest to image destination
82498b4f4fe7095d774336d23c02211449c09481b7ceef5850d0b5b49f0bb03d
[root@media fcos]$ podman image mount 82498b4f
/var/b/dustymabe-local-share-containers/storage/overlay/32942a119219c1e81ff2c7bf8c86dd9131f9a412652b424af5b8d1984d8a8d9c/merged
[root@media fcos]$ qemu-img info /var/b/dustymabe-local-share-containers/storage/overlay/32942a119219c1e81ff2c7bf8c86dd9131f9a412652b424af5b8d1984d8a8d9c/merged/disk/fedora-coreos-41.20250305.dev.1-kubevirt.x86_64.qcow2 
image: /var/b/dustymabe-local-share-containers/storage/overlay/32942a119219c1e81ff2c7bf8c86dd9131f9a412652b424af5b8d1984d8a8d9c/merged/disk/fedora-coreos-41.20250305.dev.1-kubevirt.x86_64.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 1.68 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/b/dustymabe-local-share-containers/storage/overlay/32942a119219c1e81ff2c7bf8c86dd9131f9a412652b424af5b8d1984d8a8d9c/merged/disk/fedora-coreos-41.20250305.dev.1-kubevirt.x86_64.qcow2
    protocol type: file
    file length: 1.68 GiB (1806630912 bytes)
    disk size: 1.68 GiB

@dustymabe dustymabe merged commit 71f5992 into coreos:main Mar 5, 2025
5 checks passed
@dustymabe dustymabe deleted the dusty-osbuild-add-kubevirt branch March 5, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants