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

OVA file order and checksum issues #431

Closed
forkineye opened this issue Feb 2, 2024 · 1 comment · Fixed by #426
Closed

OVA file order and checksum issues #431

forkineye opened this issue Feb 2, 2024 · 1 comment · Fixed by #426

Comments

@forkineye
Copy link

Describe the bug
There are two issues I've found which prevent OVA files generated from being imported into VMware Workstation or processed with ovftool. I have reproduced this with RedHat 8.9 and RedHat's cloud service. If this needs to split into two issues or filed elsewhere, please let me know. I'm a developer without a RedHat subscription, hence filing the issue here.

  • The first involves the order of the ova archive. VMware Workstation and ovftool both insist that the ovf file be the first file within the archive.
  • The second has to do with how the vmdk is being generated, which causes checksum validation to fail.

Environment

To Reproduce

  • Using the attached json, generate a rhel9 image at https://console.redhat.com
  • Extract the OVA with ovftool: ovftool <image>.ova <image>
    or
  • Open <image>.ova in VMware Workstation

Expected behavior
For it to work :)

Additional context
Upon importing into VMware Workstation or processing with ovtool, both complain that with the following:
image

Performing the following, specifying the ovf file first, results in composer.ova that rectifies the first issue.

$ mkdir composer; cd composer
$ tar xvf ../composer-api-715edf78-fc2a-4daa-b4f8-9ae2201b02d3-image.ova
image.vmdk
image.ovf
image.mf
$ tar cvf ../composer.ova image.ovf image.vmdk image.mf
image.ovf
image.vmdk
image.mf

The 2nd issue is that sha256sum for the vmdk does not pass with VMware Workstation or ovftool, even though the checksums match when performed manually:
image

$ cat image.mf
SHA256(image.ovf)= 6da8f04757080733d31aba0ef670385c505e75963c0e72371b63603ec69dfb1b
SHA256(image.vmdk)= 3f1c81e5fc5285501c3d90d72115b563ca0beaa35443799536d942f7df570156
$ sha256sum.exe image.vmdk
3f1c81e5fc5285501c3d90d72115b563ca0beaa35443799536d942f7df570156 *image.vmdk

To rectify this issue, I can remove the manifest when re-building the OVA with tar, however this is not ideal. This issue seems to shed light as to what is going on, in particularly the usage of stream optimized output - home-assistant/operating-system#2121 (comment)

@bcl
Copy link
Contributor

bcl commented Feb 2, 2024

Thanks for the report, the file order issue is being worked on in osbuild/osbuild#1561

@thozza thozza transferred this issue from osbuild/osbuild-composer Feb 8, 2024
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 a pull request may close this issue.

2 participants