[kata-dev] virtio-fs + VM Templating

Dr. David Alan Gilbert dgilbert at redhat.com
Wed Jun 5 10:28:14 UTC 2019

* Peng Tao (bergwolf at hyper.sh) wrote:
> On Tue, Jun 4, 2019 at 5:53 PM Dr. David Alan Gilbert
> <dgilbert at redhat.com> wrote:
> >
> > * Tao Peng (bergwolf at hyper.sh) wrote:
> > > On Tue, Jun 4, 2019 at 7:18 AM Mahalingam, Ganesh
> > > <ganesh.mahalingam at intel.com> wrote:
> > > >
> > > > Peng, Stefan,
> > > > While working on enabling virtio-fs on Kata there was a small confusion on whether virtio-fs can work with VM Templating. With the current setup of kata, VM templating and virtio-fs are mutually exclusive (VM templating is enabled in qemu-lite and virtio-fs currently only with NEMU), but they will converge very soon.
> > > >
> > > > An open question we had was, would they both work with each other given that VM templating turns off memory sharing for all VMs other than the first one and virtio-fs expects guest memory be shared & file-backed for all VMs.
> > > Hi Stefan,
> > >
> > > What happens if we specify share=on and share=off for different memory
> > > file backends? Can virtio-fs only pick up the shared one?
> >
> > All vhost-user devices (including virtio-fs) need the share=on - because
> > that's the only way that the vhost-user process sees the writes done
> > by qemu or the guest.  I think we need it for all of RAM.
> >
> Hmm, vm templating needs the initial ram to be mapped private so that
> it can be shared safely across multiple VM instances. It does conflict
> with vhost-user requirement that guest memory can be accessed by a
> different process.

Yes, it's hard.  Thre's a really nasty idea I had last year,
that *might* work for vhost-user + templating.
You'd still need to hotplug the virtio-fs device after restoring
from the template.

> Ganesh, how about we just marking vm templating and vhost-user
> conflict with each other?

Slightly related, but we should see if we can use QEMU's
x-ignore-shared-ram flag to do the templating in qemu 4.0; I think
that should do the same as the older NEMU code.


> Cheers,
> Tao
> -- 
> Into something rich and strange.
Dr. David Alan Gilbert / dgilbert at redhat.com / Manchester, UK

More information about the kata-dev mailing list