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

Use cloud-hypervisor for net-vm on x86 #665

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

slakkala
Copy link
Contributor

Description of changes

Replace QEMU with cloud-hypervisor for net-vm guest on x86 hardware.

cloud-hypervisor makes a differently connected virtual device, so the permanent name of the interface changes.

Move smcroute startup to NetworkManager dispatcher script to allow the guest to reach multi-user.target before host timeout reboots the VM.

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run nix flake check --accept-flake-config and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing

Verify that network connectivity works after configuring it.

@slakkala slakkala temporarily deployed to internal-build-workflow June 12, 2024 11:30 — with GitHub Actions Inactive
hypervisor = {
# Use the same machine type as the host
x86_64-linux = "cloud-hypervisor";
aarch64-linux = "qemu";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why having a different vmm per architecture?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cloud-hypervisor PCI support on AArch64 is limited in functionality, and does not work with our wifi adaptor. Further, the PCI passing on AArch64 would only work in UEFI mode, which microvm does not support; and would probably be slower.

shares =
[
{
tag = "ro-store";
source = "/nix/store";
mountPoint = "/nix/.ro-store";
proto = "virtiofs";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check the extra time delay in booting and size that is incurred by using virtiofs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my measurements the delay is negligible, less than 1s difference from boot to VM up.

The storage usage grows by 36 kB on AArch64.

@tiiuae tiiuae deleted a comment Oct 18, 2024
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.

2 participants