How can I make an auto-create/auto-delete volume for a vm?

I would like a way to have a volume auto-created to attach to a VM when it starts, then destroyed when the VM shuts down. Rather like a tmpfs, but uses the disk for backing (because I ocassionally need it to be larger than RAM). Very large scratch space. One use case is large AUR builds for ArchLinux. Autogrow would be a plus, though i can just figure out a maximum size.

I could start with just attaching another volume to a VM when it starts. Where should I look for a hook? my google-foo hasn’t found anything.


– scott

I might be missing something here, but it sounds like a disposable qube (DispVM) is exactly what you’re looking for? You could setup a DispVM template and assign it a large private volume size.

See: How to use disposables | Qubes OS

1 Like