NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.84k stars 364 forks source link

Deploy to virtualbox using vanilla nixpkgs (non-NixOS)? #1068

Open robinp opened 5 years ago

robinp commented 5 years ago

Do I get it right that using a non-NixOS-managed virtualbox on the host won't make it possible to deploy? Since the guest additions installed likely wouldn't match the version of the virtualbox on the host.

Also, one can nix-env -i virtualbox on plain nixpkgs, but it won't build/load any kernel drivers, and thus won't work. Sounds like virtualbox deployment only works if the host runs NixOS?

robinp commented 5 years ago

I could get it to work with the non-NixOS-vbox, but I wonder if it is due to luck or are there some more guarantees? For example as long as major version matches?

nightkr commented 5 years ago

In general older versions of guest additions will be compatible with newer versions of Virtualbox. This would be required anyway, since you'd still need some way to upgrade your VMs after upgrading Virtualbox itself.

mymmrac commented 2 years ago

Tried to run VirtualBox using Nixpgks on Pop_OS, no success - kernel drivers were not installed

nightkr commented 2 years ago

Nixpkgs (outside of NixOS, and even then only when setting the system configuration) can't affect which kernel modules you have installed.

On Ubuntu (and presumably also Pop_OS) they are provided by virtualbox-modules (virtualbox-dkms in practice).

However, honestly I have no idea how much version skew vbox allows between the host kernel module and the host application. It might work, it might break completely. I'd suggest installing vbox-the-application and the vbox kernel modules from the same source.