Hi,
I have successfully used Rocky’s Kiwi-NG solution to create a Rocky 9 EC2 image with a custom partition layout using boxbuild on an EC2 instance (https://git.resf.org/sig_core/rocky-kiwi-description). However, when I try this with the r10 branch it fails with “failed to validate schema and/or schematron rules”. I’ve tried building using preferences for one of Rocky’s images with no luck. Is this a bug, and should I report it somewhere? Any ideas? This was such a neat solution over trying to do this manually as the boot environment has evolved, but I’m completely stumped now.
What are the exact steps you are taking to build using kiwi? As we are able to build our images using kiwi without issues in our build system, it would be helpful to know where you (and others) are having issues in building your own from our descriptions.
Hi @virginiap
I have seen on a forum some time ago the same errors and haven’t seen a clear solution yet. I think it could be a problem with the schema or validation rules in the r10 branch, but not sure. Maybe it would be a good idea to check and report the bug on GitHub, to see if others have encountered the same problem.
Update: I come back with an update to what I said previously, actually it has nothing to do with what I saw with what you said. But yes it could be a bug.
Thank you.
Here are the steps:
In AWS, launch an m5.metal instance running the latest available Rocky image (I originally tried this on a Rocky 9 host). Ensure root volume is 100GB.
install the following packages:
epel-release
kiwi-cli
git
dracut-kiwi-live
kiwi-systemdeps-{bootloaders,containers,core,disk-images,filesystems,image-validation,iso-media}
distribution-gpg-keys
awscli
Clone the r10 branch and copy to the m5.metal instance
Add the boxbuild option to cloud-build.sh with the following if clause in the main function:
if [[ “$BOXBUILD” == “true” ]]; then
# TODO: This uses a box definition/VM image from https://download.opensuse.org/repositories/Virtualization:/Appliances:/SelfContained:/ can we do a local one?
kiwi-ng $DEBUG --type=“oem” --profile=“Cloud-$CLOUD” --kiwi-file=config.xml
–color-output system boxbuild --box universal --virtiofs-sharing – --description=“$SCRDIR” --target-dir “$OUTPUTDIR”
Add to the environment:
PATH=$PATH:/usr/libexec
systemctl start libvirtd
setenforce 0
Build with:
cloud-build.sh -b -c EC2-LVM -o /path/to/images/
This worked nicely with Rocky 9 - I’m still trying to figure out what is causing the schema validation error with Rocky 10.
Remove the “vagrant” references in config.xml
and rocky-cloud-epel.xml
or remove the <info ...
tags from vagrant/vagrant.xml
. Since you are using the EPEL builds of kiwi, it lacks patches that we have in our own kiwi builds to accept the vagrant configuration we use.
Thank you! That was the fix. I had tried removing the <info tags from vagrant.xml, but still had an error - removing the references in config.xml and rocky-cloud-epel.xml eliminated all the errors.
This is really nice for creating differently partitioned cloud images! We’re getting a lot of use out of it. Our only additional wish is to have boxbuild included.