[qubes-users] btrfs for template/appvm

I want to use btrfs for the snapshots feature in my appvms.

I know Qubes supports btrfs for dom0:
https://github.com/QubesOS/qubes-issues/issues/2340

Does Qubes support using btrfs in individual appvms?

If not is there some other way I can get snapshots? It would make me less afraid to make a mistake while using my computer.

Looks to me like it has support in appvms

Looks to me that is has support for functioning in appvms., But I can not test currently

I have btrfs set up for dom0 and I’m using the refilnk driver, but my appvms themselves seem to be ext4? Where would I even set this? I don’t see an option on the pool or on qvm-create.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Hi,

I want to use btrfs for the snapshots feature in my appvms.

I know Qubes supports btrfs for dom0:
Consider official Btrfs support in R4.0 · Issue #2340 · QubesOS/qubes-issues · GitHub
<Issues · QubesOS/qubes-issues · GitHub;

Does Qubes support using btrfs in individual appvms?

If not is there some other way I can get snapshots? It would make me
less afraid to make a mistake while using my computer.

Qubes creates a "snapshot" when you start a VM using reflink copies.

If you look at "/var/lib/qubes/appvms/<SomeAppVM>" (or other btrfs pool)
on dom0 you will see some "private.img.XX@XXXX-XX-XXXX". This files are
snapshots from that date before the AppVM was started.

Currently you can use 'qvm-volume' for revert some image to an older
state but you will lose the present image. If you want to start an older
image you can create a new VM and overwrite his 'private.img' with some
"private.img.XX@XXXX-XX-XXXX".

Hopefully in the future this could be improved, I would like to just
start a DispVM based in a snapshot using few mouse clicks or a single
command.

In any case I recommend you to do regular backups :wink:

I *think* you would have to custom build templates using btrfs, but I
have no idea if that would work - I'll try and report back.

When I'm making significant changes then I make liberal use of
qvm-clone: then I may archive off, but more usually just throw away the
clone if I'm happy. (On the rare occasions that I work with Windows
qubes I do this a lot.)

Yes. If you have Btrfs in dom0 then you already have those features at the VM level at least. And I would recommend against putting Btrfs on top of Btrfs, as its more CPU intensive.

For those who have the default LVM in dom0, Btrfs in appVMs is a better prospect. But since LVM also has snapshots, to me the only two overriding reasons to use Btrfs this way is for compression (Btrfs has Zstandard now!) of things like databases and email archives; and also for its integrity checking.

1 Like