Skip to content

Fix the cc-GPU initrd path - #1

Open
pezhang wants to merge 1 commit into
confidential-devhub:mainfrom
pezhang:fix_cc_gpu_initrd_path
Open

Fix the cc-GPU initrd path#1
pezhang wants to merge 1 commit into
confidential-devhub:mainfrom
pezhang:fix_cc_gpu_initrd_path

Conversation

@pezhang

@pezhang pezhang commented Apr 2, 2026

Copy link
Copy Markdown

This PR fix the path of the cc-GPU initrd path.

TDX testing:

# veritas --platform baremetal --tee tdx --ocp-version 4.21.6   --authfile /home/pezhang/coco76029/veritas/pull-secret   --kata-rpm  /home/pezhang/coco76029/veritas/kata-containers-3.25.0-5.rhaos4.21.el9.x86_64.rpm --initdata /home/pezhang/coco76029/veritas/initdata.toml   --hw-xfam-allow x87   --hw-xfam-allow sse   --hw-xfam-allow avx   --hw-xfam-allow avx512   --hw-xfam-allow pkru   --hw-xfam-allow amx  --mem-size 34359738368
INFO: Processing OCP 4.21.6
INFO: Verifying OCP 4.21.6 release payload...
INFO: Release verified: sha256:683c4a4eed9c4005b7d331fe0e55b5f943b1d57f40f4d4b77f059f52ad127092 2026-03-13T10:47:13Z 4.21.6
INFO: Extensions image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4b7730a0ce3bd93692b4c633510dd658a0970d7f4adeeaf486d5e207bce52cd2
INFO: Using cached extensions: /root/.cache/veritas/extensions/4b7730a0ce3bd93692b4c633510dd658a0970d7f4adeeaf486d5e207bce52cd2
INFO: Using custom kata RPM: /home/pezhang/coco76029/veritas/kata-containers-3.25.0-5.rhaos4.21.el9.x86_64.rpm
INFO: Found edk2 RPM: edk2-ovmf-20241117-2.el9_6.2.noarch.rpm
INFO: Found vmlinuz: /tmp/tmpg0tw1wrf/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/vmlinuz
INFO: Found initrd: /tmp/tmpg0tw1wrf/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/kata-cc.initrd
INFO: Found GPU initrd: /tmp/tmpg0tw1wrf/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/kata-cc-nvidia-gpu-580.105.08.initrd
INFO: Found OVMF.inteltdx.fd: /tmp/tmpg0tw1wrf/usr/share/edk2/ovmf/OVMF.inteltdx.fd
INFO: Found OVMF.amdsev.fd: /tmp/tmpg0tw1wrf/usr/share/edk2/ovmf/OVMF.amdsev.fd
INFO: Generating measurements for regular (non-GPU) pods
INFO: mr_td: 27fb849fb05653add8be4b8c5b2793e66d1e25773a5c6f80dabbc10a5cb18bc40b7d5caaaf299e3a200f7018cdaa6f74
INFO: Computed RTMRs for 32 cmdline variant(s), 1 unique rtmr_1, 32 unique rtmr_2
INFO: Generating measurements for GPU pods
INFO: mr_td: 27fb849fb05653add8be4b8c5b2793e66d1e25773a5c6f80dabbc10a5cb18bc40b7d5caaaf299e3a200f7018cdaa6f74
INFO: Computed RTMRs for 32 cmdline variant(s), 1 unique rtmr_1, 32 unique rtmr_2
INFO: Written rvps-reference-values.yaml

SNP testing:

# veritas --platform baremetal --tee snp --ocp-version 4.21.6 --authfile /home/pezhang/coco752529/veritas/pull-secret   --kata-rpm  /home/pezhang/coco752529/veritas/kata-containers-3.25.0-5.rhaos4.21.el9.x86_64.rpm --initdata /home/pezhang/coco752529/veritas/initdata.toml --mem-size 34359738368
INFO: Processing OCP 4.21.6
INFO: Verifying OCP 4.21.6 release payload...
INFO: Release verified: sha256:683c4a4eed9c4005b7d331fe0e55b5f943b1d57f40f4d4b77f059f52ad127092 2026-03-13T10:47:13Z 4.21.6
INFO: Extensions image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4b7730a0ce3bd93692b4c633510dd658a0970d7f4adeeaf486d5e207bce52cd2
INFO: Using cached extensions: /root/.cache/veritas/extensions/4b7730a0ce3bd93692b4c633510dd658a0970d7f4adeeaf486d5e207bce52cd2
INFO: Using custom kata RPM: /home/pezhang/coco752529/veritas/kata-containers-3.25.0-5.rhaos4.21.el9.x86_64.rpm
INFO: Found edk2 RPM: edk2-ovmf-20241117-2.el9_6.2.noarch.rpm
INFO: Found vmlinuz: /tmp/tmpbq90t60o/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/vmlinuz
INFO: Found initrd: /tmp/tmpbq90t60o/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/kata-cc.initrd
INFO: Found GPU initrd: /tmp/tmpbq90t60o/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/kata-cc-nvidia-gpu-580.105.08.initrd
INFO: Found OVMF.inteltdx.fd: /tmp/tmpbq90t60o/usr/share/edk2/ovmf/OVMF.inteltdx.fd
INFO: Found OVMF.amdsev.fd: /tmp/tmpbq90t60o/usr/share/edk2/ovmf/OVMF.amdsev.fd
INFO: Generating measurements for regular (non-GPU) pods
INFO: Computed SNP measurements for 32 cmdline variant(s), 32 unique
INFO: Generating measurements for GPU pods
INFO: Computed SNP measurements for 32 cmdline variant(s), 32 unique
INFO: Written rvps-reference-values.yaml

Signed-off-by: Pei Zhang <pezhang@redhat.com>
@pezhang
pezhang force-pushed the fix_cc_gpu_initrd_path branch from 614f888 to 3e677e1 Compare April 2, 2026 03:44
EXTENSIONS_PATH = "/usr/share/rpm-ostree/extensions"
INITRD_GLOB = "osbuilder-images/*/kata-cc.initrd"
GPU_INITRD_GLOB = "osbuilder-images/*/kata-*gpu*.initrd"
GPU_INITRD_GLOB = "osbuilder-images/*/kata-cc-*gpu*.initrd"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pezhang thanks for the PR number 1 !! :)

I'm just curious why the previous line didn't catch your initrd. Do you see how the line you are removing is broader?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @beraldoleal , in the below codes from https://github.com/confidential-devhub/veritas/blob/main/src/veritas/platforms/baremetal.py, seems the artifacts["gpu_initrd"] has only read the 1st item.

            # Detect GPU initrd
            gpu_initrd_candidates = list(extract_path.rglob(self.GPU_INITRD_GLOB))
            if gpu_initrd_candidates:
                artifacts["gpu_initrd"] = gpu_initrd_candidates[0]
                log.info("Found GPU initrd: %s", artifacts["gpu_initrd"])

So we only get 1 GPU initrd without this PR:
INFO: Found GPU initrd: /tmp/tmpbgui7v60/usr/share/kata-containers/osbuilder-images/6.12.0-124.21.1.el10_1.x86_64/kata-nvidia-gpu-580.105.08.initrd

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