VM archiving mechanism?

I am thinking whether anything similar already exists.

For certain qubes os user that are template experiment enthusiast, sometimes many templates and vms might be created as time passes, and most of them does not have much meaning, but deleting them are also not preferred. As they got retired and seems to be not used in the near future, we throw it into archive.

An archiver VM does:

  • take in VM backup files
  • store VM imgs with dedup+compress features so that they occupy small number of disk space
  • consider bypassing lvm abstraction and qubes os default version tracking to avoid the vm shutdown lag bug (it will easily occupy up to 500G~1T space causing a VM shutdown of around 1 hr if stored directly in private.img)

When a VM is thrown into archive, it is backuped and the backup file is sent into archive VM, then the VM is deleted in Qubes OS VM list.

When one want to open the VM, he has 2 choices: one is restore from a backup file version of the VM, which is generated by the archiver; the other is directly mount a (readonly probably) block device provided by the archiver.

As far as I know this has several advantages

  1. employs dedup and fs compression
  2. avoid installing any heavy additional software inside dom0 - fs tricks are all inside archiver vm
  3. archived vm does not take GUI space of dom0 “applications” and “Qube Manager”.

Moreover, if Qubes OS supports looking for VM that are not started in recent 1 month, the VM can be suggested to go in archive directly.

I wonder whether similar things exists already - a salt or a dockerfile or anything similar; also whether this is considered or discussed anywhere.

1 Like