-
Notifications
You must be signed in to change notification settings - Fork 168
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
buildextend-virtualbox
and buildextend-vmware
improperly handle raw disks >=8GB
#3787
Comments
None of the other output formats that happen to use a VMDK disk format need to be affected by this (i.e. The only thing that should be affected is the definition and implementation in the ova.py file. As a reference, the EDIT: Corrected what portions of the build are run. |
The easiest implementation for this change would likely be to just always use split VMDKs for the OVA formats ( |
Correction to the original post, the However, the |
I'm a moron. There's no reason to mess with the subformat, the existing VMDK just needs to be chunked up. The OVF format supports chunked files and the The built-in file renaming logic will cause an issue though. That seems to be a special case only though, and isn't even strictly necessary for OVA output if the OVF template includes the VMDK name instead of hardcoding it. Other than the unnecessary rename for OVAs, the |
I was working on a change that would use split VMDK disks, and discovered that VMWare and Virtualbox both fail to comply with the OVF 1.0/1.1 spec. Neither accepts split disks. However it also turns out neither generate or enforce the OVF standard properly either. Among other things, they don't care if the OVA archive is in POSIX or USTAR format, they both always generate it in POSIX (non-compliant) format when explicitly generating an "OVF 1.0" archive and accept input archives in either POSIX or USTAR. So the simple fix seems to be to drop the unnecessarily strict OVF 1.0 compliance during generation since even a round trip export-import from the tools themselves (or between the tools) don't comply, and relax to use the POSIX tar format. Notably, they don't support GNU format though, only POSIX and USTAR. |
Hey @mtalexan I've read over things here briefly. Obviously for FCOS and RHCOS we don't generate images that large so we never hit the limitation you are running into -> Yay for us, bad for you. With all things there is always risk/reward that has to be considered. Changing things here would represent a decent amount of risk for us, with not very much reward. Maybe we could add an option to do what you want, but probably wouldn't change the default behavior. Also I will mention that there are efforts underway to do most of our disk building using the https://github.com/osbuild/osbuild project, so any changes we do here in COSA might be useless if that project didn't also support those changes. |
Bug Report
The
buildextend-virtualbox
andbuildextend-vmware
formats generate OVA files. The OVA standard defines that it's a USTAR format tarball containing an OVF definition and the associated files (primarily the VMDK disk files). USTAR tarball format only supports individual files <8GB.If the vmdk is 8GB or larger, the VMDK needs to be generated as a split disk so the files can be placed into the OVA (USTAR tarball), otherwise a build error is produced by the
tar
command. Currently this isn't done.Environment
What operating system is being used to run coreos-assembler?
Container image on Fedora 39 and on Ubuntu 22.04.
What operating system is being assembled?
Customized Fedora CoreOS image.
Is coreos-assembler running in Podman or Docker?
Yes, either/both.
If Podman, is coreos-assembler running privileged or unprivileged?
Privileged.
Expected Behavior
The OVA file is generated successfully.
Actual Behavior
The OVA file is not generated, and a build error is reported from the
tar
command.Example:
Reproduction Steps
cosa init
dd if=/dev/urand of=overrides/rootfs/somebigfile.bin bs=4M count=4000 status=progress
(16GB file of random binary data here)cosa fetch && cosa build
cosa buildextend-virtualbox
orcosa buildextend-vmware
Other Information
According to the QEMU block driver documentation for VMDK format, it appears it's possible to add an extra subformat option
twoGbMaxExtentSparse
which the associated code suggests would generate split VMDK files with each file being only 2GB in size, and isn't mutually exclusive with the existingstreamOptimized
option (or the others non-subformat
options used for thevmware
build.This could easily be added to the
QemuVariant
data structures in the code that define how to generate the output disk, and would get handled when the VMDK is created. The OVF template also wouldn't need to be changed at all for this, the split VMDK format produces adisk.vmdk
file that then references all the split part files, so the way to refer to it in the OVF is the same regardless of whether it's a split VMDK or not.What would need to be changed though is the files that need to be collected for inclusion in the OVA. Instead of it being only a single
disk.vmdk
and the generated OVF file, it would need to include the all the VMDK split part files as well.The text was updated successfully, but these errors were encountered: