0

I have a QEMU image (qcow2) with a snapshot stored in it. Right now I'm using libvirt to start it.

However, I want to be able to run more than one instance of the same image snapshot.

I guess I can do that by cloning the virtual-hd and installing/creating a new domain (virsh) and then running revert from snapshot. But I want to be able to do that pretty much "on-the-fly" with as little as possible latency from the time I decide I need to run another instance of image X to the time that instance is running from the stored snapshot. (I wan't to avoid writing to the hard-drive as possible)

Anyone did anything like that? I started thinking maybe libvirt is not low-level enough for this?

1 Answer 1

0

Libvirt supports this very well. Create one disk image that has everything you want to share between your domains. This will be your read-only backing file. When creating volumes for new domains, set backingStore to refer to it. The new volume you're creating for each domain will start out taking zero bytes but grow as you make changes.

2
  • Thanks, but I also wanted the VM to start exactly in the same spot - as if I ran virsh snapshot-revert. With backing store it just creates a "snapshot" of the disk image.. Commented Jun 4, 2014 at 7:16
  • Your backing file should be in the state you want it to be before you start any VMs based on it. In your case, it sounds like you need to revert the snapshot it already has. Commented Jun 4, 2014 at 13:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.