Very much new to Qubes, and trying to ease my way into it, albeit possibly hindered by having had some previous exposure to non-Qubes Xen environments.
I'd like to ask a question about the way in which an AppVM's Copy-on-Write partition, from within the "volatile.img" VBD is used. >From reading the Template Implementation page, I note Block devices of a VM Every VM has 4 block devices connected: * xvda – base root device (/) – details described below * xvdb – private.img – place where VM always can write. * xvdc – volatile.img, discarded at each VM restart – here is placed swap and temporal “/” modifications (see below) * xvdd – modules.img – kernel modules and firmware and then, below, Snapshot device in Dom0 This device consists of: * root.img – real template filesystem * root-cow.img – differences between the device as seen by AppVM and the current root.img The above is achieved through creating device-mapper snapshots for each version of root.img. When an AppVM is started, a xen hotplug script (/etc/xen/scripts/block-snapshot) reads the inode numbers of root.img and root-cow.img; these numbers are used as the snapshot device’s name. When a device with the same name exists the new AppVM will use it – therefore, AppVMs based on the same version of root.img will use the same device. Of course, the device-mapper cannot use the files directly – it must be connected through /dev/loop*. The same mechanism detects if there is a loop device associated with a file determined by the device and inode numbers – or if creating a new loop device is necessary. Then, from inspection of the block devices within a VM, I can see xvda Number Start End Size File system Name Flags 34s 2047s 2014s Free Space 1 1.00MiB 201MiB 200MiB EFI System boot, esp 2 201MiB 203MiB 2.00MiB BIOS boot partition bios_grub 3 0.02GiB 20.0GiB 19.8GiB ext4 Root filesystem 20.0GiB 20.0Gib 2015s Free Space xvdc Number Start End Size Type File system Flags 63s 2047s 1985s Free Space 1 0.00GiB 1.00GiB 1.00GiB primary linux-swap(v1) 3 1.00GiB 10.0GiB 9.00GiB primary but what I can't seem to work out is where the Copy-on-Write partition (as I think of it: xvdc3) is being "associated" with the VM's "Root filesystem" (xvda3), nor where the loop devices, required for it all to hang together, are created. The reference to the "xen hotplug script (/etc/xen/scripts/block-snapshot)" has me thinking that the "association" is happening in the Dom0, but I can't seem to see the "various parts", when taking a look around the Dom0 or AppVM, after invoking an "Xfce Terminal" from the personal qube. I do note though, that inside the VM, a 'df' shows the root device being presented as /dev/mapper/dmroot and not /dev/xvda3 which then has me thinking that the "association" might be taking place within the AppVM, but again, I can't see any obvious evidence for that. I feel that I should be able to see the "various parts", but, when looking around, am clearly missing them. Could someone point me to a document, or previous answer, that makes things clearer, and/or to what I might have missed in looking around inside the Dom0 and AppVM. -- You received this message because you are subscribed to the Google Groups "qubes-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/qubes-devel/175238788117.6.6581072717512967123.805990082%404forl1st5.slmail.me.