Add machineConfigModule parameter support to all distro modules#105
Add machineConfigModule parameter support to all distro modules#105Mic92 wants to merge 2 commits intonumtide:mainfrom
Conversation
- Add machineConfigModule parameter to ubuntu, debian, and fedora makeVmTestForImage functions - Default to generic.defaultMachineConfigModule when not provided - This allows users to customize machine configuration for VM tests
- Add missing extraPathsToRegister parameter to debian makeVmTestForImage function - This ensures consistency with ubuntu and fedora modules - Fixes parameter mismatch where prepareDebianImage expected extraPathsToRegister but makeVmTestForImage didn't accept it
|
Hmm, this API was not originally meant to be public. Doing this, we're exposing a few footguns (the vlan and rootImage part mostly). We probably should clean this up/filter those, but it's fine to do that in a subsequent PR. I'm fine to merge this if you add a brief description of this new API to the reference documentation? Line 122 in 2440f3a memorySize and cpus).
|
|
On second thought, a proper way to do this would be to add |
|
When I was looking at the code I also wondering why nix-vm-test is not just a module for the nixos vm test module system? This is how we implemented our clan vm tests and nixos container. Is this something you considered? |
This PR adds support for the
machineConfigModuleparameter to all distro modules (ubuntu, debian, fedora), allowing users to customize VM configuration such as memory size, CPU count, and other virtualisation settings.Changes
All distro modules (ubuntu, debian, fedora):
machineConfigModuleparameter tomakeVmTestForImagefunctiongeneric.defaultMachineConfigModulefor backward compatibilitygeneric.makeVmTestDebian module specifically:
extraPathsToRegisterparameter inmakeVmTestForImagefunctionUsage
Users can now customize VM configuration like this:
Backward Compatibility
All changes are backward compatible - existing code will continue to work without modification.