I would like to use libvirt to run multiple Domains (VMs) based on the same image at once. The image itself should not be modified. The image should be considered as a starting point or template.
An obvious possibility would be to create a (temporary) copy for every domain. Since the image might take multiple GB, I don't want to create a full copy of it every time. It would like to store differences only. As I understand the documentation, external snapshots are using such technics. But it seems that snapshots are bound to a domain and I cannot use them as template.
According to documentation of qemu, I could use qemu directly while passing option -snapshot
. As far as I'm not committing changes manually, it should work.
qemu-system-x86_64 -snapshot -hda <image>
Is there a way to achieve something similar in libvirt?