Skip to content

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

Open
imshubham22apr-gif wants to merge 2 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 2 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!

…-dev#140)

Signed-off-by: imshubham22apr-gif <imshubham.22apr@gmail.com>
Signed-off-by: imshubham22apr-gif <imshubham.22apr@gmail.com>
@imshubham22apr-gif imshubham22apr-gif force-pushed the feat/issue-140-hyperlight-support branch from 1bf75ef to 6c9f522 Compare June 11, 2026 10:59
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

3 participants