Hello, Arnaud Daby-Seesaram <[email protected]> skribis:
> I often run a VM built using > > guix time-machine -C channels.scm -- system vm -L . vm.scm ... > > Ideally, I would like to make a service analogous to > `hurd-vm-service-type' that could start and stop the VM (the image > generation would become part of my system's reconfigure). > > Is this possible with existing Guix mechanisms? There’s also <virtual-machine> (a file-like object that lowers to a ‘run-vm.sh’ script) as well as ‘virtual-build-machine-service-type’: https://guix.gnu.org/manual/devel/en/html_node/Virtualization-Services.html However, both are missing the ‘time-machine’ part. To do that, you would need to define something that combines inferiors, as Simon mentions, and one of the above mechanisms. It’s feasible, but somewhat inconvenient, especially since you would pay the cost when deploying the host system. Maybe the best option is to keep doing what you’re doing :-) but you could always wrap it in a Shepherd service to make it more convenient for you to use. You could add a custom action to the Shepherd service that would allow you to dynamically change the ‘channels.scm’ that’s used to build and run the VM. My 2¢, Ludo’.
