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

Request for info: running hermit-based applications on top of Xen #389

Open
lyuts opened this issue Dec 27, 2022 · 3 comments
Open

Request for info: running hermit-based applications on top of Xen #389

lyuts opened this issue Dec 27, 2022 · 3 comments

Comments

@lyuts
Copy link

lyuts commented Dec 27, 2022

Hi guys,

Thank you for this project and your effort, this looks very interesting and promising. Out of curiosity I decided to give a try of hello world in one of test xen installations.

Compiled with

cargo build -Zbuild-std=std,core,alloc,panic_abort -Zbuild-std-features=compiler-builtins-mem --target x86_64-unknown-hermit

I grabbed the produced binary, created an empty initramfs and tried spinning up a domU. Guest failed to run, and I'm getting the following errors in the xl logs.

2022-12-27 02:10:11.988+0000: xc: panic: xc_dom_hvmloader.c:112: xc_dom_parse_hvm_kernel: ELF image is not 32bit: Invalid kernel
2022-12-27 02:10:11.988+0000: libxl: libxl_dom.c:578:libxl__build_dom: xc_dom_parse_image failed
2022-12-27 02:10:11.988+0000: libxl: libxl_create.c:1654:domcreate_rebuild_done: Domain 53:cannot (re-)build domain: -3
$ file target/x86_64-unknown-hermit/debug/unikernel_demo
target/x86_64-unknown-hermit/debug/unikernel_demo: ELF 64-bit LSB pie executable, x86-64, version 1 (embedded), dynamically linked, BuildID[xxHash]=3122861d032a21a2, with debug_info, not stripped

This is probably not a bug, and instead I'm looking for pointers in investigating this or proper ways to run this on Xen. Any bits of information would be useful.
Thank you.

@lyuts
Copy link
Author

lyuts commented Dec 29, 2022

Update: I should confirm that I'm on a 64bit host, and 32 bit error message looks like a red herring. I realized that I'm just feeding in a produced binary as is. I compressed it and I'm now getting a more descriptive error:

xc: panic: xc_dom_core.c:692: xc_dom_find_loader: no loader found: Invalid kernel

which makes sense, and I need to figure out how to bundle both loader and kernel when creating the guest.

@stlankes
Copy link
Contributor

Excuse me, I oversaw this issue. I know this issue. Currently, we don't have the time to support Xen.

@lyuts
Copy link
Author

lyuts commented Feb 25, 2023

@stlankes , do you think would it be possible for you and/or other project core team to document Xen support, i.e. issues, blockers, and what bits are missing? I myself would find it very useful for studying the domain, and maybe someone from the community could step up and help with the implementation.

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