In the case where we use devmapper as a snapshotter in urunc, we have the benefit of directly using the container rootfs as the block image to pass it to the unikernel. However, to do that, we need to copy the unikernel image, the initrd and urunc.json file, unmount the container rootfs and then give it to the unikernel.
We can remove the file copies by requesting a view (read-only) snapshot of the container rootfs. Therefore, instead of copying the files, we could simply mount the new snapshot and directly read the unikernel binary and rest files from there. In theory, this approach will not have any storage overhead, since the snapshot will simply redirect the read requests to the underneath snapshot layer (actual container rootfs).
Ideally, we could mark and select the layers that contain the unikernel image to create the new snapshot. However, this might require a lot of changes, outside of urunc.
In order to create the new snapshot, we need to communicate with containerd in order to request to create the snapshot for us. We need to investigate how we can do that.
In the case where we use devmapper as a snapshotter in urunc, we have the benefit of directly using the container rootfs as the block image to pass it to the unikernel. However, to do that, we need to copy the unikernel image, the initrd and
urunc.jsonfile, unmount the container rootfs and then give it to the unikernel.We can remove the file copies by requesting a view (read-only) snapshot of the container rootfs. Therefore, instead of copying the files, we could simply mount the new snapshot and directly read the unikernel binary and rest files from there. In theory, this approach will not have any storage overhead, since the snapshot will simply redirect the read requests to the underneath snapshot layer (actual container rootfs).
Ideally, we could mark and select the layers that contain the unikernel image to create the new snapshot. However, this might require a lot of changes, outside of urunc.
In order to create the new snapshot, we need to communicate with containerd in order to request to create the snapshot for us. We need to investigate how we can do that.