Mic92/nixos-shell

Easiest way to make an ephemeral VM (reboot to restore)?

PAI5REECHO opened this issue · 3 comments

I'd like to be able to launch my VMs to use an in-memory disk or run in some way as to not commit any changes to my real drive

Mic92 commented

Otherwise just delete nixos.qcow2 after each run.

I'd like to be able to launch my VMs to use an in-memory disk or run in some way as to not commit any changes to my real drive

I think you can just run this from within a directory that is in a tmpfs/ramfs, so the file being written to is literally in ram. Maybe there would still be some overhead from needing to serialize the file though, but still would give you ephemeral functionality + likely fast IO performance.