-
Notifications
You must be signed in to change notification settings - Fork 65
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
base: main
Are you sure you want to change the base?
Conversation
hypervisor = { | ||
# Use the same machine type as the host | ||
x86_64-linux = "cloud-hypervisor"; | ||
aarch64-linux = "qemu"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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
x86_64
aarch64
riscv64
nix flake check --accept-flake-config
and it passesTesting
Verify that network connectivity works after configuring it.