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

Changing guest's microvm.* options when running declaratively from a flake #269

Open
romner-set opened this issue Aug 25, 2024 · 0 comments

Comments

@romner-set
Copy link

When using microvm.vms.<name>.flake to specify a microVM's config instead of declaring it inline with vms.<name>.config, the guest flake is the one defining options like vcpu, shares and devices instead of the host. This makes it very non-portable and tied to a specific host system.

For example, if I wanted to create a generic microVM flake that runs jellyfin, I'd have to hardcode the number of VCPUs and memory that gets allocated to it, the hypervisor used, the exact host path it uses for media, etc. and using a PCIe passthrough GPU would be impossible.

Moving the guest-side microvm.* options to the host's microvm.vms.<name>.* next to the flake path would fix this. Specifying everything on the host side might also allow for running arbitrary flakes as microVMs, which could also make it possible to e.g. use the generic jellyfin flake from my example with something like Terraform as a standalone VM on non-NixOS systems.

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

No branches or pull requests

1 participant