Skip to content

feat: Add support for guest services - #193

Merged
markovejnovic merged 16 commits into
mainfrom
feat/guest-hypervisor-communication
Nov 23, 2026
Merged

markovejnovic merged 16 commits into
mainfrom
feat/guest-hypervisor-communication

Conversation

@markovejnovic

@markovejnovic markovejnovic commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds support for guest services to Hyper. Guest services are elixir behaviours that allow the guest VMs to talk to the hypervisor.

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
1131 4 1127 597
View the top 3 failed test(s) by shortest run time
Elixir.Hyper.E2e.GuestServicesTest::test a VM with no services attached cannot connect
Stack Traces | 0s run time
%ExUnit.TestModule{file: ".../test/e2e/guest_services_test.exs", name: Hyper.E2e.GuestServicesTest, setup_all?: true, state: {:failed, [{:error, %MatchError{term: {:error, :no_capacity}}, [{Hyper.E2e.GuestServicesTest, :boot, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 57]}, {Hyper.E2e.GuestServicesTest, :__ex_unit_setup_all_0, 1, [file: ~c"test/e2e/guest_services_test.exs", line: 52]}, {Hyper.E2e.GuestServicesTest, :__ex_unit__, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 1]}]}]}, parameters: %{}, tags: %{timeout: 600000, integration: true}, tests: [%ExUnit.Test{name: :"test a guest reaches an attached service by name, starting from the bytes behind it", description: "test a guest reaches an attached service by name, starting from the bytes behind it", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 70, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test each VM's handler is told that VM's id", description: "test each VM's handler is told that VM's id", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 75, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a name the VM was not given is hung up on without a byte", description: "test a name the VM was not given is hung up on without a byte", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 82, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a VM with no services attached cannot connect", description: "test a VM with no services attached cannot connect", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 86, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}]}
Elixir.Hyper.E2e.GuestServicesTest::test a guest reaches an attached service by name, starting from the bytes behind it
Stack Traces | 0s run time
%ExUnit.TestModule{file: ".../test/e2e/guest_services_test.exs", name: Hyper.E2e.GuestServicesTest, setup_all?: true, state: {:failed, [{:error, %MatchError{term: {:error, :no_capacity}}, [{Hyper.E2e.GuestServicesTest, :boot, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 57]}, {Hyper.E2e.GuestServicesTest, :__ex_unit_setup_all_0, 1, [file: ~c"test/e2e/guest_services_test.exs", line: 52]}, {Hyper.E2e.GuestServicesTest, :__ex_unit__, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 1]}]}]}, parameters: %{}, tags: %{timeout: 600000, integration: true}, tests: [%ExUnit.Test{name: :"test a guest reaches an attached service by name, starting from the bytes behind it", description: "test a guest reaches an attached service by name, starting from the bytes behind it", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 70, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test each VM's handler is told that VM's id", description: "test each VM's handler is told that VM's id", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 75, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a name the VM was not given is hung up on without a byte", description: "test a name the VM was not given is hung up on without a byte", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 82, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a VM with no services attached cannot connect", description: "test a VM with no services attached cannot connect", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 86, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}]}
Elixir.Hyper.E2e.GuestServicesTest::test a name the VM was not given is hung up on without a byte
Stack Traces | 0s run time
%ExUnit.TestModule{file: ".../test/e2e/guest_services_test.exs", name: Hyper.E2e.GuestServicesTest, setup_all?: true, state: {:failed, [{:error, %MatchError{term: {:error, :no_capacity}}, [{Hyper.E2e.GuestServicesTest, :boot, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 57]}, {Hyper.E2e.GuestServicesTest, :__ex_unit_setup_all_0, 1, [file: ~c"test/e2e/guest_services_test.exs", line: 52]}, {Hyper.E2e.GuestServicesTest, :__ex_unit__, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 1]}]}]}, parameters: %{}, tags: %{timeout: 600000, integration: true}, tests: [%ExUnit.Test{name: :"test a guest reaches an attached service by name, starting from the bytes behind it", description: "test a guest reaches an attached service by name, starting from the bytes behind it", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 70, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test each VM's handler is told that VM's id", description: "test each VM's handler is told that VM's id", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 75, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a name the VM was not given is hung up on without a byte", description: "test a name the VM was not given is hung up on without a byte", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 82, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a VM with no services attached cannot connect", description: "test a VM with no services attached cannot connect", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 86, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}]}
Elixir.Hyper.E2e.GuestServicesTest::test each VM's handler is told that VM's id
Stack Traces | 0s run time
%ExUnit.TestModule{file: ".../test/e2e/guest_services_test.exs", name: Hyper.E2e.GuestServicesTest, setup_all?: true, state: {:failed, [{:error, %MatchError{term: {:error, :no_capacity}}, [{Hyper.E2e.GuestServicesTest, :boot, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 57]}, {Hyper.E2e.GuestServicesTest, :__ex_unit_setup_all_0, 1, [file: ~c"test/e2e/guest_services_test.exs", line: 52]}, {Hyper.E2e.GuestServicesTest, :__ex_unit__, 2, [file: ~c"test/e2e/guest_services_test.exs", line: 1]}]}]}, parameters: %{}, tags: %{timeout: 600000, integration: true}, tests: [%ExUnit.Test{name: :"test a guest reaches an attached service by name, starting from the bytes behind it", description: "test a guest reaches an attached service by name, starting from the bytes behind it", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 70, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test each VM's handler is told that VM's id", description: "test each VM's handler is told that VM's id", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 75, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a name the VM was not given is hung up on without a byte", description: "test a name the VM was not given is hung up on without a byte", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 82, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}, %ExUnit.Test{name: :"test a VM with no services attached cannot connect", description: "test a VM with no services attached cannot connect", case: Hyper.E2e.GuestServicesTest, module: Hyper.E2e.GuestServicesTest, state: nil, time: 0, tags: %{timeout: 600000, line: 86, registered: %{}, file: ".../test/e2e/guest_services_test.exs", describe: nil, describe_line: nil, integration: true, test_type: :test}, logs: "", parameters: %{}}]}

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@markovejnovic markovejnovic changed the title feat(guest_service): let guests reach Elixir handlers over vsock feat: Add support for guest services (richer MMDS) Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Test Results

    4 files  ± 0    360 suites  +8   5m 25s ⏱️ +24s
1 727 tests +39  1 723 ✅ +35    0 💤 ± 0  0 ❌ ±0  4 🔥 +4 
2 398 runs  +65  1 723 ✅ +35  671 💤 +26  0 ❌ ±0  4 🔥 +4 

For more details on these errors, see this check.

Results for commit 3cb8421. ± Comparison against base commit c8db325.

♻️ This comment has been updated with latest results.

vm_launch already builds a fresh jail on every boot, before the jailer runs,
so the guest listener is linked there instead of by a separate
vm_link_guest_socket op that rewrote a running VM's jail. The op, its Elixir
wrapper, the Configuring step and the services supervisor are gone; the
Listener is a temporary FireVMM child, since a rebind can no longer relink.
max_heap_size ignored off-heap binaries, so a handler buffering guest bytes
across {:continue, _} grew without bound and the 64 MiB kill never fired.
…p failure

await_exec re-ran apk add after the exec timed out while the first apk still
held the lock, so setup failed with exit 99 before on_exit was registered and
the leaked VMs starved the later suites of capacity.
…ling socat

CI guests have no route to the internet, so apk add socat could only time
out. python:alpine ships AF_VSOCK in its socket module, so the guest side
needs no package at all.
open() panicked on a name that is not one strict component while pin() and
unpin() returned PinError::Name for the same conversion; all three now share
a fallible name().
@markovejnovic markovejnovic changed the title feat: Add support for guest services (richer MMDS) feat: Add support for guest services Nov 23, 2026
@markovejnovic
markovejnovic marked this pull request as ready for review November 23, 2026 07:33
@markovejnovic
markovejnovic merged commit 7305e3c into main Nov 23, 2026
7 of 8 checks passed
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

Successfully merging this pull request may close these issues.

1 participant