-
Notifications
You must be signed in to change notification settings - Fork 59
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
Publish meta-data for use with virt-manager #221
Comments
A corresponding issue has been filed for virt-manager in https://bugzilla.redhat.com/show_bug.cgi?id=1731219 |
So, if we could have the .treeinfo, that would already be useful, cf https://arrfab.net/posts/2020/Sep/11/deploying-openshift-in-kvmlibvirt-guests/ |
I'm having some basic doubts about this ticket, and I'd be happy to have some treeinfo/virt-manager expert chime in here to help clearing those. All the treeinfo refs/examples I've seen so far are describing a set of ISOs, or kernel+fs artifacts. However for FCOS we do publish qcow2 images for the |
AFAICT treeinfo would only be relevant for the installer iso. Maybe FCOS doesn't publish one, but RHCOS does, for example: Inside there's an That latter URL has a .treeinfo file which applications can parse to find for example the architecture of the kernel in the tree, and the location of the kernel+initrd in the tree. Also some metadata that apps can use to identify the media in isolation (Name: Fedora Rawhide for example) virt-install/virt-manager can boot off that media as a CDROM without needing to know kernel/initrd location. But if the user wants to pass in kernel arguments, qemu needs to boot the kernel directly, meaning virt-install needs to extract the kernel from the ISO, meaning it needs to know where the kernel is on the iso. That's where .treeinfo comes in. FWIW all other RH based distros (and suse nowadays) put a treeinfo file on their non-live install media and in their URL trees |
We are actually working on support for injecting kernel arguments into the ISO, see coreos/coreos-assembler#1637
Fedora CoreOS only has a Live ISO that can also be used for installation - there's no special installer ISO. RHCOS after OpenShift 4.6 and above will also match this, see https://github.com/openshift/enhancements/blob/master/enhancements/rhcos/liveisoinstall.md |
We did work recently to put the PXE artifacts in the ISO. They're at the standard
I started hacking on adding a Edit: threw up coreos/coreos-assembler#1733. |
Assuming the ISO image still gets attached to the VM, it would also work for the .treeinfo file to carry the |
This comes up often. We should publish treeinfo metadata in to make it easier for other tools to find what they're looking for. This solves the ISO part of coreos/fedora-coreos-tracker#221, but not the "remote tree" case. Related: coreos/fedora-coreos-tracker#221
This comes up often. We should publish a treeinfo to make it easier for other tools to find what they're looking for. This solves the ISO part of coreos/fedora-coreos-tracker#221, but not the "remote tree" case. Related: coreos/fedora-coreos-tracker#221
Pulling out kernel/initrd from the ISO is typically used with full install tree DVDs and netboot isos that boot straight into the distro installer instance, where it's useful for users to have access to kernel args so they can pass in things like kickstart files. If the ISO is intended as live media, then IMO it's expected that virt-install does not know how to extract kernel/initrd from that ISO. We skip that for other distro live media too. FWIW my initial treeinfo suggestion came from https://bugzilla.redhat.com/show_bug.cgi?id=1731219 which was about use of RHEL CoreOS media |
Our live ISO plays double duty. It also works like a typical install ISO that can be configured solely from kernel args. As Colin said, we're working on adding kargs support for the ISO, though it'd be nice if In coreos/coreos-assembler#1733, I add a new |
@jlebon That'd work, but I think adding treeinfo support for default kernel arguments would be more generally useful outside of FCOS/RHCOS. Then we could mount the rootfs from the ISO and keep it out of RAM entirely. |
Right, agreed. I was trying to address both cases (ISO and remote tree) in one RFE. Definitely an improvement in the ISO case if we can pull the rootfs directly from there. |
@jlebon I would like to avoid merging the two initrds. In this area virt-install is exclusively concerned with locating kernel/initrd location in a tree, I would rather not open the door to performing default media manipulations for distros, sounds like a slippery slope TBH I know CoreOS is different in a lot of ways so I'm not sure what is relevant here but let me provide more info about how other distros work WRT virt-install. Say a user does For the ISO install case, if requested to extract kernel/initrd so user can pass in custom args, virt-install doesn't add any kernel arguments ourselves. AFAIK for all distros that virt-install supports, when booting directly from kernel+initrd and there is CDROM attached install media, it does the right thing by using the local installer (if it's DVD) or grabbing an install URL from a known location (if it's netboot). You mention there is the kernel arg |
Thanks, those details are helpful.
This comment initially confused me, so to clarify: the name of the
We could extend coreos-livepxe-rootfs.sh to read the #625 is relevant here; maybe the well-known URL should be a redirector that reads stream metadata.
How does the distro know whether to wait for local media or to netboot? When virt-install does a direct kernel+initrd boot, does it pass different kernel arguments if there is or isn't a local ISO? So I'm currently seeing three high-level issues:
Would the first two be good candidates for virt-install RFEs? On the upside, |
That's correct, sorry for not being more clear.
One note: I wasn't implying
I don't know. Maybe @bcl can help. Brian can you check the two previous comments and correct our understanding here.
We only pass default kernel arguments (
If we had Fedora CoreOS entries in osinfo-db, which point to stable locations for qcow2 disk images, we could extend virt-install to pull these down automatically
If there's some static default kernel arguments that would go into .treeinfo anyways, IMO save users the step and make the initrd key it off the |
Okay, that helps.
SGTM. By design, our only stable URLs at present are for the stream metadata, but the redirector proposed in #625 could address that too. Is virt-install equipped to handle GPG verification? I'm not seeing GPG keys in the osinfo-db repo.
We currently detect the ISO by searching for a build-specific filesystem label which is embedded in the kernel arguments. If the treeinfo file includes kargs, and we're generating the treeinfo file for every build, we could preserve this property. The goal is to avoid heuristics like "wait 10 seconds for a filesystem that looks vaguely like a CoreOS live image, and then fall back to something else", since they can fail in some cases. I think we could get away with this:
We'd lose robustness in the edge case that multiple CoreOS ISOs are attached to the system; we'd probably just pick one. We could use the rootfs stream hash to verify that the ISO version matches the initramfs, and fail if not. We'd also need to duplicate the above logic from So I think we can work within the current virt-install mechanism if needed; it just seems odd that the direct-boot option takes away the OS's traditional direct control over its kernel arguments. The image-based install would still be preferable as a default, but ideally we'd support both that and the installer flow. |
For reference, I cross-linked this into https://gitlab.com/libosinfo/osinfo-db/-/issues/67 in order to see how to approach the "rolling streams with releases" in osinfo-db. |
And, just to make things cleaner, I'm tracking FCOS addition to osinfo-db here: https://gitlab.com/libosinfo/osinfo-db/-/issues/68 |
This PR just got merged and should be part of our next release. |
Neither virt-install or libosinfo have any GPG awareness. It's a good thing to add though. Everything else sounds good to me to the extent that I understood it :) |
I think I just discovered this issue when trying to install OKD with coreos 34 and injecting parameters; no rootfs found. |
To support the existing libvirt tooling used across Red Hat products we should support the instantiation of hosts with
virt-install
. To do this most effectively we will need to coordinate the following:.treeinfo
metadata which can be consumed by virt-manager based tooling.The text was updated successfully, but these errors were encountered: