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

If you install libkrun-sev onto a system without /dev/sem support, crun-krun blows up. #1120

Open
rhatdan opened this issue Jan 13, 2023 · 2 comments

Comments

@rhatdan
Copy link
Member

rhatdan commented Jan 13, 2023

$ podman run --privileged --runtime=krun alpine echo hi
Error: krun: failed configuring mounts for handler at phase: HANDLER_CONFIGURE_AFTER_MOUNTS: No such file or directory: OCI runtime attempted to invoke a command that was not found

$sudo dnf -y remove libkrun-sev
Dependencies resolved.
...
Complete!

$ podman run --privileged --runtime=krun alpine echo hi
hi

@slp
Copy link
Contributor

slp commented Jan 13, 2023

The problem comes from here:

ret = libcrun_create_dev (container, devfd, -1, &sev_device, is_user_ns, true, err);

If the library is installed, the krun handler will try to open /dev/sev to create the bindmount, or fail otherwise. The problem is, at that stage, we can't check the existence of /.krun-sev.json as we do in libkrun_exec(), but perhaps we could capture the error and, instead of failing, silently disable the sev handler (by setting kconf->handle_sev = NULL)?

@rhatdan
Copy link
Member Author

rhatdan commented Jan 27, 2023

@giuseppe @flouthoc WDYT?

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

No branches or pull requests

2 participants