You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The microvm component is used for running virtual machines inside Ghaf environment. It builds a kernel for virtual machines and filesystems. Filesystems contains NixOS components and additional needed by microvm during runtime (startup scripts, etc.).
Microvm's feature is that it contains hard-coded kernel and package set definitions: kernel configuration and VM's NixOS packages set. There is no way to define a custom packages configuration.
It means that we are unable to define a VM with our own kernel version, configuration, and applied patches. We also cannot change the default package set. I solved this issue in the PR#94, source.
After getting more familiar with Nix/NixOS mechanisms, I have a proposal of solving the problem other way.
Solution
The microvm component is added additional options:
microvm.vm.kernel: VM kernel package
microvm.vm.packages: VM NixOS packages to be included in the build
In general - yes, we need support for guest VMs with custom kernels and user spaces. Also, discussion with the microvm's author is very much appreciated.
The
microvm
component is used for running virtual machines insideGhaf
environment. It builds a kernel for virtual machines and filesystems. Filesystems contains NixOS components and additional needed bymicrovm
during runtime (startup scripts, etc.).Microvm's feature is that it contains hard-coded kernel and package set definitions: kernel configuration and VM's NixOS packages set. There is no way to define a custom packages configuration.
It means that we are unable to define a VM with our own kernel version, configuration, and applied patches. We also cannot change the default package set. I solved this issue in the PR#94, source.
After getting more familiar with Nix/NixOS mechanisms, I have a proposal of solving the problem other way.
Solution
The microvm component is added additional options:
microvm.vm.kernel
: VM kernel packagemicrovm.vm.packages
: VM NixOS packages to be included in the buildExample
microvm.vm.kernel = pkgs.linuxPackages_5_4.callPackage ./memsharevm-kernel.nix {};
microvm.vm.packages = pkgs.linuxPackages_5_4.extend (_: _: {
kernel = microvm.vm.kernel;
});
Sample kernel configuration: memsharevm-kernel.nix
I think that such change should be easily accepted by microvm's author. I already contacted him regarding other change.
The text was updated successfully, but these errors were encountered: