On Mon, 1 Oct 2018 12:55:12 +0200
Reyk Floeter <[email protected]> wrote:

> Hi Ori,
> 
> On Sun, Sep 30, 2018 at 12:27:00PM -0700, Ori Bernstein wrote:
> > I've added support to vmd for external snapshots. That is,
> > snapshots that are derived from a base image. Data lookups
> > start in the derived image, and if the derived image does not
> > contain some data, the search proceeds ot the base image.
> > Multiple derived images may exist off of a single base image.
> > 
> 
> Nice work!  This will be quite useful, thanks.
> 
> I think I broke your diff as my last commit to derive the raw/qcow2
> format introduced some conflicts.  I had posted it on hackers@ and
> forgot that your aren't on the internal list yet - sorry for that.
 
No worries -- I'll rebase it after work.

> but we should be able to derive it from the base as well (there's now
> base in raw images), so the following should work as well: 
> 
>       vmctl create derived.img -s 16G -b base.img

Will fold that in to this change. I also want the creation to
automatically figure out the size here.
 
> > The main implementation change is that we now probe base
> > images before sending the disk FDs to the VM, which means that
> > we can actually open the images.
> > 
> > The base image paths may be relative. If they are relative,
> > they are interpreted relative to the location of the derived
> > image, and not relative to the directory where vmd happens to
> > be running.
> > 
> 
> OK, that needs some care + review.
 
Indeed -- I hadn't gotten it quite right.

> Please be extremely careful with the design here.  Unlike qemu, a vmd
> VM is not able to create new files itself and it should never be able
> to do it.  So when we create snapshots, we need to find a way that the
> parent prepares the file, sends the fd, and asks the VM process to use
> it.

I was not planning on allowing snapshots of running images -- merely
starting instances where all changes were transient. My plan was to make
vmctl create a temporary disk image, and point vmd to that.

-- 
Ori Bernstein <[email protected]>

Reply via email to