Skip to content

feat(monitor): add initial support for embedded hyperlight VMM (#140) - #632

Open
imshubham22apr-gif wants to merge 5 commits into
urunc-dev:mainfrom
imshubham22apr-gif:feat/issue-140-hyperlight-support
Open

feat(monitor): add initial support for embedded hyperlight VMM (#140)#632
imshubham22apr-gif wants to merge 5 commits into
urunc-dev:mainfrom
imshubham22apr-gif:feat/issue-140-hyperlight-support

Conversation

@imshubham22apr-gif

@imshubham22apr-gif imshubham22apr-gif commented May 6, 2026

Copy link
Copy Markdown

This PR introduces initial support for the Hyperlight embedded VMM. Because Hyperlight is embedded directly within the application binary, this implementation avoids external process orchestration (like QEMU or Firecracker) and instead provides a lightweight monitor that executes the unikernel binary directly with its provided arguments.

Related issues

How was this tested?

  • Unit Testing: Created pkg/unikontainers/hypervisors/hyperlight_test.go to verify that the execution command is correctly constructed both with and without additional command-line arguments.
  • Compilation: Verified that the project and the new monitor package compile without errors for the target platform using $env:GOOS='linux'; go build ./....
  • Static Analysis: Ran go fmt and go vet to ensure code quality and adherence to Go standards.

LLM usage

  • LLM Usage Code development and test infrastructure setup were assisted by Ai.
  • Checklist

  • I have read the contribution guide.
  • The linter passes locally (go vet).
  • The e2e tests of at least one tool pass locally (E2E tests require a Linux environment with KVM/Hyperlight setup).
  • If LLMs were used: I have read the llm policy.

@netlify

netlify Bot commented May 6, 2026

Copy link
Copy Markdown

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 6c9f522
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a2a951cb517080008f7b891
😎 Deploy Preview https://deploy-preview-632--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cmainas

cmainas commented May 8, 2026

Copy link
Copy Markdown
Contributor

Hello @imshubham22apr-gif ,

the testing methods you provide in the description are not sufficient. Please run an end-to-end test targeting hyperlight.

Also please read the contribution guide.

@imshubham22apr-gif

Copy link
Copy Markdown
Author

Hello @imshubham22apr-gif ,

the testing methods you provide in the description are not sufficient. Please run an end-to-end test targeting hyperlight.

Also please read the contribution guide.

Update on E2E Testing :- I have successfully set up the environment with Docker, containerd, nerdctl, and crictl.

Unit Tests :- Passed successfully.
E2E Tests :- I attempted to run the tests for Hyperlight, but they are failing across all tools (Docker, ctr, nerdctl, crictl) because the image harbor.nbfc.io/nubificus/urunc/hello-hyperlight-unikraft:latest returns a 404 Not Found from the registry.

Logs for reference :-

Unit Tests: PASS :- TestHyperlightBuildExecCmd
E2E Pull Error :- failed to resolve reference "harbor.nbfc.io/nubificus/urunc/hello-hyperlight-unikraft:latest": not found
Please let me know if I should use a different image or if the image needs to be pushed to the registry. I am ready to re-run the tests once the image is available.....

@cmainas

cmainas commented May 14, 2026

Copy link
Copy Markdown
Contributor

Well, you will need to replace the image reference with one that you have created and used for testing.

@danbugs

danbugs commented Jun 3, 2026

Copy link
Copy Markdown

Hey @imshubham22apr-gif, @cmainas–just came across this. I'm Dan, a core Hyperlight maintainer.

Hoping to unblock this, I made a urunc-ready hello-hyperlight-unikraft OCI image (kernel + initrd + urunc.json) that'll be published to GHCR once hyperlight-dev/hyperlight-unikraft#89 merges.

With that, I also had to make some changes to this PR's code–available here: https://github.com/danbugs/urunc/compare/feat/issue-140-hyperlight-support. Minor changes, but it does shift the approach to treat hyperlight-unikraft as a host-level VMM (like QEMU) rather than embedded. The reason is that hyperlight-unikraft takes a kernel and initrd as separate arguments (hyperlight-unikraft <kernel> --initrd <cpio> --memory <bytes>), so using the standard host-binary model lets us use the existing binary and initrd annotations with their normal meanings. The embedded approach (HyperlightBinary = "") also hits a crash in prepareMonRootfs since fileFromHost calls unix.Stat("").

Tested end-to-end with ctr run --runtime io.containerd.urunc.v2 and it works. Happy to PR these to this branch or open a fresh one–whatever works best for you both. Super cool to see Hyperlight support being added to urunc!!

@cmainas

cmainas commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hello @danbugs thank you for creating the image and for the explanation.

It seems that for the embedded version we will need to perform some changes in urunc.

The hyperlight-unikraft version though works perfectly with the changes you shared and we will be happy to merge them!

@imshubham22apr-gif would it be possible for you to integrate the changes of @danbugs ? We should also add the hello world as an end-to-end test.

@imshubham22apr-gif

Copy link
Copy Markdown
Author

Hello @cmainas, @danbugs

I have successfully integrated the changes proposed by @danbugs to transition Hyperlight to a host-level VMM model. I've also added the hello-hyperlight-unikraft hello-world image (ghcr.io/hyperlight-dev/hello-hyperlight-unikraft:latest) as an E2E test in tests/e2e/test_cases.go.
I ran compilation checks for Linux/AMD64 locally on both the VMM packages and the E2E tests, and everything compiles cleanly.
Pls review!

@cmainas

cmainas commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Thank you @imshubham22apr-gif ,

a few more things:

  • please also add @danbugs as a signee in the commit message
  • we will need to install hyperlight-firecracker before running the end-ro-end CI test
  • use the harbor.nbfc.io/nubificus/urunc/hello-hyperlight-unikraft:latest instead of ghcr.io/hyperlight-dev/hello-hyperlight-unikraft:latest, so we can easily change the image in the future if needed.
  • add yourself and @danbugs in https://github.com/urunc-dev/urunc/blob/main/.github/contributors.yaml

@jsturtevant

Copy link
Copy Markdown

@imshubham22apr-gif are you still interested moving this forward? Recognize your probably busy but the hyperlight team would love to see this land 🚀

@cmainas

cmainas commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Hello @jsturtevant ,

we are interested and we want to push this PR forward. Ideally we would like to see the original author finalizing it, but unfortunately this has taken too long. Everything is there we just need an update of https://github.com/urunc-dev/urunc/blob/main/.github/contributors.yaml for our CI. I think I can edit it, so I will finalize it and merge.

@cmainas
cmainas force-pushed the feat/issue-140-hyperlight-support branch from 6c9f522 to e109596 Compare August 6, 2026 12:58
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 7c56a09
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a7496dc88876800089dc9f5
😎 Deploy Preview https://deploy-preview-632--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

imshubham22apr-gif and others added 3 commits August 6, 2026 16:44
Add initial support for hyperlight-unikraft. For the time being, only a
simple execution is supported without network or mounting host
directories.

Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: imshubham22apr-gif <imshubham.22apr@gmail.com>
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Add a section for hyperlight-unikraft in the supported hypervisors
mentioning the current status. Also, update other parts of the
documentation accordingly.

Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
@cmainas
cmainas force-pushed the feat/issue-140-hyperlight-support branch 2 times, most recently from 7f8e7b5 to 7c56a09 Compare August 6, 2026 14:14
cmainas added 2 commits August 6, 2026 17:22
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
hyperlight-unikraft places the output of the guest in stderr and stdout
remains empty. As a result, the matchTest for hyperlight-unikraft fails.
As a quick and ugly workaround return both stdout and stderr
unconditionally.

We need to fix this in the future and return both stdout and stderr. The
caller should handle them accordingly.

Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for hyperlight

4 participants